From 142d63d9f61bb8aefac057d1e318e25ce44239d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 5 Jul 2026 02:28:47 +0000 Subject: [PATCH 1/3] Chore(deps): Bump the major group across 5 directories with 43 updates Bumps the major group with 41 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) | `1.11.1` | `3.0.1` | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.29.7` | `8.0.1` | | [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) | `7.29.7` | `8.0.1` | | [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.29.7` | `8.0.2` | | [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) | `7.29.7` | `8.0.1` | | [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) | `7.29.7` | `8.0.1` | | [babel-jest](https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest) | `29.7.0` | `30.4.1` | | [eslint](https://github.com/eslint/eslint) | `9.18.0` | `10.6.0` | | [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) | `3.7.0` | `4.4.5` | | [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) | `5.1.0` | `7.1.1` | | [eslint-webpack-plugin](https://github.com/webpack/eslint-webpack-plugin) | `5.0.0` | `6.0.0` | | [glob](https://github.com/isaacs/node-glob) | `12.0.0` | `13.0.6` | | [globals](https://github.com/sindresorhus/globals) | `16.0.0` | `17.7.0` | | [got](https://github.com/sindresorhus/got) | `14.4.5` | `15.0.6` | | [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) | `29.7.0` | `30.4.2` | | [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) | `29.5.14` | `30.0.0` | | [jsdom](https://github.com/jsdom/jsdom) | `26.0.0` | `29.1.1` | | [lint-staged](https://github.com/lint-staged/lint-staged) | `15.4.1` | `17.0.8` | | [react-i18next](https://github.com/i18next/react-i18next) | `15.4.1` | `17.0.8` | | [typescript](https://github.com/microsoft/TypeScript) | `5.7.3` | `6.0.3` | | [webpack-cli](https://github.com/webpack/webpack-cli) | `6.0.1` | `7.1.0` | | [@lavamoat/allow-scripts](https://github.com/LavaMoat/LavaMoat/tree/HEAD/packages/allow-scripts) | `3.3.1` | `5.1.0` | | [@lavamoat/preinstall-always-fail](https://github.com/LavaMoat/LavaMoat/tree/HEAD/packages/preinstall-always-fail) | `2.1.0` | `3.0.0` | | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `50.6.2` | `63.0.10` | | [@blockaid/client](https://github.com/blockaid-official/blockaid-client-node) | `0.31.0` | `1.4.0` | | [bignumber.js](https://github.com/MikeMcl/bignumber.js) | `9.3.0` | `11.1.4` | | [@sentry/browser](https://github.com/getsentry/sentry-javascript) | `9.13.0` | `10.62.0` | | @stellar/typescript-wallet-sdk-km | `1.9.0` | `3.0.1` | | [@types/jsdom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jsdom) | `21.1.7` | `28.0.3` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.14.1` | `26.0.1` | | [concurrently](https://github.com/open-cli-tools/concurrently) | `9.1.2` | `10.0.3` | | [copy-webpack-plugin](https://github.com/webpack/copy-webpack-plugin) | `13.0.0` | `14.0.0` | | [dotenv-webpack](https://github.com/mrsteele/dotenv-webpack) | `8.1.0` | `9.0.0` | | [i18next](https://github.com/i18next/i18next) | `25.0.1` | `26.3.3` | | [i18next-scanner-webpack](https://github.com/ph1p/i18next-scanner-webpack) | `0.9.1` | `1.0.0` | | [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) | `29.7.0` | `30.4.1` | | [js-yaml](https://github.com/nodeca/js-yaml) | `4.2.0` | `5.2.0` | | [sass-loader](https://github.com/webpack/sass-loader) | `16.0.5` | `17.0.0` | | [ses](https://github.com/endojs/endo/tree/HEAD/packages/ses) | `1.12.0` | `2.2.0` | | [@sentry/webpack-plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins) | `3.3.1` | `5.3.0` | | [shadcn](https://github.com/shadcn-ui/ui/tree/HEAD/packages/shadcn) | `3.8.4` | `4.12.0` | Bumps the major group with 4 updates in the /@shared/api directory: [typescript](https://github.com/microsoft/TypeScript), [@lavamoat/allow-scripts](https://github.com/LavaMoat/LavaMoat/tree/HEAD/packages/allow-scripts), [@blockaid/client](https://github.com/blockaid-official/blockaid-client-node) and [bignumber.js](https://github.com/MikeMcl/bignumber.js). Bumps the major group with 2 updates in the /@shared/helpers directory: [typescript](https://github.com/microsoft/TypeScript) and [bignumber.js](https://github.com/MikeMcl/bignumber.js). Bumps the major group with 1 update in the /@stellar/freighter-api directory: [@lavamoat/allow-scripts](https://github.com/LavaMoat/LavaMoat/tree/HEAD/packages/allow-scripts). Bumps the major group with 19 updates in the /extension directory: | Package | From | To | | --- | --- | --- | | [@lavamoat/allow-scripts](https://github.com/LavaMoat/LavaMoat/tree/HEAD/packages/allow-scripts) | `3.3.2` | `5.1.0` | | [bignumber.js](https://github.com/MikeMcl/bignumber.js) | `9.3.0` | `11.1.4` | | [@amplitude/analytics-browser](https://github.com/amplitude/Amplitude-TypeScript) | `2.44.4` | `2.44.3` | | [@amplitude/experiment-js-client](https://github.com/amplitude/experiment-js-client/tree/HEAD/packages/experiment-browser) | `1.21.2` | `1.21.1` | | [@sentry/browser](https://github.com/getsentry/sentry-javascript) | `9.13.0` | `10.62.0` | | @stellar/typescript-wallet-sdk-km | `1.9.0` | `3.0.1` | | [@types/jsdom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jsdom) | `21.1.7` | `28.0.3` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.14.1` | `26.0.1` | | [concurrently](https://github.com/open-cli-tools/concurrently) | `9.1.2` | `10.0.3` | | [copy-webpack-plugin](https://github.com/webpack/copy-webpack-plugin) | `13.0.0` | `14.0.0` | | [dotenv-webpack](https://github.com/mrsteele/dotenv-webpack) | `8.1.0` | `9.0.0` | | [i18next](https://github.com/i18next/i18next) | `25.0.1` | `26.3.3` | | [i18next-scanner-webpack](https://github.com/ph1p/i18next-scanner-webpack) | `0.9.1` | `1.0.0` | | [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) | `29.7.0` | `30.4.1` | | [js-yaml](https://github.com/nodeca/js-yaml) | `4.2.0` | `5.2.0` | | [sass-loader](https://github.com/webpack/sass-loader) | `16.0.5` | `17.0.0` | | [ses](https://github.com/endojs/endo/tree/HEAD/packages/ses) | `1.12.0` | `2.2.0` | | [@sentry/webpack-plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins) | `3.3.1` | `5.3.0` | | [shadcn](https://github.com/shadcn-ui/ui/tree/HEAD/packages/shadcn) | `3.8.4` | `4.12.0` | Updates `@actions/core` from 1.11.1 to 3.0.1 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Updates `@babel/core` from 7.29.7 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/packages/babel-core) Updates `@babel/eslint-parser` from 7.29.7 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/eslint/babel-eslint-parser) Updates `@babel/preset-env` from 7.29.7 to 8.0.2 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.2/packages/babel-preset-env) Updates `@babel/preset-react` from 7.29.7 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/packages/babel-preset-react) Updates `@babel/preset-typescript` from 7.29.7 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/packages/babel-preset-typescript) Updates `babel-jest` from 29.7.0 to 30.4.1 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.1/packages/babel-jest) Updates `eslint` from 9.18.0 to 10.6.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v10.6.0) Updates `eslint-import-resolver-typescript` from 3.7.0 to 4.4.5 - [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases) - [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v3.7.0...v4.4.5) Updates `eslint-plugin-react-hooks` from 5.1.0 to 7.1.1 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/react/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/eslint-plugin-react-hooks@7.1.1/packages/eslint-plugin-react-hooks) Updates `eslint-webpack-plugin` from 5.0.0 to 6.0.0 - [Release notes](https://github.com/webpack/eslint-webpack-plugin/releases) - [Changelog](https://github.com/webpack/eslint-webpack-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/eslint-webpack-plugin/compare/v5.0.0...v6.0.0) Updates `glob` from 12.0.0 to 13.0.6 - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v12.0.0...v13.0.6) Updates `globals` from 16.0.0 to 17.7.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v16.0.0...v17.7.0) Updates `got` from 14.4.5 to 15.0.6 - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.4.5...v15.0.6) Updates `jest` from 29.7.0 to 30.4.2 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.2/packages/jest) Updates `@types/jest` from 29.5.14 to 30.0.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Updates `jsdom` from 26.0.0 to 29.1.1 - [Release notes](https://github.com/jsdom/jsdom/releases) - [Commits](https://github.com/jsdom/jsdom/compare/v26.0.0...v29.1.1) Updates `lint-staged` from 15.4.1 to 17.0.8 - [Release notes](https://github.com/lint-staged/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md) - [Commits](https://github.com/lint-staged/lint-staged/compare/v15.4.1...v17.0.8) Updates `react-i18next` from 15.4.1 to 17.0.8 - [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/react-i18next/compare/v15.4.1...v17.0.8) Updates `typescript` from 5.7.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `webpack-cli` from 6.0.1 to 7.1.0 - [Release notes](https://github.com/webpack/webpack-cli/releases) - [Changelog](https://github.com/webpack/webpack-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@6.0.1...webpack-cli@7.1.0) Updates `@lavamoat/allow-scripts` from 3.3.1 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@lavamoat/preinstall-always-fail` from 2.1.0 to 3.0.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/preinstall-always-fail/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/allow-scripts-v3.0.0/packages/preinstall-always-fail) Updates `eslint-plugin-jsdoc` from 50.6.2 to 63.0.10 - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v50.6.2...v63.0.10) Updates `@blockaid/client` from 0.31.0 to 1.4.0 - [Release notes](https://github.com/blockaid-official/blockaid-client-node/releases) - [Changelog](https://github.com/blockaid-official/blockaid-client-node/blob/main/CHANGELOG.md) - [Commits](https://github.com/blockaid-official/blockaid-client-node/compare/v0.31.0...v1.4.0) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `@sentry/browser` from 9.13.0 to 10.62.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.13.0...10.62.0) Updates `@stellar/typescript-wallet-sdk-km` from 1.9.0 to 3.0.1 Updates `@types/jsdom` from 21.1.7 to 28.0.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jsdom) Updates `@types/node` from 22.14.1 to 26.0.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `concurrently` from 9.1.2 to 10.0.3 - [Release notes](https://github.com/open-cli-tools/concurrently/releases) - [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.1.2...v10.0.3) Updates `copy-webpack-plugin` from 13.0.0 to 14.0.0 - [Release notes](https://github.com/webpack/copy-webpack-plugin/releases) - [Changelog](https://github.com/webpack/copy-webpack-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/copy-webpack-plugin/compare/v13.0.0...v14.0.0) Updates `dotenv-webpack` from 8.1.0 to 9.0.0 - [Release notes](https://github.com/mrsteele/dotenv-webpack/releases) - [Commits](https://github.com/mrsteele/dotenv-webpack/compare/v8.1.0...v9.0.0) Updates `i18next` from 25.0.1 to 26.3.3 - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v25.0.1...v26.3.3) Updates `i18next-scanner-webpack` from 0.9.1 to 1.0.0 - [Release notes](https://github.com/ph1p/i18next-scanner-webpack/releases) - [Commits](https://github.com/ph1p/i18next-scanner-webpack/compare/v0.9.1...v1.0.0) Updates `jest-environment-jsdom` from 29.7.0 to 30.4.1 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.1/packages/jest-environment-jsdom) Updates `js-yaml` from 4.2.0 to 5.2.0 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.2.0...5.2.0) Updates `sass-loader` from 16.0.5 to 17.0.0 - [Release notes](https://github.com/webpack/sass-loader/releases) - [Changelog](https://github.com/webpack/sass-loader/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/sass-loader/compare/v16.0.5...v17.0.0) Updates `ses` from 1.12.0 to 2.2.0 - [Release notes](https://github.com/endojs/endo/releases) - [Changelog](https://github.com/endojs/endo/blob/master/packages/ses/CHANGELOG.md) - [Commits](https://github.com/endojs/endo/commits/ses@2.2.0/packages/ses) Updates `@sentry/webpack-plugin` from 3.3.1 to 5.3.0 - [Release notes](https://github.com/getsentry/sentry-javascript-bundler-plugins/releases) - [Changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.3.1...5.3.0) Updates `shadcn` from 3.8.4 to 4.12.0 - [Release notes](https://github.com/shadcn-ui/ui/releases) - [Changelog](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/CHANGELOG.md) - [Commits](https://github.com/shadcn-ui/ui/commits/shadcn@4.12.0/packages/shadcn) Updates `@blockaid/client` from 0.31.0 to 1.4.0 - [Release notes](https://github.com/blockaid-official/blockaid-client-node/releases) - [Changelog](https://github.com/blockaid-official/blockaid-client-node/blob/main/CHANGELOG.md) - [Commits](https://github.com/blockaid-official/blockaid-client-node/compare/v0.31.0...v1.4.0) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `typescript` from 5.7.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `@lavamoat/allow-scripts` from 3.3.1 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `typescript` from 5.7.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `@lavamoat/allow-scripts` from 3.3.1 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@sentry/browser` from 9.13.0 to 10.62.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.13.0...10.62.0) Updates `@stellar/typescript-wallet-sdk-km` from 1.9.0 to 3.0.1 Updates `@types/jsdom` from 21.1.7 to 28.0.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jsdom) Updates `@types/node` from 22.14.1 to 26.0.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `concurrently` from 9.1.2 to 10.0.3 - [Release notes](https://github.com/open-cli-tools/concurrently/releases) - [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.1.2...v10.0.3) Updates `copy-webpack-plugin` from 13.0.0 to 14.0.0 - [Release notes](https://github.com/webpack/copy-webpack-plugin/releases) - [Changelog](https://github.com/webpack/copy-webpack-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/copy-webpack-plugin/compare/v13.0.0...v14.0.0) Updates `dotenv-webpack` from 8.1.0 to 9.0.0 - [Release notes](https://github.com/mrsteele/dotenv-webpack/releases) - [Commits](https://github.com/mrsteele/dotenv-webpack/compare/v8.1.0...v9.0.0) Updates `i18next` from 25.0.1 to 26.3.3 - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v25.0.1...v26.3.3) Updates `i18next-scanner-webpack` from 0.9.1 to 1.0.0 - [Release notes](https://github.com/ph1p/i18next-scanner-webpack/releases) - [Commits](https://github.com/ph1p/i18next-scanner-webpack/compare/v0.9.1...v1.0.0) Updates `jest-environment-jsdom` from 29.7.0 to 30.4.1 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.1/packages/jest-environment-jsdom) Updates `js-yaml` from 4.2.0 to 5.2.0 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.2.0...5.2.0) Updates `sass-loader` from 16.0.5 to 17.0.0 - [Release notes](https://github.com/webpack/sass-loader/releases) - [Changelog](https://github.com/webpack/sass-loader/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/sass-loader/compare/v16.0.5...v17.0.0) Updates `ses` from 1.12.0 to 2.2.0 - [Release notes](https://github.com/endojs/endo/releases) - [Changelog](https://github.com/endojs/endo/blob/master/packages/ses/CHANGELOG.md) - [Commits](https://github.com/endojs/endo/commits/ses@2.2.0/packages/ses) Updates `@lavamoat/allow-scripts` from 3.3.1 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@sentry/webpack-plugin` from 3.3.1 to 5.3.0 - [Release notes](https://github.com/getsentry/sentry-javascript-bundler-plugins/releases) - [Changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.3.1...5.3.0) Updates `shadcn` from 3.8.4 to 4.12.0 - [Release notes](https://github.com/shadcn-ui/ui/releases) - [Changelog](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/CHANGELOG.md) - [Commits](https://github.com/shadcn-ui/ui/commits/shadcn@4.12.0/packages/shadcn) Updates `typescript` from 5.8.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@blockaid/client` from 0.31.0 to 1.4.0 - [Release notes](https://github.com/blockaid-official/blockaid-client-node/releases) - [Changelog](https://github.com/blockaid-official/blockaid-client-node/blob/main/CHANGELOG.md) - [Commits](https://github.com/blockaid-official/blockaid-client-node/compare/v0.31.0...v1.4.0) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `@blockaid/client` from 0.31.0 to 1.4.0 - [Release notes](https://github.com/blockaid-official/blockaid-client-node/releases) - [Changelog](https://github.com/blockaid-official/blockaid-client-node/blob/main/CHANGELOG.md) - [Commits](https://github.com/blockaid-official/blockaid-client-node/compare/v0.31.0...v1.4.0) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `typescript` from 5.8.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `typescript` from 5.8.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `typescript` from 5.8.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `typescript` from 5.8.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `typescript` from 5.8.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v6.0.3) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `@amplitude/analytics-browser` from 2.44.4 to 2.44.3 - [Release notes](https://github.com/amplitude/Amplitude-TypeScript/releases) - [Commits](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.44.4...@amplitude/analytics-browser@2.44.3) Updates `@amplitude/experiment-js-client` from 1.21.2 to 1.21.1 - [Release notes](https://github.com/amplitude/experiment-js-client/releases) - [Changelog](https://github.com/amplitude/experiment-js-client/blob/main/packages/experiment-browser/CHANGELOG.md) - [Commits](https://github.com/amplitude/experiment-js-client/commits/@amplitude/experiment-js-client@1.21.1/packages/experiment-browser) Updates `@sentry/browser` from 9.13.0 to 10.62.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.13.0...10.62.0) Updates `@stellar/typescript-wallet-sdk-km` from 1.9.0 to 3.0.1 Updates `@types/jsdom` from 21.1.7 to 28.0.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jsdom) Updates `@types/node` from 22.14.1 to 26.0.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `concurrently` from 9.1.2 to 10.0.3 - [Release notes](https://github.com/open-cli-tools/concurrently/releases) - [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.1.2...v10.0.3) Updates `copy-webpack-plugin` from 13.0.0 to 14.0.0 - [Release notes](https://github.com/webpack/copy-webpack-plugin/releases) - [Changelog](https://github.com/webpack/copy-webpack-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/copy-webpack-plugin/compare/v13.0.0...v14.0.0) Updates `dotenv-webpack` from 8.1.0 to 9.0.0 - [Release notes](https://github.com/mrsteele/dotenv-webpack/releases) - [Commits](https://github.com/mrsteele/dotenv-webpack/compare/v8.1.0...v9.0.0) Updates `i18next` from 25.0.1 to 26.3.3 - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v25.0.1...v26.3.3) Updates `i18next-scanner-webpack` from 0.9.1 to 1.0.0 - [Release notes](https://github.com/ph1p/i18next-scanner-webpack/releases) - [Commits](https://github.com/ph1p/i18next-scanner-webpack/compare/v0.9.1...v1.0.0) Updates `jest-environment-jsdom` from 29.7.0 to 30.4.1 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.1/packages/jest-environment-jsdom) Updates `js-yaml` from 4.2.0 to 5.2.0 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.2.0...5.2.0) Updates `sass-loader` from 16.0.5 to 17.0.0 - [Release notes](https://github.com/webpack/sass-loader/releases) - [Changelog](https://github.com/webpack/sass-loader/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/sass-loader/compare/v16.0.5...v17.0.0) Updates `ses` from 1.12.0 to 2.2.0 - [Release notes](https://github.com/endojs/endo/releases) - [Changelog](https://github.com/endojs/endo/blob/master/packages/ses/CHANGELOG.md) - [Commits](https://github.com/endojs/endo/commits/ses@2.2.0/packages/ses) Updates `@sentry/webpack-plugin` from 3.3.1 to 5.3.0 - [Release notes](https://github.com/getsentry/sentry-javascript-bundler-plugins/releases) - [Changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.3.1...5.3.0) Updates `shadcn` from 3.8.4 to 4.12.0 - [Release notes](https://github.com/shadcn-ui/ui/releases) - [Changelog](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/CHANGELOG.md) - [Commits](https://github.com/shadcn-ui/ui/commits/shadcn@4.12.0/packages/shadcn) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@sentry/browser` from 9.13.0 to 10.62.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.13.0...10.62.0) Updates `@stellar/typescript-wallet-sdk-km` from 1.9.0 to 3.0.1 Updates `@types/jsdom` from 21.1.7 to 28.0.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jsdom) Updates `@types/node` from 22.14.1 to 26.0.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `bignumber.js` from 9.3.0 to 11.1.4 - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.3.0...v11.1.4) Updates `concurrently` from 9.1.2 to 10.0.3 - [Release notes](https://github.com/open-cli-tools/concurrently/releases) - [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.1.2...v10.0.3) Updates `copy-webpack-plugin` from 13.0.0 to 14.0.0 - [Release notes](https://github.com/webpack/copy-webpack-plugin/releases) - [Changelog](https://github.com/webpack/copy-webpack-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/copy-webpack-plugin/compare/v13.0.0...v14.0.0) Updates `dotenv-webpack` from 8.1.0 to 9.0.0 - [Release notes](https://github.com/mrsteele/dotenv-webpack/releases) - [Commits](https://github.com/mrsteele/dotenv-webpack/compare/v8.1.0...v9.0.0) Updates `i18next` from 25.0.1 to 26.3.3 - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v25.0.1...v26.3.3) Updates `i18next-scanner-webpack` from 0.9.1 to 1.0.0 - [Release notes](https://github.com/ph1p/i18next-scanner-webpack/releases) - [Commits](https://github.com/ph1p/i18next-scanner-webpack/compare/v0.9.1...v1.0.0) Updates `jest-environment-jsdom` from 29.7.0 to 30.4.1 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.1/packages/jest-environment-jsdom) Updates `js-yaml` from 4.2.0 to 5.2.0 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.2.0...5.2.0) Updates `sass-loader` from 16.0.5 to 17.0.0 - [Release notes](https://github.com/webpack/sass-loader/releases) - [Changelog](https://github.com/webpack/sass-loader/blob/main/CHANGELOG.md) - [Commits](https://github.com/webpack/sass-loader/compare/v16.0.5...v17.0.0) Updates `ses` from 1.12.0 to 2.2.0 - [Release notes](https://github.com/endojs/endo/releases) - [Changelog](https://github.com/endojs/endo/blob/master/packages/ses/CHANGELOG.md) - [Commits](https://github.com/endojs/endo/commits/ses@2.2.0/packages/ses) Updates `@lavamoat/allow-scripts` from 3.3.2 to 5.1.0 - [Release notes](https://github.com/LavaMoat/LavaMoat/releases) - [Changelog](https://github.com/LavaMoat/LavaMoat/blob/main/packages/allow-scripts/CHANGELOG.md) - [Commits](https://github.com/LavaMoat/LavaMoat/commits/lavapack-v5.1.0/packages/allow-scripts) Updates `@sentry/webpack-plugin` from 3.3.1 to 5.3.0 - [Release notes](https://github.com/getsentry/sentry-javascript-bundler-plugins/releases) - [Changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.3.1...5.3.0) Updates `shadcn` from 3.8.4 to 4.12.0 - [Release notes](https://github.com/shadcn-ui/ui/releases) - [Changelog](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/CHANGELOG.md) - [Commits](https://github.com/shadcn-ui/ui/commits/shadcn@4.12.0/packages/shadcn) --- updated-dependencies: - dependency-name: "@actions/core" dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@babel/core" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@babel/eslint-parser" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@babel/preset-env" dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@babel/preset-react" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@babel/preset-typescript" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: babel-jest dependency-version: 30.4.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: eslint dependency-version: 10.6.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: eslint-import-resolver-typescript dependency-version: 4.4.5 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: eslint-plugin-react-hooks dependency-version: 7.1.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: eslint-webpack-plugin dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: glob dependency-version: 13.0.6 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: globals dependency-version: 17.7.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: got dependency-version: 15.0.6 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: jest dependency-version: 30.4.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/jest" dependency-version: 30.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: jsdom dependency-version: 29.1.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: lint-staged dependency-version: 17.0.8 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: react-i18next dependency-version: 17.0.8 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: webpack-cli dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/preinstall-always-fail" dependency-version: 3.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: eslint-plugin-jsdoc dependency-version: 63.0.10 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@blockaid/client" dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@sentry/browser" dependency-version: 10.62.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@stellar/typescript-wallet-sdk-km" dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/jsdom" dependency-version: 28.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/node" dependency-version: 26.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: concurrently dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: copy-webpack-plugin dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: dotenv-webpack dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next dependency-version: 26.3.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next-scanner-webpack dependency-version: 1.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: jest-environment-jsdom dependency-version: 30.4.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: js-yaml dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: sass-loader dependency-version: 17.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: ses dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@sentry/webpack-plugin" dependency-version: 5.3.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: shadcn dependency-version: 4.12.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@blockaid/client" dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@sentry/browser" dependency-version: 10.62.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@stellar/typescript-wallet-sdk-km" dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/jsdom" dependency-version: 28.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/node" dependency-version: 26.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: concurrently dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: copy-webpack-plugin dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: dotenv-webpack dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next dependency-version: 26.3.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next-scanner-webpack dependency-version: 1.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: jest-environment-jsdom dependency-version: 30.4.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: js-yaml dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: sass-loader dependency-version: 17.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: ses dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@sentry/webpack-plugin" dependency-version: 5.3.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: shadcn dependency-version: 4.12.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@blockaid/client" dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@blockaid/client" dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@amplitude/analytics-browser" dependency-version: 2.44.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: major - dependency-name: "@amplitude/experiment-js-client" dependency-version: 1.21.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: major - dependency-name: "@sentry/browser" dependency-version: 10.62.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@stellar/typescript-wallet-sdk-km" dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/jsdom" dependency-version: 28.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/node" dependency-version: 26.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: concurrently dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: copy-webpack-plugin dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: dotenv-webpack dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next dependency-version: 26.3.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next-scanner-webpack dependency-version: 1.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: jest-environment-jsdom dependency-version: 30.4.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: js-yaml dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: sass-loader dependency-version: 17.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: ses dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@sentry/webpack-plugin" dependency-version: 5.3.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: shadcn dependency-version: 4.12.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@sentry/browser" dependency-version: 10.62.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@stellar/typescript-wallet-sdk-km" dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/jsdom" dependency-version: 28.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@types/node" dependency-version: 26.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: bignumber.js dependency-version: 11.1.4 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: concurrently dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: copy-webpack-plugin dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: dotenv-webpack dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next dependency-version: 26.3.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: i18next-scanner-webpack dependency-version: 1.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: jest-environment-jsdom dependency-version: 30.4.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: js-yaml dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: sass-loader dependency-version: 17.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: ses dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: "@lavamoat/allow-scripts" dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: "@sentry/webpack-plugin" dependency-version: 5.3.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major - dependency-name: shadcn dependency-version: 4.12.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: major ... Signed-off-by: dependabot[bot] --- @shared/api/package.json | 8 +- @shared/constants/package.json | 4 +- @shared/helpers/package.json | 4 +- @stellar/freighter-api/package.json | 2 +- docs/package.json | 2 +- extension/package.json | 38 +- package.json | 48 +- yarn.lock | 7366 ++++++++++++++++----------- 8 files changed, 4312 insertions(+), 3160 deletions(-) diff --git a/@shared/api/package.json b/@shared/api/package.json index abb8f8423a..afda5bcf6b 100644 --- a/@shared/api/package.json +++ b/@shared/api/package.json @@ -4,17 +4,17 @@ "version": "1.0.0", "private": true, "dependencies": { - "@blockaid/client": "0.31.0", + "@blockaid/client": "1.4.0", "@stellar/js-xdr": "4.0.0", - "bignumber.js": "9.3.0", + "bignumber.js": "11.1.4", "prettier": "3.8.4", "stellar-sdk": "npm:@stellar/stellar-sdk@16.0.0-rc.1", "stellar-sdk-next": "npm:@stellar/stellar-sdk@16.0.0-rc.1", - "typescript": "5.8.3", + "typescript": "6.0.3", "webextension-polyfill": "0.12.0" }, "devDependencies": { - "@lavamoat/allow-scripts": "3.3.2" + "@lavamoat/allow-scripts": "5.1.0" }, "lavamoat": { "allowScripts": { diff --git a/@shared/constants/package.json b/@shared/constants/package.json index 9f1f5e0377..bfecd60822 100644 --- a/@shared/constants/package.json +++ b/@shared/constants/package.json @@ -5,10 +5,10 @@ "dependencies": { "stellar-sdk": "npm:@stellar/stellar-sdk@16.0.0-rc.1", "stellar-sdk-next": "npm:@stellar/stellar-sdk@16.0.0-rc.1", - "typescript": "5.8.3" + "typescript": "6.0.3" }, "devDependencies": { - "@lavamoat/allow-scripts": "3.3.2" + "@lavamoat/allow-scripts": "5.1.0" }, "lavamoat": { "allowScripts": { diff --git a/@shared/helpers/package.json b/@shared/helpers/package.json index 1eefcce788..6ebfd2444b 100644 --- a/@shared/helpers/package.json +++ b/@shared/helpers/package.json @@ -3,9 +3,9 @@ "prettier": "../../.prettierrc.yaml", "version": "1.0.0", "dependencies": { - "bignumber.js": "9.3.0", + "bignumber.js": "11.1.4", "stellar-sdk": "npm:@stellar/stellar-sdk@16.0.0-rc.1", "stellar-sdk-next": "npm:@stellar/stellar-sdk@16.0.0-rc.1", - "typescript": "5.8.3" + "typescript": "6.0.3" } } diff --git a/@stellar/freighter-api/package.json b/@stellar/freighter-api/package.json index 88aab8740d..95de8530a2 100644 --- a/@stellar/freighter-api/package.json +++ b/@stellar/freighter-api/package.json @@ -20,6 +20,6 @@ "semver": "7.8.4" }, "devDependencies": { - "@lavamoat/allow-scripts": "3.3.2" + "@lavamoat/allow-scripts": "5.1.0" } } diff --git a/docs/package.json b/docs/package.json index a3565aa082..72aea90f5b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -36,7 +36,7 @@ "styled-components": "6.4.2" }, "devDependencies": { - "@lavamoat/allow-scripts": "3.3.2" + "@lavamoat/allow-scripts": "5.1.0" }, "lavamoat": { "allowScripts": { diff --git a/extension/package.json b/extension/package.json index 1b67d6541a..3e48664636 100644 --- a/extension/package.json +++ b/extension/package.json @@ -15,26 +15,26 @@ "test:e2e": "playwright test" }, "dependencies": { - "@amplitude/analytics-browser": "^2.37.0", - "@amplitude/experiment-js-client": "^1.20.3", + "@amplitude/analytics-browser": "^2.44.3", + "@amplitude/experiment-js-client": "^1.21.1", "@ledgerhq/hw-app-str": "7.7.4", "@ledgerhq/hw-transport-webhid": "6.35.4", "@radix-ui/react-dialog": "1.1.16", "@radix-ui/react-popover": "1.1.16", "@reduxjs/toolkit": "2.12.0", - "@sentry/browser": "9.13.0", + "@sentry/browser": "10.62.0", "@shared/api": "1.0.0", "@shared/constants": "1.0.0", "@shared/helpers": "1.0.0", "@stellar/design-system": "3.2.8", - "@stellar/typescript-wallet-sdk-km": "1.9.0", + "@stellar/typescript-wallet-sdk-km": "3.0.1", "@tailwindcss/postcss": "4.3.1", "@testing-library/react": "16.3.2", "@testing-library/user-event": "14.6.1", "@types/chrome": "0.1.43", - "@types/jsdom": "21.1.7", + "@types/jsdom": "28.0.3", "@types/lodash": "4.17.24", - "@types/node": "22.14.1", + "@types/node": "26.0.1", "@types/qrcode.react": "3.0.0", "@types/react": "19.2.17", "@types/react-copy-to-clipboard": "5.0.7", @@ -44,24 +44,24 @@ "@types/redux": "3.6.31", "@types/webextension-polyfill": "0.12.5", "@types/yup": "0.32.0", - "bignumber.js": "9.3.0", + "bignumber.js": "11.1.4", "buffer": "6.0.3", "classnames": "2.5.1", - "concurrently": "9.1.2", - "copy-webpack-plugin": "13.0.0", + "concurrently": "10.0.3", + "copy-webpack-plugin": "14.0.0", "css-loader": "7.1.4", - "dotenv-webpack": "8.1.0", + "dotenv-webpack": "9.0.0", "fetch": "1.1.0", "formik": "2.4.9", "html-loader": "5.1.0", "html-webpack-plugin": "5.6.7", - "i18next": "25.0.1", + "i18next": "26.3.3", "i18next-browser-languagedetector": "8.2.1", "i18next-resources-to-backend": "1.2.1", - "i18next-scanner-webpack": "0.9.1", + "i18next-scanner-webpack": "1.0.0", "jest-canvas-mock": "2.5.2", - "jest-environment-jsdom": "29.7.0", - "js-yaml": "4.2.0", + "jest-environment-jsdom": "30.4.1", + "js-yaml": "5.2.0", "jsonschema": "1.5.0", "lodash": "4.18.1", "mini-css-extract-plugin": "2.10.2", @@ -78,9 +78,9 @@ "react-router-dom": "7.17.0", "redux": "5.0.1", "sass": "1.101.0", - "sass-loader": "16.0.5", + "sass-loader": "17.0.0", "semver": "7.8.4", - "ses": "1.12.0", + "ses": "2.2.0", "sonner": "2.0.7", "soroswap-router-sdk": "1.4.6", "stellar-hd-wallet": "1.0.2", @@ -95,9 +95,9 @@ "yup": "1.7.1" }, "devDependencies": { - "@lavamoat/allow-scripts": "3.3.2", + "@lavamoat/allow-scripts": "5.1.0", "@playwright/test": "1.61.0", - "@sentry/webpack-plugin": "3.3.1", + "@sentry/webpack-plugin": "5.3.0", "@svgr/webpack": "8.1.0", "@types/js-yaml": "4.0.9", "@types/semver": "7.7.1", @@ -108,7 +108,7 @@ "postcss": "8.5.15", "postcss-loader": "8.2.1", "process": "0.11.10", - "shadcn": "3.8.4", + "shadcn": "4.12.0", "speed-measure-webpack-plugin": "1.6.0", "stream-browserify": "3.0.0", "stream-http": "3.2.0", diff --git a/package.json b/package.json index 8def9f4299..76a4ca129e 100644 --- a/package.json +++ b/package.json @@ -61,16 +61,16 @@ ] }, "dependencies": { - "@actions/core": "1.11.1", - "@babel/core": "7.29.7", - "@babel/eslint-parser": "7.29.7", + "@actions/core": "3.0.1", + "@babel/core": "8.0.1", + "@babel/eslint-parser": "8.0.1", "@babel/plugin-proposal-optional-chaining": "7.21.0", - "@babel/preset-env": "7.29.7", - "@babel/preset-react": "7.29.7", - "@babel/preset-typescript": "7.29.7", + "@babel/preset-env": "8.0.2", + "@babel/preset-react": "8.0.1", + "@babel/preset-typescript": "8.0.1", "@testing-library/dom": "10.4.1", "@testing-library/jest-dom": "6.9.1", - "@types/jest": "29.5.14", + "@types/jest": "30.0.0", "@types/react": "19.2.17", "@types/react-dom": "19.2.3", "@types/styled-components": "5.1.4", @@ -78,45 +78,45 @@ "@typescript-eslint/parser": "8.61.0", "@vercel/ncc": "0.44.0", "babel-eslint": "10.x", - "babel-jest": "29.7.0", + "babel-jest": "30.4.1", "babel-loader": "10.1.1", "babel-plugin-dynamic-import-node": "2.3.3", "babel-polyfill": "6.26.0", - "eslint": "9.18.0", + "eslint": "10.6.0", "eslint-config-prettier": "10.1.8", "eslint-config-react": "1.1.7", - "eslint-import-resolver-typescript": "3.7.0", + "eslint-import-resolver-typescript": "4.4.5", "eslint-plugin-import": "2.32.0", "eslint-plugin-jsx-a11y": "6.x", "eslint-plugin-prettier": "5.5.6", "eslint-plugin-react": "7.37.5", - "eslint-plugin-react-hooks": "5.1.0", - "eslint-webpack-plugin": "5.0.0", - "glob": "12.0.0", - "globals": "16.0.0", - "got": "14.4.5", + "eslint-plugin-react-hooks": "7.1.1", + "eslint-webpack-plugin": "6.0.0", + "glob": "13.0.6", + "globals": "17.7.0", + "got": "15.0.6", "husky": "9.1.7", "isomorphic-unfetch": "4.0.2", - "jest": "29.7.0", + "jest": "30.4.2", "jest-localstorage-mock": "2.4.26", - "jsdom": "26.0.0", + "jsdom": "29.1.1", "jsdom-global": "3.0.2", - "lint-staged": "15.4.1", + "lint-staged": "17.0.8", "npm-run-all": "4.1.5", "prettier": "3.8.4", "pretty-quick": "4.2.2", - "react-i18next": "15.4.1", + "react-i18next": "17.0.8", "ts-loader": "9.6.0", - "typescript": "5.7.3", + "typescript": "6.0.3", "webpack": "5.107.2", - "webpack-cli": "6.0.1", + "webpack-cli": "7.1.0", "webpack-dev-server": "5.2.5", "webpack-merge": "6.0.1" }, "devDependencies": { - "@lavamoat/allow-scripts": "3.3.1", - "@lavamoat/preinstall-always-fail": "2.1.0", - "eslint-plugin-jsdoc": "50.6.2", + "@lavamoat/allow-scripts": "5.1.0", + "@lavamoat/preinstall-always-fail": "3.0.0", + "eslint-plugin-jsdoc": "63.0.10", "eslint-plugin-prefer-arrow": "1.2.3", "jest-fixed-jsdom": "0.0.11" }, diff --git a/yarn.lock b/yarn.lock index 35b6640e3d..7623b7ec04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,39 +5,39 @@ __metadata: version: 8 cacheKey: 10c0 -"@actions/core@npm:1.11.1": - version: 1.11.1 - resolution: "@actions/core@npm:1.11.1" +"@actions/core@npm:3.0.1": + version: 3.0.1 + resolution: "@actions/core@npm:3.0.1" dependencies: - "@actions/exec": "npm:^1.1.1" - "@actions/http-client": "npm:^2.0.1" - checksum: 10c0/9aa30b397d8d0dbc74e69fe46b23fb105cab989beb420c57eacbfc51c6804abe8da0f46973ca9f639d532ea4c096d0f4d37da0223fbe94f304fa3c5f53537c30 + "@actions/exec": "npm:^3.0.0" + "@actions/http-client": "npm:^4.0.0" + checksum: 10c0/c1b86364e923e8b1bdcd338943d453c114b2cd8eb9507e07b7614679ea15ddf938b3bb75484aaf363bc3aa55ba926b9514ec08d79811a991f75c732a76c4d854 languageName: node linkType: hard -"@actions/exec@npm:^1.1.1": - version: 1.1.1 - resolution: "@actions/exec@npm:1.1.1" +"@actions/exec@npm:^3.0.0": + version: 3.0.0 + resolution: "@actions/exec@npm:3.0.0" dependencies: - "@actions/io": "npm:^1.0.1" - checksum: 10c0/4a09f6bdbe50ce68b5cf8a7254d176230d6a74bccf6ecc3857feee209a8c950ba9adec87cc5ecceb04110182d1c17117234e45557d72fde6229b7fd3a395322a + "@actions/io": "npm:^3.0.2" + checksum: 10c0/5e4357cd8538ae8d94ffef653559202e7d18db18c5ecccd2c943b4aab989df9cf4e466fcc3c4405887a3c30b88e87b89fb7c7f5b179622d1192525ec891f0274 languageName: node linkType: hard -"@actions/http-client@npm:^2.0.1": - version: 2.2.3 - resolution: "@actions/http-client@npm:2.2.3" +"@actions/http-client@npm:^4.0.0": + version: 4.0.1 + resolution: "@actions/http-client@npm:4.0.1" dependencies: tunnel: "npm:^0.0.6" - undici: "npm:^5.25.4" - checksum: 10c0/13141b66a42aa4afd8c50f7479e13a5cdb5084ccb3c73ec48894b8029743389a3d2bf8cdc18e23fb70cd33995740526dd308815613907571e897c3aa1e5eada6 + undici: "npm:^6.23.0" + checksum: 10c0/2470880a461e00bfeee13462f05f089542af2a6da02bfd73422c549119a5078fbf2cc0c6d3f64d4e5a9df5aeef7f0cf08925a41793c136631ac2ec55dc7a697d languageName: node linkType: hard -"@actions/io@npm:^1.0.1": - version: 1.1.3 - resolution: "@actions/io@npm:1.1.3" - checksum: 10c0/5b8751918e5bf0bebd923ba917fb1c0e294401e7ff0037f32c92a4efa4215550df1f6633c63fd4efb2bdaae8711e69b9e36925857db1f38935ff62a5c92ec29e +"@actions/io@npm:^3.0.2": + version: 3.0.2 + resolution: "@actions/io@npm:3.0.2" + checksum: 10c0/25fae323886544f965e90ab9655e3fb60816eb379c78418c4b06a5dc9da27810eb5b0bd0629146dbd5482a03e3c60a5b8713223e4f789abede23df643ddcae8c languageName: node linkType: hard @@ -422,26 +422,6 @@ __metadata: languageName: node linkType: hard -"@antfu/ni@npm:^25.0.0": - version: 25.0.0 - resolution: "@antfu/ni@npm:25.0.0" - dependencies: - ansis: "npm:^4.0.0" - fzf: "npm:^0.5.2" - package-manager-detector: "npm:^1.3.0" - tinyexec: "npm:^1.0.1" - bin: - na: bin/na.mjs - nci: bin/nci.mjs - ni: bin/ni.mjs - nlx: bin/nlx.mjs - nr: bin/nr.mjs - nun: bin/nun.mjs - nup: bin/nup.mjs - checksum: 10c0/a6e5eae4fafde9112088fcb41c3c5aa2e4a8b9a5252ff61ef8c4140c92e57cc85b0a02af48c1d460c66b6ec8adc109395544eaa63942b9af5954e82fdc36f2ea - languageName: node - linkType: hard - "@asamuzakjp/css-color@npm:^3.2.0": version: 3.2.0 resolution: "@asamuzakjp/css-color@npm:3.2.0" @@ -455,7 +435,47 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.29.7": +"@asamuzakjp/css-color@npm:^5.1.11": + version: 5.1.11 + resolution: "@asamuzakjp/css-color@npm:5.1.11" + dependencies: + "@asamuzakjp/generational-cache": "npm:^1.0.1" + "@csstools/css-calc": "npm:^3.2.0" + "@csstools/css-color-parser": "npm:^4.1.0" + "@csstools/css-parser-algorithms": "npm:^4.0.0" + "@csstools/css-tokenizer": "npm:^4.0.0" + checksum: 10c0/32720bdff8daea6a8847aba6cdfae55baa3b4a2690b51d21db7f0382bbd183f3d9f2d5126df50afd889062635684b2819e47113629ee2e80c99389e75f48d060 + languageName: node + linkType: hard + +"@asamuzakjp/dom-selector@npm:^7.1.1": + version: 7.1.1 + resolution: "@asamuzakjp/dom-selector@npm:7.1.1" + dependencies: + "@asamuzakjp/generational-cache": "npm:^1.0.1" + "@asamuzakjp/nwsapi": "npm:^2.3.9" + bidi-js: "npm:^1.0.3" + css-tree: "npm:^3.2.1" + is-potential-custom-element-name: "npm:^1.0.1" + checksum: 10c0/8cec1c618781c94de5836a215bbe5aafb4d8b835b18c51faf8547f4574afa39f92def3951e40123860062467613dd825f1e1600ff32e8045cc099a91796dcfb8 + languageName: node + linkType: hard + +"@asamuzakjp/generational-cache@npm:^1.0.1": + version: 1.0.1 + resolution: "@asamuzakjp/generational-cache@npm:1.0.1" + checksum: 10c0/1de62de43764e13fca3b9a31b7ea9b1bf0780fe053d266e40378a19ff8c66b543e011e6a0df02d410cd59bf981126706f176cdbb938985165202c4a079fe1057 + languageName: node + linkType: hard + +"@asamuzakjp/nwsapi@npm:^2.3.9": + version: 2.3.9 + resolution: "@asamuzakjp/nwsapi@npm:2.3.9" + checksum: 10c0/869b81382e775499c96c45c6dbe0d0766a6da04bcf0abb79f5333535c4e19946851acaa43398f896e2ecc5a1de9cf3db7cf8c4b1afac1ee3d15e21584546d74d + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.27.1, @babel/code-frame@npm:^7.29.7": version: 7.29.7 resolution: "@babel/code-frame@npm:7.29.7" dependencies: @@ -466,6 +486,16 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/code-frame@npm:8.0.0" + dependencies: + "@babel/helper-validator-identifier": "npm:^8.0.0" + js-tokens: "npm:^10.0.0" + checksum: 10c0/2ea8614018bcd8c86358ab6aa930508115d2205e5e111f736d355b150453818bdf487850f6dec5ec92a10bf27ba4536f4b3b8ad9204514e43d8d68ff2e542443 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.28.6, @babel/compat-data@npm:^7.29.7": version: 7.29.7 resolution: "@babel/compat-data@npm:7.29.7" @@ -473,7 +503,38 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:7.29.7, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.18.5, @babel/core@npm:^7.21.3, @babel/core@npm:^7.23.9, @babel/core@npm:^7.25.9, @babel/core@npm:^7.28.0": +"@babel/compat-data@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/compat-data@npm:8.0.0" + checksum: 10c0/8d934415a308cf6c893d815b1dbb79faf7678c1e489934e81025c61673bf98ef88770b42297492bbd4c014978688012aa635e855bf8553b96ec8287bddfbae89 + languageName: node + linkType: hard + +"@babel/core@npm:8.0.1": + version: 8.0.1 + resolution: "@babel/core@npm:8.0.1" + dependencies: + "@babel/code-frame": "npm:^8.0.0" + "@babel/generator": "npm:^8.0.0" + "@babel/helper-compilation-targets": "npm:^8.0.0" + "@babel/helpers": "npm:^8.0.0" + "@babel/parser": "npm:^8.0.0" + "@babel/template": "npm:^8.0.0" + "@babel/traverse": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + "@types/gensync": "npm:^1.0.5" + convert-source-map: "npm:^2.0.0" + empathic: "npm:^2.0.1" + gensync: "npm:^1.0.0-beta.2" + import-meta-resolve: "npm:^4.2.0" + json5: "npm:^2.2.3" + obug: "npm:^2.1.1" + semver: "npm:^7.7.3" + checksum: 10c0/e7fd9266d22906132fb052383a624358f54268dade31d50264416afeab6e5648cd23c7e845a89a501d270b80601d6e89abc67de0a9f1f55133f4abd8ac745be7 + languageName: node + linkType: hard + +"@babel/core@npm:^7.18.5, @babel/core@npm:^7.21.3, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.4, @babel/core@npm:^7.25.9, @babel/core@npm:^7.27.4, @babel/core@npm:^7.28.0": version: 7.29.7 resolution: "@babel/core@npm:7.29.7" dependencies: @@ -496,21 +557,21 @@ __metadata: languageName: node linkType: hard -"@babel/eslint-parser@npm:7.29.7": - version: 7.29.7 - resolution: "@babel/eslint-parser@npm:7.29.7" +"@babel/eslint-parser@npm:8.0.1": + version: 8.0.1 + resolution: "@babel/eslint-parser@npm:8.0.1" dependencies: - "@nicolo-ribaudo/eslint-scope-5-internals": "npm:5.1.1-v1" - eslint-visitor-keys: "npm:^2.1.0" - semver: "npm:^6.3.1" + eslint-scope: "npm:^9.1.0" + eslint-visitor-keys: "npm:^5.0.0" + semver: "npm:^7.7.3" peerDependencies: - "@babel/core": ^7.11.0 - eslint: ^7.5.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/c24dcd941b0a149b197a9e9c3297a01d621775ac71cdf2e1134b1097c1691b46ce969355e1be3676d83b88f62c43ed33cf3a499da21ea11a5eb07339ce64ac20 + "@babel/core": ^8.0.0 + eslint: ^9.0.0 || ^10.0.0 + checksum: 10c0/dc8b848a11918069c112be60ba8f42dd963581bcd9664edbda184393b9a1a5a8424596e9b17b6691ac2f7d223a01dd300f5a574e58a46fa13dac6ade6d77b272 languageName: node linkType: hard -"@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.29.7, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.27.5, @babel/generator@npm:^7.29.7": version: 7.29.7 resolution: "@babel/generator@npm:7.29.7" dependencies: @@ -523,6 +584,20 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/generator@npm:8.0.0" + dependencies: + "@babel/parser": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + "@jridgewell/gen-mapping": "npm:^0.3.12" + "@jridgewell/trace-mapping": "npm:^0.3.28" + "@types/jsesc": "npm:^2.5.0" + jsesc: "npm:^3.0.2" + checksum: 10c0/2b2d171beaedcacca62164f0f39bc8962df5f9700a54c5515174276ea20b3a53933e9804e0b35c2be1059108a764447d99d0c5beb63ecbbf8c66035ca6c003c4 + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-annotate-as-pure@npm:7.29.7" @@ -532,6 +607,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-annotate-as-pure@npm:8.0.0" + dependencies: + "@babel/types": "npm:^8.0.0" + checksum: 10c0/3705ef8d1e95d86f3bb3380a9fb45a92be03eb77dfc5a684295dbdeb65e93c681516e98f5a6cbdc5f67186a68e3dae3e0528012ad4e626ed46853ad1e0bfd1c7 + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.28.6, @babel/helper-compilation-targets@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-compilation-targets@npm:7.29.7" @@ -545,6 +629,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-compilation-targets@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-compilation-targets@npm:8.0.0" + dependencies: + "@babel/compat-data": "npm:^8.0.0" + "@babel/helper-validator-option": "npm:^8.0.0" + browserslist: "npm:^4.24.0" + lru-cache: "npm:^11.0.0" + semver: "npm:^7.7.3" + checksum: 10c0/871876b4a9de1a2be68f2ec6c7576933dd9a8452bfb3c02ebcc16939791b8f2ab7467686e40060c6abfbb44bd76f898972e53034c3e7626a686a656f3a8d3bc9 + languageName: node + linkType: hard + "@babel/helper-create-class-features-plugin@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-create-class-features-plugin@npm:7.29.7" @@ -562,6 +659,23 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-class-features-plugin@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/helper-create-class-features-plugin@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + "@babel/helper-member-expression-to-functions": "npm:^8.0.0" + "@babel/helper-optimise-call-expression": "npm:^8.0.0" + "@babel/helper-replace-supers": "npm:^8.0.1" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0" + "@babel/traverse": "npm:^8.0.0" + semver: "npm:^7.7.3" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/ead1f980e3f400a87cd1f77e29789d3a85f6b322df51e59c20d21eb42745699561b6ffec6aa42877ad08c59a5e5bf5fc3d660b3a8518178d2a4e246d8bad4c4b + languageName: node + linkType: hard + "@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.29.7" @@ -575,6 +689,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-regexp-features-plugin@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/helper-create-regexp-features-plugin@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + regexpu-core: "npm:^6.3.1" + semver: "npm:^7.7.3" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/6eaebface05ff519808d559f2915efd84c9894304b0b6ec0e6702561dcc0283a44c2dbf5c176028cd0af8f29f117d5169dfd88ea3df69b7116fe5c66582076e8 + languageName: node + linkType: hard + "@babel/helper-define-polyfill-provider@npm:^0.6.5, @babel/helper-define-polyfill-provider@npm:^0.6.8": version: 0.6.8 resolution: "@babel/helper-define-polyfill-provider@npm:0.6.8" @@ -590,6 +717,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-define-polyfill-provider@npm:^1.0.0": + version: 1.0.0 + resolution: "@babel/helper-define-polyfill-provider@npm:1.0.0" + dependencies: + "@babel/helper-compilation-targets": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.0" + lodash.debounce: "npm:^4.0.8" + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0 + checksum: 10c0/9a422f6b8c5f3fb2cb862d189c19b521f4bae6f555e196e6635f6b7f870178f5dee14e2b8e51695bd5351ae2f6073f4ff1161dc873d45e9462534ce7240c6ad3 + languageName: node + linkType: hard + "@babel/helper-globals@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-globals@npm:7.29.7" @@ -597,6 +737,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-globals@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-globals@npm:8.0.0" + checksum: 10c0/c53a9fcf451df5c8d3aa72f282d1f058e2874e2ccbbdbb5572a805595d75a9355461822d01a6cac3128f5d9ab9a3a99538c6be4ebd728068afb20a65a4d1d986 + languageName: node + linkType: hard + "@babel/helper-member-expression-to-functions@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-member-expression-to-functions@npm:7.29.7" @@ -607,6 +754,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-member-expression-to-functions@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-member-expression-to-functions@npm:8.0.0" + dependencies: + "@babel/traverse": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + checksum: 10c0/7cf5d0344a014c8315136689f4db8e23d96c90fceb86beab695e79c5cb5fd69f8400b84547d4ee1cf43d8c88c90092828f278e3f8c8e1e2adb8abb92b971c9d0 + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.27.1, @babel/helper-module-imports@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-module-imports@npm:7.29.7" @@ -617,6 +774,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-module-imports@npm:8.0.0" + dependencies: + "@babel/traverse": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + checksum: 10c0/32ea7bb4eaecb23674cf21bd2acf7ae5c6fbbc5decaedb461e811b543b47b3eb95918aa1f2bed6586ba13a7c60fb2c9b88a399958e00320d7d1b67f8b2ef6590 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-module-transforms@npm:7.29.7" @@ -630,6 +797,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/helper-module-transforms@npm:8.0.1" + dependencies: + "@babel/helper-module-imports": "npm:^8.0.0" + "@babel/helper-validator-identifier": "npm:^8.0.0" + "@babel/traverse": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/2701c23bf2edf679182e0998c938792127adb952765fb07c1096e0ec772a04fb3b54b761d9c69f63c6745a6322f303a45b5eae652868b764771c0550146aec5f + languageName: node + linkType: hard + "@babel/helper-optimise-call-expression@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-optimise-call-expression@npm:7.29.7" @@ -639,6 +819,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-optimise-call-expression@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-optimise-call-expression@npm:8.0.0" + dependencies: + "@babel/types": "npm:^8.0.0" + checksum: 10c0/8871c1a17ed816f6728b3ec4941c1922a7bcf8e1b293a592a90ff62525460b05b82405938ca9d2c9adcc66b7f28eaf138e43388d807395a14317b7ba1b55c9fe + languageName: node + linkType: hard + "@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.27.1, @babel/helper-plugin-utils@npm:^7.28.6, @babel/helper-plugin-utils@npm:^7.29.7, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.29.7 resolution: "@babel/helper-plugin-utils@npm:7.29.7" @@ -646,6 +835,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^8.0.0, @babel/helper-plugin-utils@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/helper-plugin-utils@npm:8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/ec56d98187a58dfbc2ce9d75fd5f880d6acacefb314e32fe40c57293c6c65c659fa116c665e430aff8b153b7d0ea63f16ca290e9d2283196e3c7a3dd61bffa94 + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-remap-async-to-generator@npm:7.29.7" @@ -659,6 +857,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-remap-async-to-generator@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/helper-remap-async-to-generator@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + "@babel/helper-wrap-function": "npm:^8.0.0" + "@babel/traverse": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/263135f5ddec7f249d7d91f7532fdbeb8e34bd1f44bb01ba7b02fb05d18a670c41c5098c532f4901241ec1904dd4fe3aafdaa6b5940c9f678c9926256eb0bd3a + languageName: node + linkType: hard + "@babel/helper-replace-supers@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-replace-supers@npm:7.29.7" @@ -672,6 +883,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-replace-supers@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/helper-replace-supers@npm:8.0.1" + dependencies: + "@babel/helper-member-expression-to-functions": "npm:^8.0.0" + "@babel/helper-optimise-call-expression": "npm:^8.0.0" + "@babel/traverse": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/1289ab0f58c6f5150f5d5caf627de9a1e20b32d08bf1b9c90569aca7b0c32779482fadb1c38142b50f98a3794c9ac175fd4184a5fccc2edc76769f16c4dbaf14 + languageName: node + linkType: hard + "@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.29.7" @@ -682,6 +906,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-skip-transparent-expression-wrappers@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:8.0.0" + dependencies: + "@babel/traverse": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + checksum: 10c0/b66b8db1438efd7754eeb5d1198f2a6c34f19c06f76af057c480ae354c5f4d1488f6ca92c581d957f28d16881f931a1092b5a70c893924a1158258384d9f6597 + languageName: node + linkType: hard + "@babel/helper-string-parser@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-string-parser@npm:7.29.7" @@ -689,6 +923,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-string-parser@npm:8.0.0" + checksum: 10c0/b2272a9eaa63a1bc9ce2673d580e69620fd79786f3e3cf1891f406801f8211810f194f2739fef920f01a97ae06ae465b2dfd238ab8037a3182d0869939ca9a5d + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-validator-identifier@npm:7.29.7" @@ -696,6 +937,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^8.0.0": + version: 8.0.2 + resolution: "@babel/helper-validator-identifier@npm:8.0.2" + checksum: 10c0/629eda2a0a99442a1628bbef5f9fd8e26c1aa21ddbf02760d1c482b737932b1bb21fb1f89aacf9c3cf0642b481b810e39f94b8ae9aa44fc4f5516ebec6798b7b + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-validator-option@npm:7.29.7" @@ -703,6 +951,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-validator-option@npm:8.0.0" + checksum: 10c0/eb466b464479f75c15ba06f6c53862f10d90740350c9203b3d81c6f33d4193bf0a7b7b89de901f256fb639a1346475b48616734af89906d6b4fcf9a856d9f1f1 + languageName: node + linkType: hard + "@babel/helper-wrap-function@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helper-wrap-function@npm:7.29.7" @@ -714,6 +969,17 @@ __metadata: languageName: node linkType: hard +"@babel/helper-wrap-function@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helper-wrap-function@npm:8.0.0" + dependencies: + "@babel/template": "npm:^8.0.0" + "@babel/traverse": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + checksum: 10c0/c290ab9e2bc9d22134ed9870e26854425cd9ba9a3795dc5a0fcc01746970302ad6162cf87d57a3e8708117d71c0ffa0fdb2df1d20af0534431837052603909a5 + languageName: node + linkType: hard + "@babel/helpers@npm:^7.29.7": version: 7.29.7 resolution: "@babel/helpers@npm:7.29.7" @@ -724,7 +990,17 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.29.7, @babel/parser@npm:^7.7.0": +"@babel/helpers@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/helpers@npm:8.0.0" + dependencies: + "@babel/template": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + checksum: 10c0/5d649bf2cfc37b76b8c9dd7d2992fa0503a6081c2439cd4de16b56abb778f3bb391441d687594f3e08af5ef3f59c8b93a77ae81f9e5f831989ebfd3443851189 + languageName: node + linkType: hard + +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.29.7, @babel/parser@npm:^7.7.0": version: 7.29.7 resolution: "@babel/parser@npm:7.29.7" dependencies: @@ -735,6 +1011,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/parser@npm:8.0.0" + dependencies: + "@babel/types": "npm:^8.0.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/f10665bf3289f4bdc43bc58c482d6baa9fc4e306460d1bc57b059486dc9f23ed4463e746f62d721396466e2a2e0b32d856648b8c30dedbf6b69787b430f21e75 + languageName: node + linkType: hard + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.29.7" @@ -747,6 +1034,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/b08dde23715b5970e73319316d2357e1675702acdf92a4670df3c9b2d23b3003a5cc6f0b5c8fd8ea550fe9f78f5d41eb2e9ad6ea3eaf9a33e14eb0a7e380cde5 + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.29.7" @@ -758,6 +1056,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/85211197d91adb8c0bdccf2dcd7c4deb683a7f0586de40433247a77f3ca8ac01b6fe643fca267a1dd71117cc616670d313e01d3e0402d32288bd5d7f11f99128 + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.29.7" @@ -769,6 +1078,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/cefca5cacfa4fc5c0b2aa4f457f285d59bd6a828f1ba08800b40c1799438f754469b24e4228ab6e8f17fee0c068a123cd1b5f9c6828791bf7b23819f7c124415 + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:7.29.7" @@ -781,6 +1101,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/48ac670a9aae75899afb5122aad31de60871bf252643c45f277de9bac2e3ba61e6bd16dc7b0099a2a583190dafe0d15f25baf98ac93b8f1dce382e16c9e26437 + languageName: node + linkType: hard + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.29.7" @@ -794,6 +1126,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0" + "@babel/plugin-transform-optional-chaining": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/a9bd4acab80291b833e64403060ba50ca1ddae30e017d17433b4be58528b8a4cb13fcb29de30c075147bbeb65a9c154d540db92236c0c19d9ae0f88b3ea214e5 + languageName: node + linkType: hard + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.29.7" @@ -806,6 +1151,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/885b3f574dae871c9c95a00b47e3f41eb4fd5db55633534c3f7d696158512e772be9b469dad57508446e5df1982b19fdc8b211946d8fccfbf3d45cf9f61fe4f9 + languageName: node + linkType: hard + "@babel/plugin-proposal-optional-chaining@npm:7.21.0": version: 7.21.0 resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" @@ -927,7 +1283,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.29.7, @babel/plugin-syntax-jsx@npm:^7.7.2": +"@babel/plugin-syntax-jsx@npm:^7.27.1, @babel/plugin-syntax-jsx@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-syntax-jsx@npm:7.29.7" dependencies: @@ -938,6 +1294,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-jsx@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-syntax-jsx@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/24662fe43e67430504785472776839eb75e74ccabe21cdbf29ca2e1763e394be632b9d336f66fccc9f422de8638e179410e5b0b0796e85276fb8a8d7a7aab036 + languageName: node + linkType: hard + "@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" @@ -1026,7 +1393,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.29.7, @babel/plugin-syntax-typescript@npm:^7.7.2": +"@babel/plugin-syntax-typescript@npm:^7.27.1, @babel/plugin-syntax-typescript@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-syntax-typescript@npm:7.29.7" dependencies: @@ -1037,6 +1404,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-typescript@npm:^8.0.1": + version: 8.0.3 + resolution: "@babel/plugin-syntax-typescript@npm:8.0.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/d8c78e59d63efff9b26c6679238dd926a3f1ff68b97a473c9d4dbb60046cafad3858b6a8eba26c3c33bc66afbb6da5f16a5c70f4662137edf389a32c9995c225 + languageName: node + linkType: hard + "@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" @@ -1060,6 +1438,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-arrow-functions@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-arrow-functions@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/60ae1fc3e049b50bd94971fa4733ca79fb84573cedaf81e5bebf2682596eb46d9fcc28a6ee5115ce9376a6f644e0a192b59b343b016387e13474c769bdac3d66 + languageName: node + linkType: hard + "@babel/plugin-transform-async-generator-functions@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-async-generator-functions@npm:7.29.7" @@ -1073,6 +1462,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-async-generator-functions@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-async-generator-functions@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-remap-async-to-generator": "npm:^8.0.1" + "@babel/traverse": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/964e222c2c449908c27f883a24c745b1437f11fd05719abace1239b14a039a0ae9cfb01128b08be6c622079ff28186e0b765848d6cf7a5549fc7c1b1d86d61ee + languageName: node + linkType: hard + "@babel/plugin-transform-async-to-generator@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-async-to-generator@npm:7.29.7" @@ -1086,6 +1488,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-async-to-generator@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-async-to-generator@npm:8.0.1" + dependencies: + "@babel/helper-module-imports": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-remap-async-to-generator": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/b23365e1486683cfef1fa83b67131990faa0984529bcb032714c0d0885a11ce94d0e85eb5ff6d94a5975e2a32c49b5abef67b19c4bff38199779b6495f5e4bf9 + languageName: node + linkType: hard + "@babel/plugin-transform-block-scoped-functions@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.29.7" @@ -1097,6 +1512,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-block-scoped-functions@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-block-scoped-functions@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/507e9ddd59f25c449a29b2b64dea5cb2deddd429cb99c8ef0e6fd139ad4c91783a9ada596c5de769d7763df2a344c0288264cdde836ae53b28bc8b59b35cb744 + languageName: node + linkType: hard + "@babel/plugin-transform-block-scoping@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-block-scoping@npm:7.29.7" @@ -1108,6 +1534,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-block-scoping@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-block-scoping@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/593cbddb8535778d8bbc2ce2782ddde021d944eb790c0076b91798e9381f90d1f4ace7dc0fe81bcf763e5b5a033bef7369132abc3cf2338c3e3893b20c9b5f6a + languageName: node + linkType: hard + "@babel/plugin-transform-class-properties@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-class-properties@npm:7.29.7" @@ -1120,6 +1557,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-class-properties@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-class-properties@npm:8.0.1" + dependencies: + "@babel/helper-create-class-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/cbb877d4a6b293a2b4e13c25c443955f5840eff05f86c5d7e65986f9b84d6725d68855098277775b065b0c3f8c976fa5a8b238c57680003d3f1c48d5872825a1 + languageName: node + linkType: hard + "@babel/plugin-transform-class-static-block@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-class-static-block@npm:7.29.7" @@ -1132,8 +1581,20 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.29.7": - version: 7.29.7 +"@babel/plugin-transform-class-static-block@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-class-static-block@npm:8.0.1" + dependencies: + "@babel/helper-create-class-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/aaf976ac4e8615362d37dd144feb8f071b612cd354b7a7e36fa5ca43fa73311aba377b070f3bd4e47ac05201afc1b3d40a5c005ef6f12687b9a15c1952002f4e + languageName: node + linkType: hard + +"@babel/plugin-transform-classes@npm:^7.29.7": + version: 7.29.7 resolution: "@babel/plugin-transform-classes@npm:7.29.7" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.29.7" @@ -1148,6 +1609,22 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-classes@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-classes@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + "@babel/helper-compilation-targets": "npm:^8.0.0" + "@babel/helper-globals": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-replace-supers": "npm:^8.0.1" + "@babel/traverse": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/730767a5389bcf89b2ff9deef098f2934cb6670d87f87d828c9ef564d2f2d5ac82006f2b01395daf4a0f3a5523c848fc06bf61f18dd1a0a586fe739474228740 + languageName: node + linkType: hard + "@babel/plugin-transform-computed-properties@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-computed-properties@npm:7.29.7" @@ -1160,6 +1637,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-computed-properties@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-computed-properties@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/a8b1190b986ac9a57a74e85dfdf376811a0dca8a4d0f5a7f7e7c006bdbfb3fadc1ec7cd639f7258ef15de69fd2c9bf88f3d14dad1f9228cadb30bf4fa44a44e1 + languageName: node + linkType: hard + "@babel/plugin-transform-destructuring@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-destructuring@npm:7.29.7" @@ -1172,6 +1660,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-destructuring@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-destructuring@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/0cc3c9bfdedf46a4e480776b904d60857361cf5df66a31842fd6dbf84c219eb13d661e588b84f6efcbc07226706a0ed4e212f2f502102f39d61e7561e5c6f250 + languageName: node + linkType: hard + "@babel/plugin-transform-dotall-regex@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-dotall-regex@npm:7.29.7" @@ -1184,6 +1683,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-dotall-regex@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-dotall-regex@npm:8.0.1" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/18fb3c764a14c88649e8439a611b1d6ed00abcf1b92ced241da500a8fda38edef429607d9692f8954218f4b621f4d84847cc2ab0189586071f3d6b333280c108 + languageName: node + linkType: hard + "@babel/plugin-transform-duplicate-keys@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-duplicate-keys@npm:7.29.7" @@ -1195,6 +1706,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-duplicate-keys@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-duplicate-keys@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/bf563c83a546bf2b854627e1765a7dae4a52aa49af4c9dc0abdbcc1e552d64c91c6ebae5e88aab29c09cefadab050979a8186d4b312042c38a3f100bb4e22a63 + languageName: node + linkType: hard + "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.29.7" @@ -1207,6 +1729,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:8.0.1" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/220b756a9bfbf36b74341684681baa77b4bec62fb4d9ee95e09eda82690cbd1be62c60f694fc4d4dc2c90feadec2260bf9c7a2a1b5506a07d40e0fbc98d64539 + languageName: node + linkType: hard + "@babel/plugin-transform-dynamic-import@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-dynamic-import@npm:7.29.7" @@ -1218,6 +1752,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-dynamic-import@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-dynamic-import@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/fe94ccf78911a3a0c597bfe8440bb2d0fc2c2203af969d543fd32da562bda8cd25029921a1f21a4efd332faf71db9c8b0fca58b41b704bc9ec96313edd7619ae + languageName: node + linkType: hard + "@babel/plugin-transform-explicit-resource-management@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-explicit-resource-management@npm:7.29.7" @@ -1230,6 +1775,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-explicit-resource-management@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-explicit-resource-management@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/plugin-transform-destructuring": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/3f77e11eef61da2cd663727a6e1474016a834fc1b7a64b7a10c4a535930da6e4217af5d09964fb05c3a677423063785ad0b7f27bb46488f681550242ec5e4a6d + languageName: node + linkType: hard + "@babel/plugin-transform-exponentiation-operator@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.29.7" @@ -1241,6 +1798,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-exponentiation-operator@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-exponentiation-operator@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/ec6347ac1cc41597ce34a61063f5053fc94a33baf56c121da53b2d832457072a266fdb344b90c372ee0b010355216534574614e2a07b31382cac4ec89eb8afa4 + languageName: node + linkType: hard + "@babel/plugin-transform-export-namespace-from@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-export-namespace-from@npm:7.29.7" @@ -1252,6 +1820,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-export-namespace-from@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-export-namespace-from@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/c497acc33cfa66887bc47ed034d373f33ef2d5f7fb57259de3b239f7c1b3e3203a6ad99ceb3b96a4a52d422dc45bd02472dbf6b61d990916810f5e328667c69d + languageName: node + linkType: hard + "@babel/plugin-transform-for-of@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-for-of@npm:7.29.7" @@ -1264,6 +1843,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-for-of@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-for-of@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/791651692c0c37b91c9f92aba70a146a02402cf0ccd94eaee66ddde1c37c939c6b7e5123d255fa1ea1d3588df3733d50e71de548559cb531d90870227abb85bf + languageName: node + linkType: hard + "@babel/plugin-transform-function-name@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-function-name@npm:7.29.7" @@ -1277,6 +1868,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-function-name@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-function-name@npm:8.0.1" + dependencies: + "@babel/helper-compilation-targets": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/cd45cb47bd7d6d95909d0e2f57723a9d44e21040678026743350da46f61d547ed6a8f7668ccab879438b1a8cb451e62de8287bd3ccbaa73de8114f020c627e8f + languageName: node + linkType: hard + "@babel/plugin-transform-json-strings@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-json-strings@npm:7.29.7" @@ -1288,6 +1891,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-json-strings@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-json-strings@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/5d122a6b4bf3b40f3da589fd351458290db39662a85505f14bc447e4bcdd61dcdc78ffc5cb63fdf9b358e4ab9fa9d22e3cfece919d52cd555e1094352fc09ec9 + languageName: node + linkType: hard + "@babel/plugin-transform-literals@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-literals@npm:7.29.7" @@ -1299,6 +1913,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-literals@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-literals@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/c4b85c7752963f545068433cd6e467f4e0784709e80ff78f5750ae3000f8c942f295b8e23fbbfda1df7ac4bc47cea3d98864980452df3462d3835d2bb1096622 + languageName: node + linkType: hard + "@babel/plugin-transform-logical-assignment-operators@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.29.7" @@ -1310,6 +1935,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-logical-assignment-operators@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-logical-assignment-operators@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/df3f06a08a076d7b71bf66cfeab28aff8f506eb98a5b95cc516f511c3d9f7e97423e72a3f562f8416dfd3b9f7f18067f6c0e8f333e7ae36376974bc9c2c2ea4e + languageName: node + linkType: hard + "@babel/plugin-transform-member-expression-literals@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-member-expression-literals@npm:7.29.7" @@ -1321,6 +1957,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-member-expression-literals@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-member-expression-literals@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/eab189b12f02ce474e705cd62e4ce4ef53441c1c4c5d875b103216041715450b1a1731549c9359cb153c5ab18725945708bef630ed49956121cca0562a7b0fa0 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-amd@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-modules-amd@npm:7.29.7" @@ -1333,6 +1980,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-amd@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-modules-amd@npm:8.0.1" + dependencies: + "@babel/helper-module-transforms": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/ea54feb68ae44ef157e7f399700741ad788961e0e8f378574956294d08e1d8909459732978384b0f61ee8072b3bf5a327ce2e8e68c24d81b97a01f69d623a606 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-commonjs@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.29.7" @@ -1345,6 +2004,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-commonjs@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-modules-commonjs@npm:8.0.1" + dependencies: + "@babel/helper-module-transforms": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/60589053e7f9e78573d87743ac68180e839771542dc52d03433129709dc44421c46101188f6cffc40ff3bf9ecc92e5a19fcf1acfa982b8230f635e01cfe63257 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-systemjs@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.29.7" @@ -1359,6 +2030,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-systemjs@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-modules-systemjs@npm:8.0.1" + dependencies: + "@babel/helper-module-transforms": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-validator-identifier": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/d6fa526e668491424137d58e1643a63beb7bfeb82235f89e3c90b6a162067dc11225d9c88c1698485d265ce2b7b3b6fc20f2608d1fec56696a19ca99931bddf1 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-umd@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-modules-umd@npm:7.29.7" @@ -1371,6 +2055,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-umd@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-modules-umd@npm:8.0.1" + dependencies: + "@babel/helper-module-transforms": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/0dcf6be6a3537dc2aa1b6090b20e56a3f06e6a3231f9e40aae5e540a4aa3c20eca756eb11888d863a324e67ed5cd6f7b5bb3a8d4fb3d8c67acf180e92766a880 + languageName: node + linkType: hard + "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.29.7" @@ -1383,6 +2079,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-named-capturing-groups-regex@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:8.0.1" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/ac4cf186dcbacbba326a2e31ab09b2ea28359a455a7a98f9a9abf0070dc254dac2ae08e603d2349a1378154a1428be6e299e168b86140e4a2ed5496a9f1a9fb4 + languageName: node + linkType: hard + "@babel/plugin-transform-new-target@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-new-target@npm:7.29.7" @@ -1394,6 +2102,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-new-target@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-new-target@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/9d224a64b29d6b02aa9ea86ce0cf8c8d4953c17e24e9ad3ba832f63ad4b87dc7690f3baabf3ef3b9e4b510a7d2e50ff3ab1493f89fe1f9180aa3d204dd9dadb7 + languageName: node + linkType: hard + "@babel/plugin-transform-nullish-coalescing-operator@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.29.7" @@ -1405,6 +2124,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-nullish-coalescing-operator@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/509e2b556eda34892fec191b56b8e44ea4ee8bfbccd0d5255e6c2408c31f9ad45422212ecc94ad7993343cf185899e37ecd5523c51cda4e772166d71246571da + languageName: node + linkType: hard + "@babel/plugin-transform-numeric-separator@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-numeric-separator@npm:7.29.7" @@ -1416,6 +2146,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-numeric-separator@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-numeric-separator@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/9c29d41f27a4e31d0ebabbcb412bdfb9de6389766ba84cfaf02932629b2aa4b2d4d9fcbda42be5bd51b0177ec6d178766d87ecb1c6c60f60cf580149893c1126 + languageName: node + linkType: hard + "@babel/plugin-transform-object-rest-spread@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-object-rest-spread@npm:7.29.7" @@ -1431,6 +2172,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-object-rest-spread@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-object-rest-spread@npm:8.0.1" + dependencies: + "@babel/helper-compilation-targets": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/plugin-transform-destructuring": "npm:^8.0.1" + "@babel/plugin-transform-parameters": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/c7eb0a5b3a8b8c8f357542d1f999af65c2d7b01afd92600d15ce741a867183b936cd4c74706b4b2100a8034d9b0bc5008f2988974e15a6470f54dfdcb0979ce7 + languageName: node + linkType: hard + "@babel/plugin-transform-object-super@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-object-super@npm:7.29.7" @@ -1443,6 +2198,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-object-super@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-object-super@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-replace-supers": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/375a87effc7dd37690b406af5a3f7e25c333b9dd6703718782efb69a45d13c921cd51c09ada25856f50c55a81eb840a777f7e3a277fe8dadc2c2a5f48bcf2640 + languageName: node + linkType: hard + "@babel/plugin-transform-optional-catch-binding@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.29.7" @@ -1454,6 +2221,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-optional-catch-binding@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-optional-catch-binding@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/62a1b6959ac396d237c7c5f3572cf816418f81a45ffc4ea5fbdd7350a95ec49fdd77c63d1ef4a926a976e64e2a65d8fdaaa01cbb2fd653e679ae780fdc2525d0 + languageName: node + linkType: hard + "@babel/plugin-transform-optional-chaining@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-optional-chaining@npm:7.29.7" @@ -1466,6 +2244,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-optional-chaining@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-optional-chaining@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/eaf10f54405e0a9f1cc75578ff933235e324dcb221281c292b22e2184aa3e5393ded60af8505ecd0d63e503ca9f0340f146a24be7ccec01937fc76e2d12a4bf0 + languageName: node + linkType: hard + "@babel/plugin-transform-parameters@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-parameters@npm:7.29.7" @@ -1477,6 +2267,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-parameters@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-parameters@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/80c2abab30cc936ae1e324c687451b4f58405415890d0710a07a620a6b4c9da77b2f565e7f4c38782183089487f555e44cefdedff92e6ded0c967aa9a2b38356 + languageName: node + linkType: hard + "@babel/plugin-transform-private-methods@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-private-methods@npm:7.29.7" @@ -1489,6 +2290,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-private-methods@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-private-methods@npm:8.0.1" + dependencies: + "@babel/helper-create-class-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/990b5f83f5d57a5221ce914d0baaf9330aa470ab3def681b1a3342a09c49318491cbfa6bfc3a985ed5d5b6119de9d52d8f89cfe65509f436070d39f967ec3ec3 + languageName: node + linkType: hard + "@babel/plugin-transform-private-property-in-object@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-private-property-in-object@npm:7.29.7" @@ -1502,6 +2315,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-private-property-in-object@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-private-property-in-object@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + "@babel/helper-create-class-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/6261f8ff2e4fc59a0895fbfc67002668a2d4bd6f1a82b94bc6216cba38d0b6909f369be17653130def12cbc6f4e5f3280774fdcf2f7b51f5c440288070044ca3 + languageName: node + linkType: hard + "@babel/plugin-transform-property-literals@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-property-literals@npm:7.29.7" @@ -1513,6 +2339,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-property-literals@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-property-literals@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/0153537fd57a00eccf489417a1308276278191be7156d24d32a1dd57d366239e9af4e91dc5c94d00a6d54f3fd451b45914afa6e3f5be38b0192a4648bbb9a0ad + languageName: node + linkType: hard + "@babel/plugin-transform-react-constant-elements@npm:^7.21.3": version: 7.27.1 resolution: "@babel/plugin-transform-react-constant-elements@npm:7.27.1" @@ -1535,6 +2372,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-display-name@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-react-display-name@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/b06c7a36b2ee2f1d2362fdf8efcb51f3a308ad6513bd69c2f3e75bfb6a6f9ed243e6c5edf3040b6f61ce80eea31c1b19d0a9e279c35f45d9658810aef5405728 + languageName: node + linkType: hard + "@babel/plugin-transform-react-jsx-development@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-react-jsx-development@npm:7.29.7" @@ -1546,6 +2394,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-jsx-development@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-react-jsx-development@npm:8.0.1" + dependencies: + "@babel/plugin-transform-react-jsx": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/2a3f038753acf1bfd36969a811572aa89f8bd2866e19aefa77be77effc24314f7d83652acd89369ca41896d4229422137a67b2f1bec6488245670bb54ef8c38f + languageName: node + linkType: hard + "@babel/plugin-transform-react-jsx@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-react-jsx@npm:7.29.7" @@ -1561,6 +2420,21 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-jsx@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-react-jsx@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + "@babel/helper-module-imports": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/plugin-syntax-jsx": "npm:^8.0.1" + "@babel/types": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/8e6759b46e17e3fa1fe65a5ebe65298404eb440a156a78c901d33648a58670a16b364b3e9faf0b6ab57834840e91c5c42167b8eb7e51b85642113f33eb8a97a0 + languageName: node + linkType: hard + "@babel/plugin-transform-react-pure-annotations@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.29.7" @@ -1573,6 +2447,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-pure-annotations@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-react-pure-annotations@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/77803cc2a343c56c2dd0d7b8edf464eee2285e4b2380f62c878eeec51ef05dce2df800297fd67a9597b52b8e45a10a4eb48bd6dd56ab348ee861542b56339492 + languageName: node + linkType: hard + "@babel/plugin-transform-regenerator@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-regenerator@npm:7.29.7" @@ -1584,6 +2470,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-regenerator@npm:^8.0.2": + version: 8.0.2 + resolution: "@babel/plugin-transform-regenerator@npm:8.0.2" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/8c25e3ead0507c3b7e587156b09d23015d4456bb8942a75df0db046b8cc60b328ed39f40d7d2eb689f69f78a4424fd1e48d1770aeae8ef0f6a8e6ab23773a677 + languageName: node + linkType: hard + "@babel/plugin-transform-regexp-modifiers@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-regexp-modifiers@npm:7.29.7" @@ -1596,6 +2493,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-regexp-modifiers@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-regexp-modifiers@npm:8.0.1" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/4d30d3b14eab4e6a359706d96e108dbdd37b41ebe3ae736dfe92fec97d32b36699d96a56eb781548b5cb62d6fe610159542dc892d17d360aee958f5ac34e6394 + languageName: node + linkType: hard + "@babel/plugin-transform-reserved-words@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-reserved-words@npm:7.29.7" @@ -1607,6 +2516,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-reserved-words@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-reserved-words@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/0ced20be5fb05950492e4ba6b7b7b05ff70770fd0f9133cc25f412b951a446f79456cd775aa9b99657834427278638617ee913ef9507957a9fb748c699a6483c + languageName: node + linkType: hard + "@babel/plugin-transform-runtime@npm:^7.25.9": version: 7.28.3 resolution: "@babel/plugin-transform-runtime@npm:7.28.3" @@ -1634,6 +2554,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-shorthand-properties@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-shorthand-properties@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/c33247ef9b53b85ff089405f7abdd992cee6cd2daaf375980c9e68d681874d32942db5b3b6a5ea0afe25df8a37385e51dcb0db0216d0156909ba3af345b5993d + languageName: node + linkType: hard + "@babel/plugin-transform-spread@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-spread@npm:7.29.7" @@ -1646,6 +2577,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-spread@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-spread@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/459cc77d3a4c062194cdbb37493de3204512d2ea4d6689a7f4b2bd945ef9e77088b6a8f98a9f92b69513b9839ce3eb95a5a99b4bf17ef71bbbef5f9cfce3c9d6 + languageName: node + linkType: hard + "@babel/plugin-transform-sticky-regex@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-sticky-regex@npm:7.29.7" @@ -1657,6 +2600,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-sticky-regex@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-sticky-regex@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/1cd2f4fce70ea6d3f2405e05e091c202d6f64cdd5102a7fdf2ae6f73b162baa9c0d8cb813e08ae68efb1e8368e213da732b8293834048b098d7c33df7c1f1b41 + languageName: node + linkType: hard + "@babel/plugin-transform-template-literals@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-template-literals@npm:7.29.7" @@ -1668,6 +2622,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-template-literals@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-template-literals@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/4b2c02dabd2d7ee3f0b5952b79a11b408520ca9625d633c41869fcc06cdbdd06da6164d7631fe62a6d2462ba89dd492d041b8b6d3f1113c20b1cc23643c0baab + languageName: node + linkType: hard + "@babel/plugin-transform-typeof-symbol@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-typeof-symbol@npm:7.29.7" @@ -1679,6 +2644,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-typeof-symbol@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-typeof-symbol@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/9989057ca8a8bb6aa39f99146f5549a604687a97d17abf947f097500dcf2f4b316deb2a766fbcb203e5f66f509d22c2ba34b543f179636b5526be48a24bc61a4 + languageName: node + linkType: hard + "@babel/plugin-transform-typescript@npm:^7.28.0, @babel/plugin-transform-typescript@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-typescript@npm:7.29.7" @@ -1694,6 +2670,21 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-typescript@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-typescript@npm:8.0.1" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^8.0.0" + "@babel/helper-create-class-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0" + "@babel/plugin-syntax-typescript": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/2e62fc7d1261de748b4343d4a15d77af3ebd0dc5f4395f6afea50a0b5425ac110b681736cb38d7e9469c91b5bae9be27a87159c8f43420ac52710a933cca8547 + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-escapes@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.29.7" @@ -1705,6 +2696,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-unicode-escapes@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-unicode-escapes@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/a3d49ddad1f7d13484f030eeb57a518bfc8991f83d40f23eae7430360b0d4377c43e3d94f1af24b8f86de7a778a854b47e4ee055b1d9b9bc94e056b39eb8c0e0 + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-property-regex@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.29.7" @@ -1717,6 +2719,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-unicode-property-regex@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-unicode-property-regex@npm:8.0.1" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/8ac894309524b0bba15fa5950344dc904ced7349ea0d46ced7cafa97afef89d62d943e9e55688cacd6ef8d6fba76b1cb2df644ecbaa261546f4eb8977d272034 + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-regex@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-unicode-regex@npm:7.29.7" @@ -1729,6 +2743,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-unicode-regex@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-unicode-regex@npm:8.0.1" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/62a4ed84da5bfa9afde0523437604282dcfe8929027a74e7dd5fe363298203e3d6107d064079d0eca0cf0707ae78a3805d03c6ccea455e12e7f71b2c66e65eed + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-sets-regex@npm:^7.29.7": version: 7.29.7 resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.29.7" @@ -1741,7 +2767,94 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:7.29.7, @babel/preset-env@npm:^7.20.2, @babel/preset-env@npm:^7.25.9": +"@babel/plugin-transform-unicode-sets-regex@npm:^8.0.1": + version: 8.0.1 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:8.0.1" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1" + "@babel/helper-plugin-utils": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/e37bea4d1d1e92412ec94586a5c694df501f8488d26859775ef8472eeda80511ed6e1b5960c878ff86036be9babb9f562b31949bdc09797e81cf9c989d349839 + languageName: node + linkType: hard + +"@babel/preset-env@npm:8.0.2": + version: 8.0.2 + resolution: "@babel/preset-env@npm:8.0.2" + dependencies: + "@babel/compat-data": "npm:^8.0.0" + "@babel/helper-compilation-targets": "npm:^8.0.0" + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-validator-option": "npm:^8.0.0" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^8.0.1" + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^8.0.1" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^8.0.1" + "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "npm:^8.0.1" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^8.0.1" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^8.0.1" + "@babel/plugin-transform-arrow-functions": "npm:^8.0.1" + "@babel/plugin-transform-async-generator-functions": "npm:^8.0.1" + "@babel/plugin-transform-async-to-generator": "npm:^8.0.1" + "@babel/plugin-transform-block-scoped-functions": "npm:^8.0.1" + "@babel/plugin-transform-block-scoping": "npm:^8.0.1" + "@babel/plugin-transform-class-properties": "npm:^8.0.1" + "@babel/plugin-transform-class-static-block": "npm:^8.0.1" + "@babel/plugin-transform-classes": "npm:^8.0.1" + "@babel/plugin-transform-computed-properties": "npm:^8.0.1" + "@babel/plugin-transform-destructuring": "npm:^8.0.1" + "@babel/plugin-transform-dotall-regex": "npm:^8.0.1" + "@babel/plugin-transform-duplicate-keys": "npm:^8.0.1" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^8.0.1" + "@babel/plugin-transform-dynamic-import": "npm:^8.0.1" + "@babel/plugin-transform-explicit-resource-management": "npm:^8.0.1" + "@babel/plugin-transform-exponentiation-operator": "npm:^8.0.1" + "@babel/plugin-transform-export-namespace-from": "npm:^8.0.1" + "@babel/plugin-transform-for-of": "npm:^8.0.1" + "@babel/plugin-transform-function-name": "npm:^8.0.1" + "@babel/plugin-transform-json-strings": "npm:^8.0.1" + "@babel/plugin-transform-literals": "npm:^8.0.1" + "@babel/plugin-transform-logical-assignment-operators": "npm:^8.0.1" + "@babel/plugin-transform-member-expression-literals": "npm:^8.0.1" + "@babel/plugin-transform-modules-amd": "npm:^8.0.1" + "@babel/plugin-transform-modules-commonjs": "npm:^8.0.1" + "@babel/plugin-transform-modules-systemjs": "npm:^8.0.1" + "@babel/plugin-transform-modules-umd": "npm:^8.0.1" + "@babel/plugin-transform-named-capturing-groups-regex": "npm:^8.0.1" + "@babel/plugin-transform-new-target": "npm:^8.0.1" + "@babel/plugin-transform-nullish-coalescing-operator": "npm:^8.0.1" + "@babel/plugin-transform-numeric-separator": "npm:^8.0.1" + "@babel/plugin-transform-object-rest-spread": "npm:^8.0.1" + "@babel/plugin-transform-object-super": "npm:^8.0.1" + "@babel/plugin-transform-optional-catch-binding": "npm:^8.0.1" + "@babel/plugin-transform-optional-chaining": "npm:^8.0.1" + "@babel/plugin-transform-parameters": "npm:^8.0.1" + "@babel/plugin-transform-private-methods": "npm:^8.0.1" + "@babel/plugin-transform-private-property-in-object": "npm:^8.0.1" + "@babel/plugin-transform-property-literals": "npm:^8.0.1" + "@babel/plugin-transform-regenerator": "npm:^8.0.2" + "@babel/plugin-transform-regexp-modifiers": "npm:^8.0.1" + "@babel/plugin-transform-reserved-words": "npm:^8.0.1" + "@babel/plugin-transform-shorthand-properties": "npm:^8.0.1" + "@babel/plugin-transform-spread": "npm:^8.0.1" + "@babel/plugin-transform-sticky-regex": "npm:^8.0.1" + "@babel/plugin-transform-template-literals": "npm:^8.0.1" + "@babel/plugin-transform-typeof-symbol": "npm:^8.0.1" + "@babel/plugin-transform-unicode-escapes": "npm:^8.0.1" + "@babel/plugin-transform-unicode-property-regex": "npm:^8.0.1" + "@babel/plugin-transform-unicode-regex": "npm:^8.0.1" + "@babel/plugin-transform-unicode-sets-regex": "npm:^8.0.1" + "@babel/preset-modules": "npm:^0.2.0" + babel-plugin-polyfill-corejs3: "npm:^1.0.0" + core-js-compat: "npm:^3.48.0" + semver: "npm:^7.7.3" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/95afc8262b23e7714d6dc0cca5ee7eaf69efc7dc705ac926fd507e89829e87c5b1019e78b3e89eac617fe432bec156f5902d92f292b7007ba21eb92a66bd8ef1 + languageName: node + linkType: hard + +"@babel/preset-env@npm:^7.20.2, @babel/preset-env@npm:^7.25.9": version: 7.29.7 resolution: "@babel/preset-env@npm:7.29.7" dependencies: @@ -1835,7 +2948,38 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:7.29.7, @babel/preset-react@npm:^7.18.6, @babel/preset-react@npm:^7.25.9": +"@babel/preset-modules@npm:^0.2.0": + version: 0.2.0 + resolution: "@babel/preset-modules@npm:0.2.0" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/plugin-transform-dotall-regex": "npm:^8.0.1" + "@babel/plugin-transform-unicode-property-regex": "npm:^8.0.1" + "@babel/types": "npm:^8.0.0" + esutils: "npm:^2.0.2" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/03f8533661c61a469b4872385f339d1b4aef2e8e39abe53b1a6fadf840d7786c92843160152c0596cb4b539b810e3750299e621c18f5592eb386e38d292b67aa + languageName: node + linkType: hard + +"@babel/preset-react@npm:8.0.1": + version: 8.0.1 + resolution: "@babel/preset-react@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-validator-option": "npm:^8.0.0" + "@babel/plugin-transform-react-display-name": "npm:^8.0.1" + "@babel/plugin-transform-react-jsx": "npm:^8.0.1" + "@babel/plugin-transform-react-jsx-development": "npm:^8.0.1" + "@babel/plugin-transform-react-pure-annotations": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/98fe0453db7dcf2f0c213971e559eab78d2a7d9f942eb81e88c814fd6122ee3fa3e99645cadeb56e92486d92f78a5ff59bd22ed8d54eb450553fe0bf497e8747 + languageName: node + linkType: hard + +"@babel/preset-react@npm:^7.18.6, @babel/preset-react@npm:^7.25.9": version: 7.29.7 resolution: "@babel/preset-react@npm:7.29.7" dependencies: @@ -1851,7 +2995,21 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:7.29.7, @babel/preset-typescript@npm:^7.21.0, @babel/preset-typescript@npm:^7.25.9, @babel/preset-typescript@npm:^7.27.1": +"@babel/preset-typescript@npm:8.0.1": + version: 8.0.1 + resolution: "@babel/preset-typescript@npm:8.0.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^8.0.1" + "@babel/helper-validator-option": "npm:^8.0.0" + "@babel/plugin-transform-modules-commonjs": "npm:^8.0.1" + "@babel/plugin-transform-typescript": "npm:^8.0.1" + peerDependencies: + "@babel/core": ^8.0.0 + checksum: 10c0/9c73f06fdde4161895001dab863bfac367f5281ecaa089c931189a04d5955749589e26202e84b2cc2ee0ac55259f24e9aaa2113b646c3bae19d5c4a7a68f979f + languageName: node + linkType: hard + +"@babel/preset-typescript@npm:^7.21.0, @babel/preset-typescript@npm:^7.25.9, @babel/preset-typescript@npm:^7.27.1": version: 7.29.7 resolution: "@babel/preset-typescript@npm:7.29.7" dependencies: @@ -1866,14 +3024,21 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.25.0, @babel/runtime@npm:^7.25.9, @babel/runtime@npm:^7.26.10, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.25.9, @babel/runtime@npm:^7.9.2": version: 7.28.4 resolution: "@babel/runtime@npm:7.28.4" checksum: 10c0/792ce7af9750fb9b93879cc9d1db175701c4689da890e6ced242ea0207c9da411ccf16dc04e689cc01158b28d7898c40d75598f4559109f761c12ce01e959bf7 languageName: node linkType: hard -"@babel/template@npm:^7.29.7, @babel/template@npm:^7.3.3": +"@babel/runtime@npm:^7.25.0, @babel/runtime@npm:^7.26.10, @babel/runtime@npm:^7.29.2": + version: 7.29.7 + resolution: "@babel/runtime@npm:7.29.7" + checksum: 10c0/ca11572f7146b21e0bde6a9ed4bb6a89eafbee5f0944c7eb54d0d8a2dac962c33638a1d611e14faa71dfbb92b4b5f9236232208568a6b7d5c6f3f39ddb91771e + languageName: node + linkType: hard + +"@babel/template@npm:^7.29.7": version: 7.29.7 resolution: "@babel/template@npm:7.29.7" dependencies: @@ -1884,6 +3049,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/template@npm:8.0.0" + dependencies: + "@babel/code-frame": "npm:^8.0.0" + "@babel/parser": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + checksum: 10c0/8a5e5687299517cc6b0efff3a6342cf4c4256aeeffa14753cc8d08106aaf0ba1916707c0e1f385b511a7b42c6c87806fecaecd4fe06316207475e0d4d1148e2c + languageName: node + linkType: hard + "@babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.29.7, @babel/traverse@npm:^7.7.0": version: 7.29.7 resolution: "@babel/traverse@npm:7.29.7" @@ -1899,7 +3075,22 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.28.2, @babel/types@npm:^7.29.7, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.7.0": +"@babel/traverse@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/traverse@npm:8.0.0" + dependencies: + "@babel/code-frame": "npm:^8.0.0" + "@babel/generator": "npm:^8.0.0" + "@babel/helper-globals": "npm:^8.0.0" + "@babel/parser": "npm:^8.0.0" + "@babel/template": "npm:^8.0.0" + "@babel/types": "npm:^8.0.0" + obug: "npm:^2.1.1" + checksum: 10c0/de5e5c144c72a2949d75ea8baf5dd2926a6410512397ac28692719df45e31e70e26415e10cacfe2c1c1dd73e7276c6a8fc832754c8b14202627d64e1aa1a9393 + languageName: node + linkType: hard + +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.27.3, @babel/types@npm:^7.28.2, @babel/types@npm:^7.29.7, @babel/types@npm:^7.4.4, @babel/types@npm:^7.7.0": version: 7.29.7 resolution: "@babel/types@npm:7.29.7" dependencies: @@ -1909,6 +3100,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^8.0.0": + version: 8.0.0 + resolution: "@babel/types@npm:8.0.0" + dependencies: + "@babel/helper-string-parser": "npm:^8.0.0" + "@babel/helper-validator-identifier": "npm:^8.0.0" + checksum: 10c0/f4130b88818cf9fd0fb653dd35459f58794018416bc0cee0eccefd364c2d146ae90611ae3ae19d91c2f0bbd1e0e440840832baf9a3d5eb5fed077a52f0bcc001 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -1916,18 +3117,23 @@ __metadata: languageName: node linkType: hard -"@blockaid/client@npm:0.31.0": - version: 0.31.0 - resolution: "@blockaid/client@npm:0.31.0" +"@blockaid/client@npm:1.4.0": + version: 1.4.0 + resolution: "@blockaid/client@npm:1.4.0" + bin: + blockaid-client: bin/cli + checksum: 10c0/4c08abfa4bca987e6af443edbaab3e15baf6fb353d168b99e322942e4a3b642a69c007e92b7c7835cff53d48c6184c086d2b2f62e4dad5833093e588ee600e0a + languageName: node + linkType: hard + +"@bramus/specificity@npm:^2.4.2": + version: 2.4.2 + resolution: "@bramus/specificity@npm:2.4.2" dependencies: - "@types/node": "npm:^18.11.18" - "@types/node-fetch": "npm:^2.6.4" - abort-controller: "npm:^3.0.0" - agentkeepalive: "npm:^4.2.1" - form-data-encoder: "npm:1.7.2" - formdata-node: "npm:^4.3.2" - node-fetch: "npm:^2.6.7" - checksum: 10c0/cdf91a9d293a5808bf517a85cf78cf8fc9d780891ec0f140a0474fd165b0613b85455de6de736a5877d9ca5dae026de6786a422bddc2c0c9bed444dbf5a38efb + css-tree: "npm:^3.0.0" + bin: + specificity: bin/cli.js + checksum: 10c0/c5f4e04e0bca0d2202598207a5eb0733c8109d12a68a329caa26373bec598d99db5bb785b8865fefa00fc01b08c6068138807ceb11a948fe15e904ed6cf4ba72 languageName: node linkType: hard @@ -1955,6 +3161,13 @@ __metadata: languageName: node linkType: hard +"@csstools/color-helpers@npm:^6.1.0": + version: 6.1.0 + resolution: "@csstools/color-helpers@npm:6.1.0" + checksum: 10c0/ebb71eebcd6dde16a89d687c30d4c7f315f9079ec803497ebac0528d0a9ef09847eaf167b4565c4919f156e32e7ca2167199ac2d2020f184f7888551a3b4712b + languageName: node + linkType: hard + "@csstools/css-calc@npm:^2.1.3, @csstools/css-calc@npm:^2.1.4": version: 2.1.4 resolution: "@csstools/css-calc@npm:2.1.4" @@ -1965,6 +3178,16 @@ __metadata: languageName: node linkType: hard +"@csstools/css-calc@npm:^3.2.0, @csstools/css-calc@npm:^3.2.1": + version: 3.2.1 + resolution: "@csstools/css-calc@npm:3.2.1" + peerDependencies: + "@csstools/css-parser-algorithms": ^4.0.0 + "@csstools/css-tokenizer": ^4.0.0 + checksum: 10c0/0191c8d1cd4dffa0d3b6bfd1e78a721934b1d7a6c972966e4fdaa72208c6789e8ff443ee81764a32f1e6107825695b5524ef2b4dc1681b5b29230f2a1277e5df + languageName: node + linkType: hard + "@csstools/css-color-parser@npm:^3.0.9, @csstools/css-color-parser@npm:^3.1.0": version: 3.1.0 resolution: "@csstools/css-color-parser@npm:3.1.0" @@ -1978,6 +3201,19 @@ __metadata: languageName: node linkType: hard +"@csstools/css-color-parser@npm:^4.1.0": + version: 4.1.9 + resolution: "@csstools/css-color-parser@npm:4.1.9" + dependencies: + "@csstools/color-helpers": "npm:^6.1.0" + "@csstools/css-calc": "npm:^3.2.1" + peerDependencies: + "@csstools/css-parser-algorithms": ^4.0.0 + "@csstools/css-tokenizer": ^4.0.0 + checksum: 10c0/d9330a1d5b207230e97a522c9b73c1b625dbfbca7a91ac8888e05917efb01c6aa4075153e5af6ce028c3848660d3f24cf7b0f0760a080361089e1a3841e586c7 + languageName: node + linkType: hard + "@csstools/css-parser-algorithms@npm:^3.0.4, @csstools/css-parser-algorithms@npm:^3.0.5": version: 3.0.5 resolution: "@csstools/css-parser-algorithms@npm:3.0.5" @@ -1987,6 +3223,27 @@ __metadata: languageName: node linkType: hard +"@csstools/css-parser-algorithms@npm:^4.0.0": + version: 4.0.0 + resolution: "@csstools/css-parser-algorithms@npm:4.0.0" + peerDependencies: + "@csstools/css-tokenizer": ^4.0.0 + checksum: 10c0/94558c2428d6ef0ddef542e86e0a8376aa1263a12a59770abb13ba50d7b83086822c75433f32aa2e7fef00555e1cc88292f9ca5bce79aed232bb3fed73b1528d + languageName: node + linkType: hard + +"@csstools/css-syntax-patches-for-csstree@npm:^1.1.3": + version: 1.1.6 + resolution: "@csstools/css-syntax-patches-for-csstree@npm:1.1.6" + peerDependencies: + css-tree: ^3.2.1 + peerDependenciesMeta: + css-tree: + optional: true + checksum: 10c0/4f1322833df87dfb19ec5b23cba5475ceeff8391940dd0eeaf9b28df362f23c354c31f704c4bdef9bd749ae5f0825ded022df3fea1fab39af9b6aab42370ba53 + languageName: node + linkType: hard + "@csstools/css-tokenizer@npm:^3.0.3, @csstools/css-tokenizer@npm:^3.0.4": version: 3.0.4 resolution: "@csstools/css-tokenizer@npm:3.0.4" @@ -1994,6 +3251,13 @@ __metadata: languageName: node linkType: hard +"@csstools/css-tokenizer@npm:^4.0.0": + version: 4.0.0 + resolution: "@csstools/css-tokenizer@npm:4.0.0" + checksum: 10c0/669cf3d0f9c8e1ffdf8c9955ad8beba0c8cfe03197fe29a4fcbd9ee6f7a18856cfa42c62670021a75183d9ab37f5d14a866e6a9df753a6c07f59e36797a9ea9f + languageName: node + linkType: hard + "@csstools/media-query-list-parser@npm:^4.0.3": version: 4.0.3 resolution: "@csstools/media-query-list-parser@npm:4.0.3" @@ -2539,10 +3803,10 @@ __metadata: languageName: node linkType: hard -"@discoveryjs/json-ext@npm:^0.6.1": - version: 0.6.3 - resolution: "@discoveryjs/json-ext@npm:0.6.3" - checksum: 10c0/778a9f9d5c3696da3c1f9fa4186613db95a1090abbfb6c2601430645c0d0158cd5e4ba4f32c05904e2dd2747d57710f6aab22bd2f8aa3c4e8feab9b247c65d85 +"@discoveryjs/json-ext@npm:^1.1.0": + version: 1.1.0 + resolution: "@discoveryjs/json-ext@npm:1.1.0" + checksum: 10c0/e48a15f97874cae46181d08b6d4e03f6fd2de92a5323a5e3847ce66b273769e6a81935181fa69be771a2d2252c04faea7157d7dd5744b44ed5abd624fcda8c29 languageName: node linkType: hard @@ -3213,6 +4477,16 @@ __metadata: languageName: node linkType: hard +"@emnapi/core@npm:1.10.0": + version: 1.10.0 + resolution: "@emnapi/core@npm:1.10.0" + dependencies: + "@emnapi/wasi-threads": "npm:1.2.1" + tslib: "npm:^2.4.0" + checksum: 10c0/f51d08227857b60632de7714d708124f0e100a1462dde6df8221760939aa3204a73193830371830fac0716f3ccd2129f2cac1b17cd7d7958bc4da9018a296edb + languageName: node + linkType: hard + "@emnapi/core@npm:^1.10.0": version: 1.11.1 resolution: "@emnapi/core@npm:1.11.1" @@ -3223,6 +4497,15 @@ __metadata: languageName: node linkType: hard +"@emnapi/runtime@npm:1.10.0": + version: 1.10.0 + resolution: "@emnapi/runtime@npm:1.10.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/953f14991d1aefb92ee6f8eb27dea725e484791a53a0cb5f47d9e0087b9a2c929ff2e92adf95af15d6ad456db6300c6b761ebf72b50a875b874a83520b3ba093 + languageName: node + linkType: hard + "@emnapi/runtime@npm:^1.10.0": version: 1.11.1 resolution: "@emnapi/runtime@npm:1.11.1" @@ -3232,6 +4515,15 @@ __metadata: languageName: node linkType: hard +"@emnapi/wasi-threads@npm:1.2.1": + version: 1.2.1 + resolution: "@emnapi/wasi-threads@npm:1.2.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/32fcfa81ab396533b2ec1f4082b1ff779a05d9c836bbbd3f4398405b0e6814c0d9503b7993130e37bc6941dbc1ded49f55e9700ae9ca4e803bab2b5bc5deb331 + languageName: node + linkType: hard + "@emnapi/wasi-threads@npm:1.2.2, @emnapi/wasi-threads@npm:^1.2.1": version: 1.2.2 resolution: "@emnapi/wasi-threads@npm:1.2.2" @@ -3250,32 +4542,237 @@ __metadata: languageName: node linkType: hard -"@emotion/memoize@npm:^0.9.0": - version: 0.9.0 - resolution: "@emotion/memoize@npm:0.9.0" - checksum: 10c0/13f474a9201c7f88b543e6ea42f55c04fb2fdc05e6c5a3108aced2f7e7aa7eda7794c56bba02985a46d8aaa914fcdde238727a98341a96e2aec750d372dadd15 +"@emotion/memoize@npm:^0.9.0": + version: 0.9.0 + resolution: "@emotion/memoize@npm:0.9.0" + checksum: 10c0/13f474a9201c7f88b543e6ea42f55c04fb2fdc05e6c5a3108aced2f7e7aa7eda7794c56bba02985a46d8aaa914fcdde238727a98341a96e2aec750d372dadd15 + languageName: node + linkType: hard + +"@endo/cache-map@npm:^1.1.0": + version: 1.1.0 + resolution: "@endo/cache-map@npm:1.1.0" + checksum: 10c0/7d3df3263bfd581248a1e44472cb6650e73fc473f096bcd6dfe6619c3f8017d959e4376edcd76cea729d56f6b52b33de0a3d40a7f7b192cb4fb0e6822a153993 + languageName: node + linkType: hard + +"@endo/env-options@npm:^1.1.11": + version: 1.1.11 + resolution: "@endo/env-options@npm:1.1.11" + checksum: 10c0/207ca764c56aaf8350bb3e897913852fdf2a3e737dbf2777b1e9928430d4efdba11b75a91570d781d28bb28da77c24e4ac7795fcee6b0530944c804e448748c6 + languageName: node + linkType: hard + +"@endo/immutable-arraybuffer@npm:^1.1.2": + version: 1.1.2 + resolution: "@endo/immutable-arraybuffer@npm:1.1.2" + checksum: 10c0/9ad0915818115999dd5fb618096be49e0f70f6289a234e968f40495ad2b3ced7bbbd09b7f20aaf04a88192fbb398bc42b89eb2dded5760df6a8e7439a20a7b9e + languageName: node + linkType: hard + +"@es-joy/jsdoccomment@npm:~0.87.0": + version: 0.87.0 + resolution: "@es-joy/jsdoccomment@npm:0.87.0" + dependencies: + "@types/estree": "npm:^1.0.9" + "@typescript-eslint/types": "npm:^8.59.4" + comment-parser: "npm:1.4.7" + esquery: "npm:^1.7.0" + jsdoc-type-pratt-parser: "npm:~7.2.0" + checksum: 10c0/9e64b79c8135fa5ad1391ddea7a25d5884f572eb5af168a5c81d0bddac4439b4de89197e9b07adfa566f6285a1fa2fc2ee3c8e3d774656ed422efad43f6b33d4 + languageName: node + linkType: hard + +"@es-joy/resolve.exports@npm:1.2.0": + version: 1.2.0 + resolution: "@es-joy/resolve.exports@npm:1.2.0" + checksum: 10c0/7e4713471f5eccb17a925a12415a2d9e372a42376813a19f6abd9c35e8d01ab1403777265817da67c6150cffd4f558d9ad51e26a8de6911dad89d9cb7eedacd8 + languageName: node + linkType: hard + +"@esbuild/aix-ppc64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/aix-ppc64@npm:0.25.12" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/android-arm64@npm:0.25.12" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/android-arm@npm:0.25.12" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/android-x64@npm:0.25.12" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/darwin-arm64@npm:0.25.12" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/darwin-x64@npm:0.25.12" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/freebsd-arm64@npm:0.25.12" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/freebsd-x64@npm:0.25.12" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-arm64@npm:0.25.12" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-arm@npm:0.25.12" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-ia32@npm:0.25.12" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-loong64@npm:0.25.12" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-mips64el@npm:0.25.12" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-ppc64@npm:0.25.12" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-riscv64@npm:0.25.12" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-s390x@npm:0.25.12" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-x64@npm:0.25.12" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/netbsd-arm64@npm:0.25.12" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/netbsd-x64@npm:0.25.12" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/openbsd-arm64@npm:0.25.12" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/openbsd-x64@npm:0.25.12" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openharmony-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/openharmony-arm64@npm:0.25.12" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/sunos-x64@npm:0.25.12" + conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@endo/env-options@npm:^1.1.8": - version: 1.1.11 - resolution: "@endo/env-options@npm:1.1.11" - checksum: 10c0/207ca764c56aaf8350bb3e897913852fdf2a3e737dbf2777b1e9928430d4efdba11b75a91570d781d28bb28da77c24e4ac7795fcee6b0530944c804e448748c6 +"@esbuild/win32-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/win32-arm64@npm:0.25.12" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@es-joy/jsdoccomment@npm:~0.49.0": - version: 0.49.0 - resolution: "@es-joy/jsdoccomment@npm:0.49.0" - dependencies: - comment-parser: "npm:1.4.1" - esquery: "npm:^1.6.0" - jsdoc-type-pratt-parser: "npm:~4.1.0" - checksum: 10c0/16717507d557d37e7b59456fedeefbe0a3bc93aa2d9c043d5db91e24e076509b6fcb10ee6fd1dafcb0c5bbe50ae329b45de5b83541cb5994a98c9e862a45641e +"@esbuild/win32-ia32@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/win32-ia32@npm:0.25.12" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/win32-x64@npm:0.25.12" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.9.1": +"@eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.1": version: 4.9.1 resolution: "@eslint-community/eslint-utils@npm:4.9.1" dependencies: @@ -3286,87 +4783,68 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.12.2": +"@eslint-community/regexpp@npm:^4.12.2": version: 4.12.2 resolution: "@eslint-community/regexpp@npm:4.12.2" checksum: 10c0/fddcbc66851b308478d04e302a4d771d6917a0b3740dc351513c0da9ca2eab8a1adf99f5e0aa7ab8b13fa0df005c81adeee7e63a92f3effd7d367a163b721c2d languageName: node linkType: hard -"@eslint/config-array@npm:^0.19.0": - version: 0.19.2 - resolution: "@eslint/config-array@npm:0.19.2" +"@eslint/config-array@npm:^0.23.5": + version: 0.23.5 + resolution: "@eslint/config-array@npm:0.23.5" dependencies: - "@eslint/object-schema": "npm:^2.1.6" + "@eslint/object-schema": "npm:^3.0.5" debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/dd68da9abb32d336233ac4fe0db1e15a0a8d794b6e69abb9e57545d746a97f6f542496ff9db0d7e27fab1438546250d810d90b1904ac67677215b8d8e7573f3d + minimatch: "npm:^10.2.4" + checksum: 10c0/b24833c4c76e78ee075d306cd3f095db46b2db0f90cc13a6ee6e4275f9889731c05bf5403ab5fefb79c756e07ac9184ed0e04570341382f9eccbccc80e6d1a0c languageName: node linkType: hard -"@eslint/core@npm:^0.10.0": - version: 0.10.0 - resolution: "@eslint/core@npm:0.10.0" +"@eslint/config-helpers@npm:^0.6.0": + version: 0.6.0 + resolution: "@eslint/config-helpers@npm:0.6.0" dependencies: - "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/074018075079b3ed1f14fab9d116f11a8824cdfae3e822badf7ad546962fafe717a31e61459bad8cc59cf7070dc413ea9064ddb75c114f05b05921029cde0a64 + "@eslint/core": "npm:^1.2.1" + checksum: 10c0/f9af20e8b60b0ba27edb74b8eb40c0c5d51a9bf9baf9e053bb57833a87cb0a1c49b4dfaad88fc24d49c907ad1324c8a0b668684fa9c321351dac4bc9155ec10a languageName: node linkType: hard -"@eslint/core@npm:^0.13.0": - version: 0.13.0 - resolution: "@eslint/core@npm:0.13.0" +"@eslint/core@npm:^1.2.1": + version: 1.2.1 + resolution: "@eslint/core@npm:1.2.1" dependencies: "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/ba724a7df7ed9dab387481f11d0d0f708180f40be93acce2c21dacca625c5867de3528760c42f1c457ccefe6a669d525ff87b779017eabc0d33479a36300797b - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.2.0": - version: 3.3.1 - resolution: "@eslint/eslintrc@npm:3.3.1" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/b0e63f3bc5cce4555f791a4e487bf999173fcf27c65e1ab6e7d63634d8a43b33c3693e79f192cbff486d7df1be8ebb2bd2edc6e70ddd486cbfa84a359a3e3b41 - languageName: node - linkType: hard - -"@eslint/js@npm:9.18.0": - version: 9.18.0 - resolution: "@eslint/js@npm:9.18.0" - checksum: 10c0/3938344c5ac7feef4b73fcb30f3c3e753570cea74c24904bb5d07e9c42fcd34fcbc40f545b081356a299e11f360c9c274b348c05fb0113fc3d492e5175eee140 + checksum: 10c0/10979b40588ecfef771fcb5013a542a35fb30692cc95a65f3481b0b36fbd89f5679efeb30d57f4eed35203d859aabace2a620177d6c536f71b299a1af2f3398f languageName: node linkType: hard -"@eslint/object-schema@npm:^2.1.6": - version: 2.1.6 - resolution: "@eslint/object-schema@npm:2.1.6" - checksum: 10c0/b8cdb7edea5bc5f6a96173f8d768d3554a628327af536da2fc6967a93b040f2557114d98dbcdbf389d5a7b290985ad6a9ce5babc547f36fc1fde42e674d11a56 +"@eslint/object-schema@npm:^3.0.5": + version: 3.0.5 + resolution: "@eslint/object-schema@npm:3.0.5" + checksum: 10c0/1db337431f520b99e9edda64ef5fafd7ec6a029843eeb608753025125b6649d861d843cffafafd3c4e37926d7d5f9ec0c6a8e3665c13c3da2144e8132892e92e languageName: node linkType: hard -"@eslint/plugin-kit@npm:^0.2.5": - version: 0.2.8 - resolution: "@eslint/plugin-kit@npm:0.2.8" +"@eslint/plugin-kit@npm:^0.7.2": + version: 0.7.2 + resolution: "@eslint/plugin-kit@npm:0.7.2" dependencies: - "@eslint/core": "npm:^0.13.0" + "@eslint/core": "npm:^1.2.1" levn: "npm:^0.4.1" - checksum: 10c0/554847c8f2b6bfe0e634f317fc43d0b54771eea0015c4f844f75915fdb9e6170c830c004291bad57db949d61771732e459f36ed059f45cf750af223f77357c5c + checksum: 10c0/aafba08077bcd6d7dde6c2e21db18086046a88f914f29971a84cac9ad2d48952ded1b293e665e523805297eff756522dafa16f0062195e2c7143dcd1d47d11ed languageName: node linkType: hard -"@fastify/busboy@npm:^2.0.0": - version: 2.1.1 - resolution: "@fastify/busboy@npm:2.1.1" - checksum: 10c0/6f8027a8cba7f8f7b736718b013f5a38c0476eea67034c94a0d3c375e2b114366ad4419e6a6fa7ffc2ef9c6d3e0435d76dd584a7a1cbac23962fda7650b579e3 +"@exodus/bytes@npm:^1.11.0, @exodus/bytes@npm:^1.15.0, @exodus/bytes@npm:^1.6.0": + version: 1.15.1 + resolution: "@exodus/bytes@npm:1.15.1" + peerDependencies: + "@noble/hashes": ^1.8.0 || ^2.0.0 + peerDependenciesMeta: + "@noble/hashes": + optional: true + checksum: 10c0/333056a6953bbf875d9f3b86c32314de29458d842e5f56f6ef8034b18c2d9660184550093d1bae5de0064043d5e23f54cc03148798d9d29cf5167ac03f2e9f8c languageName: node linkType: hard @@ -3408,6 +4886,22 @@ __metadata: languageName: node linkType: hard +"@gar/promise-retry@npm:^1.0.0": + version: 1.0.3 + resolution: "@gar/promise-retry@npm:1.0.3" + checksum: 10c0/885b02c8b0d75b2d215da25f3b639158c4fbe8fefe0d79163304534b9a6d0710db4b7699f7cd3cc1a730792bff04cbe19f4850a62d3e105a663eaeec88f38332 + languageName: node + linkType: hard + +"@gulpjs/to-absolute-glob@npm:^4.0.0": + version: 4.0.0 + resolution: "@gulpjs/to-absolute-glob@npm:4.0.0" + dependencies: + is-negated-glob: "npm:^1.0.0" + checksum: 10c0/acddf10466bfff672e7d09d5b7d9fb2d9d50dff3bcf6d4cc3b3df364ea0ccad6e7a8d8ba0f474f880ff18a76ebbcc09b3f4d6d12d2913e3469361d5539a72110 + languageName: node + linkType: hard + "@hapi/hoek@npm:^9.0.0, @hapi/hoek@npm:^9.3.0": version: 9.3.0 resolution: "@hapi/hoek@npm:9.3.0" @@ -3457,75 +4951,13 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/retry@npm:^0.4.0, @humanwhocodes/retry@npm:^0.4.1": +"@humanwhocodes/retry@npm:^0.4.0, @humanwhocodes/retry@npm:^0.4.2": version: 0.4.3 resolution: "@humanwhocodes/retry@npm:0.4.3" checksum: 10c0/3775bb30087d4440b3f7406d5a057777d90e4b9f435af488a4923ef249e93615fb78565a85f173a186a076c7706a81d0d57d563a2624e4de2c5c9c66c486ce42 languageName: node linkType: hard -"@inquirer/ansi@npm:^1.0.2": - version: 1.0.2 - resolution: "@inquirer/ansi@npm:1.0.2" - checksum: 10c0/8e408cc628923aa93402e66657482ccaa2ad5174f9db526d9a8b443f9011e9cd8f70f0f534f5fe3857b8a9df3bce1e25f66c96f666d6750490bd46e2b4f3b829 - languageName: node - linkType: hard - -"@inquirer/confirm@npm:^5.0.0": - version: 5.1.21 - resolution: "@inquirer/confirm@npm:5.1.21" - dependencies: - "@inquirer/core": "npm:^10.3.2" - "@inquirer/type": "npm:^3.0.10" - peerDependencies: - "@types/node": ">=18" - peerDependenciesMeta: - "@types/node": - optional: true - checksum: 10c0/a95bbdbb17626c484735a4193ed6b6a6fbb078cf62116ec8e1667f647e534dd6618e688ecc7962585efcc56881b544b8c53db3914599bbf2ab842e7f224b0fca - languageName: node - linkType: hard - -"@inquirer/core@npm:^10.3.2": - version: 10.3.2 - resolution: "@inquirer/core@npm:10.3.2" - dependencies: - "@inquirer/ansi": "npm:^1.0.2" - "@inquirer/figures": "npm:^1.0.15" - "@inquirer/type": "npm:^3.0.10" - cli-width: "npm:^4.1.0" - mute-stream: "npm:^2.0.0" - signal-exit: "npm:^4.1.0" - wrap-ansi: "npm:^6.2.0" - yoctocolors-cjs: "npm:^2.1.3" - peerDependencies: - "@types/node": ">=18" - peerDependenciesMeta: - "@types/node": - optional: true - checksum: 10c0/f0f27e07fe288e01e3949b4ad216c19751f025ce77c610366e08d8b0f7a135d064dc074732031d251584b454c576f1e5c849e4abe259186dd5d4974c8f85c13e - languageName: node - linkType: hard - -"@inquirer/figures@npm:^1.0.15": - version: 1.0.15 - resolution: "@inquirer/figures@npm:1.0.15" - checksum: 10c0/6e39a040d260ae234ae220180b7994ff852673e20be925f8aa95e78c7934d732b018cbb4d0ec39e600a410461bcb93dca771e7de23caa10630d255692e440f69 - languageName: node - linkType: hard - -"@inquirer/type@npm:^3.0.10": - version: 3.0.10 - resolution: "@inquirer/type@npm:3.0.10" - peerDependencies: - "@types/node": ">=18" - peerDependenciesMeta: - "@types/node": - optional: true - checksum: 10c0/a846c7a570e3bf2657d489bcc5dcdc3179d24c7323719de1951dcdb722400ac76e5b2bfe9765d0a789bc1921fac810983d7999f021f30a78a6a174c23fc78dc9 - languageName: node - linkType: hard - "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -3569,152 +5001,205 @@ __metadata: languageName: node linkType: hard -"@jest/console@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/console@npm:29.7.0" +"@jest/console@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/console@npm:30.4.1" dependencies: - "@jest/types": "npm:^29.6.3" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - chalk: "npm:^4.0.0" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" + chalk: "npm:^4.1.2" + jest-message-util: "npm:30.4.1" + jest-util: "npm:30.4.1" slash: "npm:^3.0.0" - checksum: 10c0/7be408781d0a6f657e969cbec13b540c329671819c2f57acfad0dae9dbfe2c9be859f38fe99b35dba9ff1536937dc6ddc69fdcd2794812fa3c647a1619797f6c + checksum: 10c0/f782722ef5754ab864b996000cf1f0545f7be9db6ba8f89cb2381dfab9910a52c59a830e5ea069a76840023e40806493d9900d8eb7e9821d23a11a498f32739e languageName: node linkType: hard -"@jest/core@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/core@npm:29.7.0" +"@jest/core@npm:30.4.2": + version: 30.4.2 + resolution: "@jest/core@npm:30.4.2" dependencies: - "@jest/console": "npm:^29.7.0" - "@jest/reporters": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" + "@jest/console": "npm:30.4.1" + "@jest/pattern": "npm:30.4.0" + "@jest/reporters": "npm:30.4.1" + "@jest/test-result": "npm:30.4.1" + "@jest/transform": "npm:30.4.1" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - jest-changed-files: "npm:^29.7.0" - jest-config: "npm:^29.7.0" - jest-haste-map: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-regex-util: "npm:^29.6.3" - jest-resolve: "npm:^29.7.0" - jest-resolve-dependencies: "npm:^29.7.0" - jest-runner: "npm:^29.7.0" - jest-runtime: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - jest-watcher: "npm:^29.7.0" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.7.0" + ansi-escapes: "npm:^4.3.2" + chalk: "npm:^4.1.2" + ci-info: "npm:^4.2.0" + exit-x: "npm:^0.2.2" + fast-json-stable-stringify: "npm:^2.1.0" + graceful-fs: "npm:^4.2.11" + jest-changed-files: "npm:30.4.1" + jest-config: "npm:30.4.2" + jest-haste-map: "npm:30.4.1" + jest-message-util: "npm:30.4.1" + jest-regex-util: "npm:30.4.0" + jest-resolve: "npm:30.4.1" + jest-resolve-dependencies: "npm:30.4.2" + jest-runner: "npm:30.4.2" + jest-runtime: "npm:30.4.2" + jest-snapshot: "npm:30.4.1" + jest-util: "npm:30.4.1" + jest-validate: "npm:30.4.1" + jest-watcher: "npm:30.4.1" + pretty-format: "npm:30.4.1" slash: "npm:^3.0.0" - strip-ansi: "npm:^6.0.0" peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true - checksum: 10c0/934f7bf73190f029ac0f96662c85cd276ec460d407baf6b0dbaec2872e157db4d55a7ee0b1c43b18874602f662b37cb973dda469a4e6d88b4e4845b521adeeb2 + checksum: 10c0/4237ec79d5403b82ba89e3be6e4318d9f37c3a11281bd76cfbdd4ff08d8c89850555607c4d494dab3526e01a90db3539e549017883967dd392b5084f1be0d5b2 languageName: node linkType: hard -"@jest/environment@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/environment@npm:29.7.0" +"@jest/diff-sequences@npm:30.4.0": + version: 30.4.0 + resolution: "@jest/diff-sequences@npm:30.4.0" + checksum: 10c0/b4358b1b885098b905cb777f58788ddd45f90c4ebc3ce2c04fb1d4c9516f35ac2d9daef8263cd21c537bd7a52ab320f03e4ba9521677959ae20e3d405356b420 + languageName: node + linkType: hard + +"@jest/environment-jsdom-abstract@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/environment-jsdom-abstract@npm:30.4.1" dependencies: - "@jest/fake-timers": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" + "@jest/environment": "npm:30.4.1" + "@jest/fake-timers": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + "@types/jsdom": "npm:^21.1.7" "@types/node": "npm:*" - jest-mock: "npm:^29.7.0" - checksum: 10c0/c7b1b40c618f8baf4d00609022d2afa086d9c6acc706f303a70bb4b67275868f620ad2e1a9efc5edd418906157337cce50589a627a6400bbdf117d351b91ef86 + jest-mock: "npm:30.4.1" + jest-util: "npm:30.4.1" + peerDependencies: + canvas: ^3.0.0 + jsdom: "*" + peerDependenciesMeta: + canvas: + optional: true + checksum: 10c0/a06c832ea500690a2877aaff199c788c29a888cfc0db1e05e30ea4fcf1c272c357dfc6b6151d4fb5528ffa1691a4cdb8d8fff424a58c436093500df8597b7614 languageName: node linkType: hard -"@jest/expect-utils@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/expect-utils@npm:29.7.0" +"@jest/environment@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/environment@npm:30.4.1" + dependencies: + "@jest/fake-timers": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + "@types/node": "npm:*" + jest-mock: "npm:30.4.1" + checksum: 10c0/704987ff8650c91a8ed13796ce47e9c55da3c12a01902d9e384330cead18eb4d34ce665a8d9962dddf2736fac006f92efc1039b8da424adf8fdc16f8d81aff6c + languageName: node + linkType: hard + +"@jest/expect-utils@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/expect-utils@npm:30.4.1" dependencies: - jest-get-type: "npm:^29.6.3" - checksum: 10c0/60b79d23a5358dc50d9510d726443316253ecda3a7fb8072e1526b3e0d3b14f066ee112db95699b7a43ad3f0b61b750c72e28a5a1cac361d7a2bb34747fa938a + "@jest/get-type": "npm:30.1.0" + checksum: 10c0/6dea9e11ebcc7be68fea5950ae5a1b7ff9fd1490101ee8af0aede336b9934ab24a28bcafe2f1171dac0f95982406386c609ca2659b9132e1a9d419e8d69b9cd4 languageName: node linkType: hard -"@jest/expect@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/expect@npm:29.7.0" +"@jest/expect@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/expect@npm:30.4.1" dependencies: - expect: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - checksum: 10c0/b41f193fb697d3ced134349250aed6ccea075e48c4f803159db102b826a4e473397c68c31118259868fd69a5cba70e97e1c26d2c2ff716ca39dc73a2ccec037e + expect: "npm:30.4.1" + jest-snapshot: "npm:30.4.1" + checksum: 10c0/2133183e735982879408036237b115abc2e57fa52bb7324be0a1f2ab6941a57da93b2e6f498dc110b7d007dd20463013fbcc5b24377cf65e6a8518d3b2ff76bd languageName: node linkType: hard -"@jest/fake-timers@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/fake-timers@npm:29.7.0" +"@jest/fake-timers@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/fake-timers@npm:30.4.1" dependencies: - "@jest/types": "npm:^29.6.3" - "@sinonjs/fake-timers": "npm:^10.0.2" + "@jest/types": "npm:30.4.1" + "@sinonjs/fake-timers": "npm:^15.4.0" "@types/node": "npm:*" - jest-message-util: "npm:^29.7.0" - jest-mock: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - checksum: 10c0/cf0a8bcda801b28dc2e2b2ba36302200ee8104a45ad7a21e6c234148932f826cb3bc57c8df3b7b815aeea0861d7b6ca6f0d4778f93b9219398ef28749e03595c + jest-message-util: "npm:30.4.1" + jest-mock: "npm:30.4.1" + jest-util: "npm:30.4.1" + checksum: 10c0/4a10e4eb64bb5ea2531cdcc79f3058731f5c14faf2a74f498fcb37f6690c3c0f9b12a9856736d26e34631eb38db12e12812da71de27b9d332df44dda9f460fbe languageName: node linkType: hard -"@jest/globals@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/globals@npm:29.7.0" +"@jest/get-type@npm:30.1.0": + version: 30.1.0 + resolution: "@jest/get-type@npm:30.1.0" + checksum: 10c0/3e65fd5015f551c51ec68fca31bbd25b466be0e8ee8075d9610fa1c686ea1e70a942a0effc7b10f4ea9a338c24337e1ad97ff69d3ebacc4681b7e3e80d1b24ac + languageName: node + linkType: hard + +"@jest/globals@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/globals@npm:30.4.1" dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/expect": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - jest-mock: "npm:^29.7.0" - checksum: 10c0/a385c99396878fe6e4460c43bd7bb0a5cc52befb462cc6e7f2a3810f9e7bcce7cdeb51908fd530391ee452dc856c98baa2c5f5fa8a5b30b071d31ef7f6955cea + "@jest/environment": "npm:30.4.1" + "@jest/expect": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + jest-mock: "npm:30.4.1" + checksum: 10c0/7961eefdc9e69ba7754d11a1bae4bc2960f33e03d9c1d6c73f27895b8cf92a9118a234330f31dc8efe16e835fe70ef9cc6c26f60121f6b6e9fac71c8b1bcd709 languageName: node linkType: hard -"@jest/reporters@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/reporters@npm:29.7.0" +"@jest/pattern@npm:30.4.0": + version: 30.4.0 + resolution: "@jest/pattern@npm:30.4.0" + dependencies: + "@types/node": "npm:*" + jest-regex-util: "npm:30.4.0" + checksum: 10c0/05bc0799f84f3750bbbff0f9a546979efd0dbcee86c1be98b9e2811a68885809ec7b5cca39b8dda1497cb7cf17b7be936019fba8dfbcd9c53b181e03e67f4f82 + languageName: node + linkType: hard + +"@jest/reporters@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/reporters@npm:30.4.1" dependencies: "@bcoe/v8-coverage": "npm:^0.2.3" - "@jest/console": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@jridgewell/trace-mapping": "npm:^0.3.18" + "@jest/console": "npm:30.4.1" + "@jest/test-result": "npm:30.4.1" + "@jest/transform": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + "@jridgewell/trace-mapping": "npm:^0.3.25" "@types/node": "npm:*" - chalk: "npm:^4.0.0" - collect-v8-coverage: "npm:^1.0.0" - exit: "npm:^0.1.2" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" + chalk: "npm:^4.1.2" + collect-v8-coverage: "npm:^1.0.2" + exit-x: "npm:^0.2.2" + glob: "npm:^10.5.0" + graceful-fs: "npm:^4.2.11" istanbul-lib-coverage: "npm:^3.0.0" istanbul-lib-instrument: "npm:^6.0.0" istanbul-lib-report: "npm:^3.0.0" - istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-lib-source-maps: "npm:^5.0.0" istanbul-reports: "npm:^3.1.3" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-worker: "npm:^29.7.0" + jest-message-util: "npm:30.4.1" + jest-util: "npm:30.4.1" + jest-worker: "npm:30.4.1" slash: "npm:^3.0.0" - string-length: "npm:^4.0.1" - strip-ansi: "npm:^6.0.0" + string-length: "npm:^4.0.2" v8-to-istanbul: "npm:^9.0.1" peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true - checksum: 10c0/a754402a799541c6e5aff2c8160562525e2a47e7d568f01ebfc4da66522de39cbb809bbb0a841c7052e4270d79214e70aec3c169e4eae42a03bc1a8a20cb9fa2 + checksum: 10c0/cf5220462c6242fa564bbeb6d5988ebfd814e0351f3bddae07323b55c68c7ebd4aa4c23e717231ab4b2d63c4fc7fa4615b9dad8584be534bd44622981242dceb + languageName: node + linkType: hard + +"@jest/schemas@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/schemas@npm:30.4.1" + dependencies: + "@sinclair/typebox": "npm:^0.34.0" + checksum: 10c0/96f388ebfc1974457fcbde2ad36c40a0b549cba3f624fe8d9d6e5903a152dc75e4043f4ac9ac7668622f2ecb0f9a4dcb9a38edf3bc0d52b82045b2bb2b69b72a languageName: node linkType: hard @@ -3727,61 +5212,87 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^29.6.3": - version: 29.6.3 - resolution: "@jest/source-map@npm:29.6.3" +"@jest/snapshot-utils@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/snapshot-utils@npm:30.4.1" dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.18" - callsites: "npm:^3.0.0" - graceful-fs: "npm:^4.2.9" - checksum: 10c0/a2f177081830a2e8ad3f2e29e20b63bd40bade294880b595acf2fc09ec74b6a9dd98f126a2baa2bf4941acd89b13a4ade5351b3885c224107083a0059b60a219 + "@jest/types": "npm:30.4.1" + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" + natural-compare: "npm:^1.4.0" + checksum: 10c0/81da9079719eece02b89c45cb97162b5b7d794981652c8d8fe2846843ac81ce219ea4bc21bde7cf76c9032006435f82bd9aee8d6139d90b77078ddad4865af02 languageName: node linkType: hard -"@jest/test-result@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/test-result@npm:29.7.0" +"@jest/source-map@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/source-map@npm:30.0.1" dependencies: - "@jest/console": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - collect-v8-coverage: "npm:^1.0.0" - checksum: 10c0/7de54090e54a674ca173470b55dc1afdee994f2d70d185c80236003efd3fa2b753fff51ffcdda8e2890244c411fd2267529d42c4a50a8303755041ee493e6a04 + "@jridgewell/trace-mapping": "npm:^0.3.25" + callsites: "npm:^3.1.0" + graceful-fs: "npm:^4.2.11" + checksum: 10c0/e7bda2786fc9f483d9dd7566c58c4bd948830997be862dfe80a3ae5550ff3f84753abb52e705d02ebe9db9f34ba7ebec4c2db11882048cdeef7a66f6332b3897 languageName: node linkType: hard -"@jest/test-sequencer@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/test-sequencer@npm:29.7.0" +"@jest/test-result@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/test-result@npm:30.4.1" dependencies: - "@jest/test-result": "npm:^29.7.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" + "@jest/console": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + "@types/istanbul-lib-coverage": "npm:^2.0.6" + collect-v8-coverage: "npm:^1.0.2" + checksum: 10c0/920fa3fe3cc8b5e11bfe36066d733030f1245865d7cac4862e3783a96f9c0a087fd8073c8cb56e4c87c6fcc97b46e6f828ecd3b10dd8e208f5e1b983fcc5cdb8 + languageName: node + linkType: hard + +"@jest/test-sequencer@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/test-sequencer@npm:30.4.1" + dependencies: + "@jest/test-result": "npm:30.4.1" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.4.1" slash: "npm:^3.0.0" - checksum: 10c0/593a8c4272797bb5628984486080cbf57aed09c7cfdc0a634e8c06c38c6bef329c46c0016e84555ee55d1cd1f381518cf1890990ff845524c1123720c8c1481b + checksum: 10c0/531b19ffb2358b3b22a56b306359acf66db2073978dd6df8a9522b5b4034ad7540a9cb84bdfebbcb2872686d6d2ab8cabea04ad23ef9d4488cbafd03f7511501 languageName: node linkType: hard -"@jest/transform@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/transform@npm:29.7.0" +"@jest/transform@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/transform@npm:30.4.1" dependencies: - "@babel/core": "npm:^7.11.6" - "@jest/types": "npm:^29.6.3" - "@jridgewell/trace-mapping": "npm:^0.3.18" - babel-plugin-istanbul: "npm:^6.1.1" - chalk: "npm:^4.0.0" + "@babel/core": "npm:^7.27.4" + "@jest/types": "npm:30.4.1" + "@jridgewell/trace-mapping": "npm:^0.3.25" + babel-plugin-istanbul: "npm:^7.0.1" + chalk: "npm:^4.1.2" convert-source-map: "npm:^2.0.0" fast-json-stable-stringify: "npm:^2.1.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" - jest-regex-util: "npm:^29.6.3" - jest-util: "npm:^29.7.0" - micromatch: "npm:^4.0.4" - pirates: "npm:^4.0.4" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.4.1" + jest-regex-util: "npm:30.4.0" + jest-util: "npm:30.4.1" + pirates: "npm:^4.0.7" slash: "npm:^3.0.0" - write-file-atomic: "npm:^4.0.2" - checksum: 10c0/7f4a7f73dcf45dfdf280c7aa283cbac7b6e5a904813c3a93ead7e55873761fc20d5c4f0191d2019004fac6f55f061c82eb3249c2901164ad80e362e7a7ede5a6 + write-file-atomic: "npm:^5.0.1" + checksum: 10c0/194f463f179f6ab3ccd6f4f0f03a117e3c01a7ce098ebf562250aca4c900ed3a9ec08b694227788eabd7cb4e0597f1d0788077c7550ddc679f68a0ad21cc87e0 + languageName: node + linkType: hard + +"@jest/types@npm:30.4.1": + version: 30.4.1 + resolution: "@jest/types@npm:30.4.1" + dependencies: + "@jest/pattern": "npm:30.4.0" + "@jest/schemas": "npm:30.4.1" + "@types/istanbul-lib-coverage": "npm:^2.0.6" + "@types/istanbul-reports": "npm:^3.0.4" + "@types/node": "npm:*" + "@types/yargs": "npm:^17.0.33" + chalk: "npm:^4.1.2" + checksum: 10c0/4c79f6dbdb1c7eaab5da255fc696c7cae744759d4020e42da8aa63b37fe55ce594be73075fe1ee5407dd59d7e47975be9f674bfc81e91bae2c89c62d27ba55a1 languageName: node linkType: hard @@ -3836,7 +5347,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15, @jridgewell/sourcemap-codec@npm:^1.5.0, @jridgewell/sourcemap-codec@npm:^1.5.5": +"@jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0, @jridgewell/sourcemap-codec@npm:^1.5.5": version: 1.5.5 resolution: "@jridgewell/sourcemap-codec@npm:1.5.5" checksum: 10c0/f9e538f302b63c0ebc06eecb1dd9918dd4289ed36147a0ddce35d6ea4d7ebbda243cda7b2213b6a5e1d8087a298d5cf630fb2bd39329cdecb82017023f6081a0 @@ -3853,6 +5364,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/trace-mapping@npm:^0.3.23": + version: 0.3.31 + resolution: "@jridgewell/trace-mapping@npm:0.3.31" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10c0/4b30ec8cd56c5fd9a661f088230af01e0c1a3888d11ffb6b47639700f71225be21d1f7e168048d6d4f9449207b978a235c07c8f15c07705685d16dc06280e9d9 + languageName: node + linkType: hard + "@jsonjoy.com/base64@npm:^1.1.2": version: 1.1.2 resolution: "@jsonjoy.com/base64@npm:1.1.2" @@ -3928,57 +5449,44 @@ __metadata: languageName: node linkType: hard -"@lavamoat/aa@npm:^4.3.1, @lavamoat/aa@npm:^4.3.2": - version: 4.3.4 - resolution: "@lavamoat/aa@npm:4.3.4" - dependencies: - resolve: "npm:1.22.10" - bin: - lavamoat-ls: src/cli.js - checksum: 10c0/1b86a89213f773ef6ba4cace67c88f8685b969357cd8eedd3678c8d2bb27fd4c976d96a1f423abe02855b54c40ef2e28a727d01228a994188c91ba12ff886e1b +"@keyv/serialize@npm:^1.1.1": + version: 1.1.1 + resolution: "@keyv/serialize@npm:1.1.1" + checksum: 10c0/b0008cae4a54400c3abf587b8cc2474c6f528ee58969ce6cf9cb07a04006f80c73c85971d6be6544408318a2bc40108236a19a82aea0a6de95aae49533317374 languageName: node linkType: hard -"@lavamoat/allow-scripts@npm:3.3.1": - version: 3.3.1 - resolution: "@lavamoat/allow-scripts@npm:3.3.1" +"@lavamoat/aa@npm:^5.0.1": + version: 5.0.1 + resolution: "@lavamoat/aa@npm:5.0.1" dependencies: - "@lavamoat/aa": "npm:^4.3.1" - "@npmcli/run-script": "npm:8.1.0" - bin-links: "npm:4.0.4" - npm-normalize-package-bin: "npm:3.0.1" - type-fest: "npm:4.30.0" - yargs: "npm:17.7.2" - peerDependencies: - "@lavamoat/preinstall-always-fail": "*" + resolve: "npm:1.22.12" bin: - allow-scripts: src/cli.js - checksum: 10c0/c272030841a90bb61356e7a226a47a3e5ec431a42314787c86f07d055d7f7218a7cb50619508cc57ecba1ad81b93b72213a56d0b6ea825ecfa586c493fda09f3 + lavamoat-ls: src/cli.js + checksum: 10c0/ec60dd4230c44dcb3a82a71beea3f88a0738e2743bb46fbf3919f0d08bb255775049074453140c9686092591f4285dd49276614a70dd8c4b24129ef385703147 languageName: node linkType: hard -"@lavamoat/allow-scripts@npm:3.3.2": - version: 3.3.2 - resolution: "@lavamoat/allow-scripts@npm:3.3.2" +"@lavamoat/allow-scripts@npm:5.1.0": + version: 5.1.0 + resolution: "@lavamoat/allow-scripts@npm:5.1.0" dependencies: - "@lavamoat/aa": "npm:^4.3.2" - "@npmcli/run-script": "npm:8.1.0" + "@lavamoat/aa": "npm:^5.0.1" + "@npmcli/run-script": "npm:10.0.4" bin-links: "npm:4.0.4" npm-normalize-package-bin: "npm:3.0.1" - type-fest: "npm:4.30.0" - yargs: "npm:17.7.2" - peerDependencies: - "@lavamoat/preinstall-always-fail": "*" + type-fest: "npm:4.41.0" + yargs: "npm:17.7.3" bin: allow-scripts: src/cli.js - checksum: 10c0/20327cce839c84fe36308e26c5125aafdb3a06380ed6cab94306d9d9748e4684e97e67513980db66ef535439706abd45884d4d740277bb693c554ecd31d68b2a + checksum: 10c0/528a7194ec529da68812c1a5c8d9cc7fa6ca082a271c76f339b052d37a80bdd6a8ed9d9c70c6f8c7e075e74457c21a73f6b10ba8eddbd297c162102e7c427233 languageName: node linkType: hard -"@lavamoat/preinstall-always-fail@npm:2.1.0": - version: 2.1.0 - resolution: "@lavamoat/preinstall-always-fail@npm:2.1.0" - checksum: 10c0/c95986ec0e14097e42d3df43a2d70ada692af9b43635bffd6f835a2627e0bbd1fdcc6061b0174e36e780fecf9d3e52e118e5e9fd298a0f1f6af2f534bfe4f2c1 +"@lavamoat/preinstall-always-fail@npm:3.0.0": + version: 3.0.0 + resolution: "@lavamoat/preinstall-always-fail@npm:3.0.0" + checksum: 10c0/9f6b25e852aa81827d1aaa0e66694f73e2e2a8c7397af64461bd51d9826ce9d60812db26f918d7519777076b83ca09f6c024a2b527e30da82032cf1fd3f74290 languageName: node linkType: hard @@ -4189,20 +5697,6 @@ __metadata: languageName: node linkType: hard -"@mswjs/interceptors@npm:^0.40.0": - version: 0.40.0 - resolution: "@mswjs/interceptors@npm:0.40.0" - dependencies: - "@open-draft/deferred-promise": "npm:^2.2.0" - "@open-draft/logger": "npm:^0.3.0" - "@open-draft/until": "npm:^2.0.0" - is-node-process: "npm:^1.2.0" - outvariant: "npm:^1.4.3" - strict-event-emitter: "npm:^0.5.1" - checksum: 10c0/4500f17b65910b2633182fdb15a81ccb6ccd4488a8c45bc2f7acdaaff4621c3cce5362e6b59ddc4fa28d315d0efb0608fd1f0d536bc5345141f8ac03fd7fab22 - languageName: node - linkType: hard - "@napi-rs/wasm-runtime@npm:^1.1.4": version: 1.1.5 resolution: "@napi-rs/wasm-runtime@npm:1.1.5" @@ -4215,15 +5709,6 @@ __metadata: languageName: node linkType: hard -"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1": - version: 5.1.1-v1 - resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1" - dependencies: - eslint-scope: "npm:5.1.1" - checksum: 10c0/75dda3e623b8ad7369ca22552d6beee337a814b2d0e8a32d23edd13fcb65c8082b32c5d86e436f3860dd7ade30d91d5db55d4ef9a08fb5a976c718ecc0d88a74 - languageName: node - linkType: hard - "@noble/ciphers@npm:^1.3.0": version: 1.3.0 resolution: "@noble/ciphers@npm:1.3.0" @@ -4295,26 +5780,6 @@ __metadata: languageName: node linkType: hard -"@nolyfill/is-core-module@npm:1.0.39": - version: 1.0.39 - resolution: "@nolyfill/is-core-module@npm:1.0.39" - checksum: 10c0/34ab85fdc2e0250879518841f74a30c276bca4f6c3e13526d2d1fe515e1adf6d46c25fcd5989d22ea056d76f7c39210945180b4859fc83b050e2da411aa86289 - languageName: node - linkType: hard - -"@npmcli/agent@npm:^2.0.0": - version: 2.2.2 - resolution: "@npmcli/agent@npm:2.2.2" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/325e0db7b287d4154ecd164c0815c08007abfb07653cc57bceded17bb7fd240998a3cbdbe87d700e30bef494885eccc725ab73b668020811d56623d145b524ae - languageName: node - linkType: hard - "@npmcli/agent@npm:^3.0.0": version: 3.0.0 resolution: "@npmcli/agent@npm:3.0.0" @@ -4328,15 +5793,6 @@ __metadata: languageName: node linkType: hard -"@npmcli/fs@npm:^3.1.0": - version: 3.1.1 - resolution: "@npmcli/fs@npm:3.1.1" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/c37a5b4842bfdece3d14dfdb054f73fe15ed2d3da61b34ff76629fb5b1731647c49166fd2a8bf8b56fcfa51200382385ea8909a3cbecdad612310c114d3f6c99 - languageName: node - linkType: hard - "@npmcli/fs@npm:^4.0.0": version: 4.0.0 resolution: "@npmcli/fs@npm:4.0.0" @@ -4346,89 +5802,63 @@ __metadata: languageName: node linkType: hard -"@npmcli/git@npm:^5.0.0": - version: 5.0.8 - resolution: "@npmcli/git@npm:5.0.8" - dependencies: - "@npmcli/promise-spawn": "npm:^7.0.0" - ini: "npm:^4.1.3" - lru-cache: "npm:^10.0.1" - npm-pick-manifest: "npm:^9.0.0" - proc-log: "npm:^4.0.0" - promise-inflight: "npm:^1.0.1" - promise-retry: "npm:^2.0.1" +"@npmcli/git@npm:^7.0.0": + version: 7.0.2 + resolution: "@npmcli/git@npm:7.0.2" + dependencies: + "@gar/promise-retry": "npm:^1.0.0" + "@npmcli/promise-spawn": "npm:^9.0.0" + ini: "npm:^6.0.0" + lru-cache: "npm:^11.2.1" + npm-pick-manifest: "npm:^11.0.1" + proc-log: "npm:^6.0.0" semver: "npm:^7.3.5" - which: "npm:^4.0.0" - checksum: 10c0/892441c968404950809c7b515a93b78167ea1db2252f259f390feae22a2c5477f3e1629e105e19a084c05afc56e585bf3f13c2f13b54a06bfd6786f0c8429532 + which: "npm:^6.0.0" + checksum: 10c0/1936471c3188aa470d0c0dd4d49724bf144e381d122252d001475d69a96cd9de950936f55fec8c6a673a47cf607b11a662fc8b8a45c67d5c37c795b07d2be8e9 languageName: node linkType: hard -"@npmcli/node-gyp@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/node-gyp@npm:3.0.0" - checksum: 10c0/5d0ac17dacf2dd6e45312af2c1ae2749bb0730fcc82da101c37d3a4fd963a5e1c5d39781e5e1e5e5828df4ab1ad4e3fdbab1d69b7cd0abebad9983efb87df985 +"@npmcli/node-gyp@npm:^5.0.0": + version: 5.0.0 + resolution: "@npmcli/node-gyp@npm:5.0.0" + checksum: 10c0/dc78219a848a30d26d46cd174816bdf21936aaee15469888cbd04433981ef866b35611275a1f94a31d68ea60cc18747d0d02430e4ce59f8a5c2423ec35b1bbed languageName: node linkType: hard -"@npmcli/package-json@npm:^5.0.0": - version: 5.2.1 - resolution: "@npmcli/package-json@npm:5.2.1" +"@npmcli/package-json@npm:^7.0.0": + version: 7.0.5 + resolution: "@npmcli/package-json@npm:7.0.5" dependencies: - "@npmcli/git": "npm:^5.0.0" - glob: "npm:^10.2.2" - hosted-git-info: "npm:^7.0.0" - json-parse-even-better-errors: "npm:^3.0.0" - normalize-package-data: "npm:^6.0.0" - proc-log: "npm:^4.0.0" + "@npmcli/git": "npm:^7.0.0" + glob: "npm:^13.0.0" + hosted-git-info: "npm:^9.0.0" + json-parse-even-better-errors: "npm:^5.0.0" + proc-log: "npm:^6.0.0" semver: "npm:^7.5.3" - checksum: 10c0/b852e31e3121a0afe5fa20bbf4faa701a59dbc9d9dd7141f7fd57b8e919ce22c1285dcdfea490851fe410fa0f7bc9c397cafba0d268aaa53420a12d7c561dde1 - languageName: node - linkType: hard - -"@npmcli/promise-spawn@npm:^7.0.0": - version: 7.0.2 - resolution: "@npmcli/promise-spawn@npm:7.0.2" - dependencies: - which: "npm:^4.0.0" - checksum: 10c0/8f2af5bc2c1b1ccfb9bcd91da8873ab4723616d8bd5af877c0daa40b1e2cbfa4afb79e052611284179cae918c945a1b99ae1c565d78a355bec1a461011e89f71 - languageName: node - linkType: hard - -"@npmcli/run-script@npm:8.1.0": - version: 8.1.0 - resolution: "@npmcli/run-script@npm:8.1.0" - dependencies: - "@npmcli/node-gyp": "npm:^3.0.0" - "@npmcli/package-json": "npm:^5.0.0" - "@npmcli/promise-spawn": "npm:^7.0.0" - node-gyp: "npm:^10.0.0" - proc-log: "npm:^4.0.0" - which: "npm:^4.0.0" - checksum: 10c0/f9f40ecff0406a9ce1b77c9f714fc7c71b561289361efc6e2e0e48ca2d630aa98d277cbbf269750f9467a40eaaac79e78766d67c458046aa9507c8c354650fee - languageName: node - linkType: hard - -"@open-draft/deferred-promise@npm:^2.2.0": - version: 2.2.0 - resolution: "@open-draft/deferred-promise@npm:2.2.0" - checksum: 10c0/eafc1b1d0fc8edb5e1c753c5e0f3293410b40dde2f92688211a54806d4136887051f39b98c1950370be258483deac9dfd17cf8b96557553765198ef2547e4549 + spdx-expression-parse: "npm:^4.0.0" + checksum: 10c0/4a04af494cd7273d4a5e930f53f30217dad389c7eaeb4de667aca84be27e668ebd8b16a6923ce58dc3090030f9126885b4cfc790517050acf179d0d9e0ca6de1 languageName: node linkType: hard -"@open-draft/logger@npm:^0.3.0": - version: 0.3.0 - resolution: "@open-draft/logger@npm:0.3.0" +"@npmcli/promise-spawn@npm:^9.0.0": + version: 9.0.1 + resolution: "@npmcli/promise-spawn@npm:9.0.1" dependencies: - is-node-process: "npm:^1.2.0" - outvariant: "npm:^1.4.0" - checksum: 10c0/90010647b22e9693c16258f4f9adb034824d1771d3baa313057b9a37797f571181005bc50415a934eaf7c891d90ff71dcd7a9d5048b0b6bb438f31bef2c7c5c1 + which: "npm:^6.0.0" + checksum: 10c0/361872192934bda684f590f140a2edd68add90d5936ca9a2e8792435447847adb59e249d5976950e20bbf213898c04da1b51b62fbc8f258b2fa8601af37fa0e2 languageName: node linkType: hard -"@open-draft/until@npm:^2.0.0": - version: 2.1.0 - resolution: "@open-draft/until@npm:2.1.0" - checksum: 10c0/61d3f99718dd86bb393fee2d7a785f961dcaf12f2055f0c693b27f4d0cd5f7a03d498a6d9289773b117590d794a43cd129366fd8e99222e4832f67b1653d54cf +"@npmcli/run-script@npm:10.0.4": + version: 10.0.4 + resolution: "@npmcli/run-script@npm:10.0.4" + dependencies: + "@npmcli/node-gyp": "npm:^5.0.0" + "@npmcli/package-json": "npm:^7.0.0" + "@npmcli/promise-spawn": "npm:^9.0.0" + node-gyp: "npm:^12.1.0" + proc-log: "npm:^6.0.0" + checksum: 10c0/4d65682491ce7462c6a16a3d20511f70074a0ab384e4e08786ff6c2df9630ad29caa564b5ace49ec3ba5a7f483dfbd13168da903c433a48e59c73189306b1a2f languageName: node linkType: hard @@ -4728,13 +6158,6 @@ __metadata: languageName: node linkType: hard -"@pkgr/core@npm:^0.1.0": - version: 0.1.2 - resolution: "@pkgr/core@npm:0.1.2" - checksum: 10c0/fd4acc154c8f1b5c544b6dd152b7ce68f6cbb8b92e9abf2e5d756d6e95052d08d0d693a668dea67af1386d62635b50adfe463cce03c5620402b468498cc7592f - languageName: node - linkType: hard - "@pkgr/core@npm:^0.2.7": version: 0.2.10 resolution: "@pkgr/core@npm:0.2.10" @@ -5241,140 +6664,118 @@ __metadata: languageName: node linkType: hard -"@sentry-internal/browser-utils@npm:9.13.0": - version: 9.13.0 - resolution: "@sentry-internal/browser-utils@npm:9.13.0" - dependencies: - "@sentry/core": "npm:9.13.0" - checksum: 10c0/d66703f64ea91f6a05a4ec8d96f35f9f89d9e5d9ca122d09dafb04f6af82b20214dc117f84aeca76adfed2155e2fda374336a1362ad31b6cc5e76ef5ae372d77 - languageName: node - linkType: hard - -"@sentry-internal/feedback@npm:9.13.0": - version: 9.13.0 - resolution: "@sentry-internal/feedback@npm:9.13.0" - dependencies: - "@sentry/core": "npm:9.13.0" - checksum: 10c0/905b9a45f1c411b3a267f9a28fe8677fbab50819e8a35c4571cb9415088122dbf8e8649d65d608d00c2a0365d438faedcdbb709f77cf1fa141bbea0ee09a6899 - languageName: node - linkType: hard - -"@sentry-internal/replay-canvas@npm:9.13.0": - version: 9.13.0 - resolution: "@sentry-internal/replay-canvas@npm:9.13.0" - dependencies: - "@sentry-internal/replay": "npm:9.13.0" - "@sentry/core": "npm:9.13.0" - checksum: 10c0/17586760e801044ed9c240f991a372f24647f8f720a1b5fecc8796e2a4205226905056327d5786864d42aa1f3f16592dbd7041637681358e9ed4b0fd1a1b05bd +"@sentry/babel-plugin-component-annotate@npm:5.3.0": + version: 5.3.0 + resolution: "@sentry/babel-plugin-component-annotate@npm:5.3.0" + checksum: 10c0/744ef0fdc71fb30210ddabcdd665a2b69985b5e85fd12a65c456e0cb6286f5df71e304918058d285bc7fcb794792da91541cc290dc1f738aa406a6a40472e456 languageName: node linkType: hard -"@sentry-internal/replay@npm:9.13.0": - version: 9.13.0 - resolution: "@sentry-internal/replay@npm:9.13.0" +"@sentry/browser-utils@npm:10.62.0": + version: 10.62.0 + resolution: "@sentry/browser-utils@npm:10.62.0" dependencies: - "@sentry-internal/browser-utils": "npm:9.13.0" - "@sentry/core": "npm:9.13.0" - checksum: 10c0/1a1441ca164ceea4aa30b5217acdd27a8f639d6670241ea24fbed7dcb8e61fefb7ac41543eecd61be620884fb205abacf90aa4efc909a9194b175586db3e628a - languageName: node - linkType: hard - -"@sentry/babel-plugin-component-annotate@npm:3.3.1": - version: 3.3.1 - resolution: "@sentry/babel-plugin-component-annotate@npm:3.3.1" - checksum: 10c0/f7be2e93be57f6391cbf01b04f0ccb5fc60f939cd3b834269748b70c38cc9dbaba288539afa19f066b9b4bf32cf6c3ef7ad86505d8370d5ac062bfd93940c7a1 + "@sentry/core": "npm:10.62.0" + checksum: 10c0/72bc5834ec840120fd16ceb99e25205c1a2eac7e6a528cf80287099d9f413d4e2d3461aa19ffb94fb6fd0387ec1c47b5226ae1db3b0aff94f1989c3c8543fa5d languageName: node linkType: hard -"@sentry/browser@npm:9.13.0": - version: 9.13.0 - resolution: "@sentry/browser@npm:9.13.0" +"@sentry/browser@npm:10.62.0": + version: 10.62.0 + resolution: "@sentry/browser@npm:10.62.0" dependencies: - "@sentry-internal/browser-utils": "npm:9.13.0" - "@sentry-internal/feedback": "npm:9.13.0" - "@sentry-internal/replay": "npm:9.13.0" - "@sentry-internal/replay-canvas": "npm:9.13.0" - "@sentry/core": "npm:9.13.0" - checksum: 10c0/0e1126be2546c9f99d2c883e8f1f1ede427e186d05f7d940f8e5374757a884d4e82a193da29face5cf07c3f1ec05206d09a04ceebd264b77419c92096de76162 + "@sentry/browser-utils": "npm:10.62.0" + "@sentry/core": "npm:10.62.0" + "@sentry/feedback": "npm:10.62.0" + "@sentry/replay": "npm:10.62.0" + "@sentry/replay-canvas": "npm:10.62.0" + checksum: 10c0/02d06944d2d09d76f79c395f7cf035caf13bfb4598a71d7a1304318cfe84bee923388d5e4d6e41cdddb32b4d803e8642c3fd26056c8f2b5108eab9946e04b486 languageName: node linkType: hard -"@sentry/bundler-plugin-core@npm:3.3.1": - version: 3.3.1 - resolution: "@sentry/bundler-plugin-core@npm:3.3.1" +"@sentry/bundler-plugin-core@npm:5.3.0": + version: 5.3.0 + resolution: "@sentry/bundler-plugin-core@npm:5.3.0" dependencies: "@babel/core": "npm:^7.18.5" - "@sentry/babel-plugin-component-annotate": "npm:3.3.1" - "@sentry/cli": "npm:2.42.2" + "@sentry/babel-plugin-component-annotate": "npm:5.3.0" + "@sentry/cli": "npm:^2.58.5" dotenv: "npm:^16.3.1" find-up: "npm:^5.0.0" - glob: "npm:^9.3.2" - magic-string: "npm:0.30.8" - unplugin: "npm:1.0.1" - checksum: 10c0/d16829d4996d5869eb503866c043a85ffe49f3c9b42c745b9356f6978c02ad3c8b37bc8f5f49e18a948394c876ce11099d264eb81f149cfea4912883a5fe779b + glob: "npm:^13.0.6" + magic-string: "npm:~0.30.8" + checksum: 10c0/7eb681a6da7bb13d1217c76caef4000a1158c597c40a5f1f5bb2a8d4884cfb83df7bab960ee7eececf00f1950c9e276f361f82299c94b9c4c4b910abf931f9d5 languageName: node linkType: hard -"@sentry/cli-darwin@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli-darwin@npm:2.42.2" +"@sentry/cli-darwin@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-darwin@npm:2.58.6" conditions: os=darwin languageName: node linkType: hard -"@sentry/cli-linux-arm64@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli-linux-arm64@npm:2.42.2" - conditions: (os=linux | os=freebsd) & cpu=arm64 +"@sentry/cli-linux-arm64@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-linux-arm64@npm:2.58.6" + conditions: (os=linux | os=freebsd | os=android) & cpu=arm64 + languageName: node + linkType: hard + +"@sentry/cli-linux-arm@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-linux-arm@npm:2.58.6" + conditions: (os=linux | os=freebsd | os=android) & cpu=arm languageName: node linkType: hard -"@sentry/cli-linux-arm@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli-linux-arm@npm:2.42.2" - conditions: (os=linux | os=freebsd) & cpu=arm +"@sentry/cli-linux-i686@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-linux-i686@npm:2.58.6" + conditions: (os=linux | os=freebsd | os=android) & (cpu=x86 | cpu=ia32) languageName: node linkType: hard -"@sentry/cli-linux-i686@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli-linux-i686@npm:2.42.2" - conditions: (os=linux | os=freebsd) & (cpu=x86 | cpu=ia32) +"@sentry/cli-linux-x64@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-linux-x64@npm:2.58.6" + conditions: (os=linux | os=freebsd | os=android) & cpu=x64 languageName: node linkType: hard -"@sentry/cli-linux-x64@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli-linux-x64@npm:2.42.2" - conditions: (os=linux | os=freebsd) & cpu=x64 +"@sentry/cli-win32-arm64@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-win32-arm64@npm:2.58.6" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@sentry/cli-win32-i686@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli-win32-i686@npm:2.42.2" +"@sentry/cli-win32-i686@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-win32-i686@npm:2.58.6" conditions: os=win32 & (cpu=x86 | cpu=ia32) languageName: node linkType: hard -"@sentry/cli-win32-x64@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli-win32-x64@npm:2.42.2" +"@sentry/cli-win32-x64@npm:2.58.6": + version: 2.58.6 + resolution: "@sentry/cli-win32-x64@npm:2.58.6" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@sentry/cli@npm:2.42.2": - version: 2.42.2 - resolution: "@sentry/cli@npm:2.42.2" +"@sentry/cli@npm:^2.58.5": + version: 2.58.6 + resolution: "@sentry/cli@npm:2.58.6" dependencies: - "@sentry/cli-darwin": "npm:2.42.2" - "@sentry/cli-linux-arm": "npm:2.42.2" - "@sentry/cli-linux-arm64": "npm:2.42.2" - "@sentry/cli-linux-i686": "npm:2.42.2" - "@sentry/cli-linux-x64": "npm:2.42.2" - "@sentry/cli-win32-i686": "npm:2.42.2" - "@sentry/cli-win32-x64": "npm:2.42.2" + "@sentry/cli-darwin": "npm:2.58.6" + "@sentry/cli-linux-arm": "npm:2.58.6" + "@sentry/cli-linux-arm64": "npm:2.58.6" + "@sentry/cli-linux-i686": "npm:2.58.6" + "@sentry/cli-linux-x64": "npm:2.58.6" + "@sentry/cli-win32-arm64": "npm:2.58.6" + "@sentry/cli-win32-i686": "npm:2.58.6" + "@sentry/cli-win32-x64": "npm:2.58.6" https-proxy-agent: "npm:^5.0.0" node-fetch: "npm:^2.6.7" progress: "npm:^2.0.3" @@ -5391,33 +6792,62 @@ __metadata: optional: true "@sentry/cli-linux-x64": optional: true + "@sentry/cli-win32-arm64": + optional: true "@sentry/cli-win32-i686": optional: true "@sentry/cli-win32-x64": optional: true bin: sentry-cli: bin/sentry-cli - checksum: 10c0/286910a194a386b9f21ef9e6dc171cbba35f1db09cb3bd53f19724ccf08b0819fb1c35e7fd2e7844da24a28428ca94ff3be7ae85f14056d6e6fc0193976d3815 + checksum: 10c0/3037c8c03d0b56114d4bdccc409a88b2e48df3544b2ddd800556a70d45b72e889e1dc5fc1a2997d962f9d047e360d30e5090d8f454078c9d7be1545ad32e7c0c languageName: node linkType: hard -"@sentry/core@npm:9.13.0": - version: 9.13.0 - resolution: "@sentry/core@npm:9.13.0" - checksum: 10c0/20f566732b8caa59dd5fb1841f3708f38740c4aa78746964a538381985d66d50e4904061ebec083f72092bc656750e51c44b1287282b3ed52b4107530bc49fdc +"@sentry/core@npm:10.62.0": + version: 10.62.0 + resolution: "@sentry/core@npm:10.62.0" + checksum: 10c0/559f7deed4073c05496df24ce2d37ad7407c723982be36d4a1bcd096356a89388bb3c475823b67e7e3fe7efee873d0065fa56c0af1de9ae44ed87f71c1d3445b languageName: node linkType: hard -"@sentry/webpack-plugin@npm:3.3.1": - version: 3.3.1 - resolution: "@sentry/webpack-plugin@npm:3.3.1" +"@sentry/feedback@npm:10.62.0": + version: 10.62.0 + resolution: "@sentry/feedback@npm:10.62.0" + dependencies: + "@sentry/core": "npm:10.62.0" + checksum: 10c0/608c0c62609f26d083177f0747e2b895d9761a7e16bd65888f9be694e9a1dcaddeb9d4e8dfbb67df16122d0f472cbc50c8d3d154c69e6643cc08b8a5695b5405 + languageName: node + linkType: hard + +"@sentry/replay-canvas@npm:10.62.0": + version: 10.62.0 + resolution: "@sentry/replay-canvas@npm:10.62.0" + dependencies: + "@sentry/core": "npm:10.62.0" + "@sentry/replay": "npm:10.62.0" + checksum: 10c0/70ea700f626ac83c516b596ad3cfd0887405cf1aa8b5de5ce278aee9614a86431966364dad1eb3e01280a7d354cba68b79ec046dabdbf6e404d38e3e0e510583 + languageName: node + linkType: hard + +"@sentry/replay@npm:10.62.0": + version: 10.62.0 + resolution: "@sentry/replay@npm:10.62.0" + dependencies: + "@sentry/browser-utils": "npm:10.62.0" + "@sentry/core": "npm:10.62.0" + checksum: 10c0/d7c3198725032ab5b5cc2aa6b03d1f498c7661a1694bc062cfb608f43b596901927a1218511cce901b32f77bf86e3e7311a105b9aeaf32d04b5d4603244a2573 + languageName: node + linkType: hard + +"@sentry/webpack-plugin@npm:5.3.0": + version: 5.3.0 + resolution: "@sentry/webpack-plugin@npm:5.3.0" dependencies: - "@sentry/bundler-plugin-core": "npm:3.3.1" - unplugin: "npm:1.0.1" - uuid: "npm:^9.0.0" + "@sentry/bundler-plugin-core": "npm:5.3.0" peerDependencies: - webpack: ">=4.40.0" - checksum: 10c0/c3e9db6bfd7b03ae3f1655a8543b21002555c655da2d54fcb73c068bc870b141c632eba8f8d38e495354981689553d649ab859acf9ee21e949cc6c1cd1ccb491 + webpack: ">=5.0.0" + checksum: 10c0/1a24a3502dd673a5cb1c893196599c212a3aea1202d1a3d47934487f5055c80a3aae9ee1c7bde835257222d78ae3247c7b218a89beb45f89d391d673437a4782 languageName: node linkType: hard @@ -5425,14 +6855,14 @@ __metadata: version: 0.0.0-use.local resolution: "@shared/api@workspace:@shared/api" dependencies: - "@blockaid/client": "npm:0.31.0" - "@lavamoat/allow-scripts": "npm:3.3.2" + "@blockaid/client": "npm:1.4.0" + "@lavamoat/allow-scripts": "npm:5.1.0" "@stellar/js-xdr": "npm:4.0.0" - bignumber.js: "npm:9.3.0" + bignumber.js: "npm:11.1.4" prettier: "npm:3.8.4" stellar-sdk: "npm:@stellar/stellar-sdk@16.0.0-rc.1" stellar-sdk-next: "npm:@stellar/stellar-sdk@16.0.0-rc.1" - typescript: "npm:5.8.3" + typescript: "npm:6.0.3" webextension-polyfill: "npm:0.12.0" languageName: unknown linkType: soft @@ -5441,10 +6871,10 @@ __metadata: version: 0.0.0-use.local resolution: "@shared/constants@workspace:@shared/constants" dependencies: - "@lavamoat/allow-scripts": "npm:3.3.2" + "@lavamoat/allow-scripts": "npm:5.1.0" stellar-sdk: "npm:@stellar/stellar-sdk@16.0.0-rc.1" stellar-sdk-next: "npm:@stellar/stellar-sdk@16.0.0-rc.1" - typescript: "npm:5.8.3" + typescript: "npm:6.0.3" languageName: unknown linkType: soft @@ -5452,10 +6882,10 @@ __metadata: version: 0.0.0-use.local resolution: "@shared/helpers@workspace:@shared/helpers" dependencies: - bignumber.js: "npm:9.3.0" + bignumber.js: "npm:11.1.4" stellar-sdk: "npm:@stellar/stellar-sdk@16.0.0-rc.1" stellar-sdk-next: "npm:@stellar/stellar-sdk@16.0.0-rc.1" - typescript: "npm:5.8.3" + typescript: "npm:6.0.3" languageName: unknown linkType: soft @@ -5489,6 +6919,20 @@ __metadata: languageName: node linkType: hard +"@sinclair/typebox@npm:^0.34.0": + version: 0.34.49 + resolution: "@sinclair/typebox@npm:0.34.49" + checksum: 10c0/16b7d87f039a49b68c10bb4cdcae2ce5242b2472228851fd6483731616aba4ef977690aa517b230a8d20da8185bb416eb34e326f30568b3963c1cf26b05d1ad8 + languageName: node + linkType: hard + +"@sindresorhus/base62@npm:^1.0.0": + version: 1.0.0 + resolution: "@sindresorhus/base62@npm:1.0.0" + checksum: 10c0/9a14df0f058fdf4731c30f0f05728a4822144ee42236030039d7fa5a1a1072c2879feba8091fd4a17c8922d1056bc07bada77c31fddc3e15836fc05a266fd918 + languageName: node + linkType: hard + "@sindresorhus/is@npm:^4.6.0": version: 4.6.0 resolution: "@sindresorhus/is@npm:4.6.0" @@ -5503,10 +6947,10 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/is@npm:^7.0.1": - version: 7.0.2 - resolution: "@sindresorhus/is@npm:7.0.2" - checksum: 10c0/50881c9b651e189972087de9104e0d259a2a0dc93c604e863b3be1847e31c3dce685e76a41c0ae92198ae02b36d30d07b723a2d72015ce3cf910afc6dc337ff5 +"@sindresorhus/is@npm:^8.0.0": + version: 8.1.0 + resolution: "@sindresorhus/is@npm:8.1.0" + checksum: 10c0/45e17a558af61fc7f0ee891a48060961f25534fc3836c464146f836d0df32f19fc4fa326c3f195186f104a81ee17253885f7b2dc71abe052e8f18fc233cfa790 languageName: node linkType: hard @@ -5526,15 +6970,6 @@ __metadata: languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^10.0.2": - version: 10.3.0 - resolution: "@sinonjs/fake-timers@npm:10.3.0" - dependencies: - "@sinonjs/commons": "npm:^3.0.0" - checksum: 10c0/2e2fb6cc57f227912814085b7b01fede050cd4746ea8d49a1e44d5a0e56a804663b0340ae2f11af7559ea9bf4d087a11f2f646197a660ea3cb04e19efc04aa63 - languageName: node - linkType: hard - "@sinonjs/fake-timers@npm:^11.2.2": version: 11.3.1 resolution: "@sinonjs/fake-timers@npm:11.3.1" @@ -5544,6 +6979,15 @@ __metadata: languageName: node linkType: hard +"@sinonjs/fake-timers@npm:^15.4.0": + version: 15.4.0 + resolution: "@sinonjs/fake-timers@npm:15.4.0" + dependencies: + "@sinonjs/commons": "npm:^3.0.1" + checksum: 10c0/de4522afe0699fa8d3ae9d1715cbaa4b47e518c707bb7988a9ec6c7c67557d9f6df451f6be0338598b984a86f65aab9fab38dd9ce75a3c0ffb801a9500d5b10d + languageName: node + linkType: hard + "@sinonjs/samsam@npm:^8.0.0": version: 8.0.3 resolution: "@sinonjs/samsam@npm:8.0.3" @@ -5616,14 +7060,7 @@ __metadata: languageName: node linkType: hard -"@stellar/freighter-api@npm:^2.0.0": - version: 2.0.0 - resolution: "@stellar/freighter-api@npm:2.0.0" - checksum: 10c0/ff3379a89f001930504e129d04b6b8d408b120b6a5c39c25bbf927cf7a1dc66381baeb877610049492055fffe2a91ac877d253ad73521079a74895cc1e97d996 - languageName: node - linkType: hard - -"@stellar/freighter-api@npm:latest": +"@stellar/freighter-api@npm:6.0.1, @stellar/freighter-api@npm:latest": version: 6.0.1 resolution: "@stellar/freighter-api@npm:6.0.1" dependencies: @@ -5637,13 +7074,13 @@ __metadata: version: 0.0.0-use.local resolution: "@stellar/freighter-api@workspace:@stellar/freighter-api" dependencies: - "@lavamoat/allow-scripts": "npm:3.3.2" + "@lavamoat/allow-scripts": "npm:5.1.0" buffer: "npm:6.0.3" semver: "npm:7.8.4" languageName: unknown linkType: soft -"@stellar/js-xdr@npm:4.0.0": +"@stellar/js-xdr@npm:4.0.0, @stellar/js-xdr@npm:^4.0.0": version: 4.0.0 resolution: "@stellar/js-xdr@npm:4.0.0" checksum: 10c0/617bb3d7fa9fbdb607e5cb42cc032a15ad1c111440c6d7ede40fcecde204e88ed351aebc80ce1e4eedac6c1d949c3da5722696611e2b00569e7edbd5a0634c37 @@ -5657,24 +7094,6 @@ __metadata: languageName: node linkType: hard -"@stellar/stellar-base@npm:13.0.0-beta.1": - version: 13.0.0-beta.1 - resolution: "@stellar/stellar-base@npm:13.0.0-beta.1" - dependencies: - "@stellar/js-xdr": "npm:^3.1.2" - base32.js: "npm:^0.1.0" - bignumber.js: "npm:^9.1.2" - buffer: "npm:^6.0.3" - sha.js: "npm:^2.3.6" - sodium-native: "npm:^4.1.1" - tweetnacl: "npm:^1.0.3" - dependenciesMeta: - sodium-native: - optional: true - checksum: 10c0/9bc23198dd941297aa3f74a66a1d9ef51a1afad341d2b6464fe608185feedb254d2c11da78bdb3f82edec432a1d0bb579a013db1e4e68446435815c714067a02 - languageName: node - linkType: hard - "@stellar/stellar-base@npm:13.1.0": version: 13.1.0 resolution: "@stellar/stellar-base@npm:13.1.0" @@ -5711,19 +7130,36 @@ __metadata: languageName: node linkType: hard -"@stellar/stellar-sdk@npm:13.0.0-beta.1": - version: 13.0.0-beta.1 - resolution: "@stellar/stellar-sdk@npm:13.0.0-beta.1" +"@stellar/stellar-base@npm:^15.0.0": + version: 15.0.0 + resolution: "@stellar/stellar-base@npm:15.0.0" dependencies: - "@stellar/stellar-base": "npm:13.0.0-beta.1" - axios: "npm:^1.7.7" - bignumber.js: "npm:^9.1.2" + "@noble/curves": "npm:^1.9.7" + "@stellar/js-xdr": "npm:^4.0.0" + base32.js: "npm:^0.1.0" + bignumber.js: "npm:^9.3.1" + buffer: "npm:^6.0.3" + sha.js: "npm:^2.4.12" + checksum: 10c0/6493d5bfe2ad715e55eeb9441a0316a492fde005360ceb7454fa6b4af5f2be84bb1b60cdf74495d19562d7b82adaee045678edd37805d1870dc6d7220c760292 + languageName: node + linkType: hard + +"@stellar/stellar-sdk@npm:15.0.1": + version: 15.0.1 + resolution: "@stellar/stellar-sdk@npm:15.0.1" + dependencies: + "@stellar/stellar-base": "npm:^15.0.0" + axios: "npm:1.14.0" + bignumber.js: "npm:^9.3.1" + commander: "npm:^14.0.3" eventsource: "npm:^2.0.2" - feaxios: "npm:^0.0.20" + feaxios: "npm:^0.0.23" randombytes: "npm:^2.1.0" toml: "npm:^3.0.0" - urijs: "npm:^1.19.1" - checksum: 10c0/2c5fba24d4b3794a641a2a520c7f419c8ae9529be64930994b21188920bf5e98da0830a9cefc6167c18e96008d51a7c26bdb1ee138b57ab020f633573dc6a3c9 + urijs: "npm:^1.19.11" + bin: + stellar-js: bin/stellar-js + checksum: 10c0/73a5f972db0004492ea8f541ef3e12fa5a6769d6e2affd4535bd4d3680e3828a767bce182d6171dc74cc3e2486d17a9ce1ddc912e94fe73c7fe34f0c1008f5ed languageName: node linkType: hard @@ -5742,23 +7178,23 @@ __metadata: languageName: node linkType: hard -"@stellar/typescript-wallet-sdk-km@npm:1.9.0": - version: 1.9.0 - resolution: "@stellar/typescript-wallet-sdk-km@npm:1.9.0" +"@stellar/typescript-wallet-sdk-km@npm:3.0.1": + version: 3.0.1 + resolution: "@stellar/typescript-wallet-sdk-km@npm:3.0.1" dependencies: "@albedo-link/intent": "npm:^0.12.0" "@ledgerhq/hw-app-str": "npm:^6.28.4" "@ledgerhq/hw-transport-u2f": "npm:^5.36.0-deprecated" "@stablelib/base64": "npm:^2.0.0" "@stablelib/utf8": "npm:^2.0.0" - "@stellar/freighter-api": "npm:^2.0.0" - "@stellar/stellar-sdk": "npm:13.0.0-beta.1" + "@stellar/freighter-api": "npm:6.0.1" + "@stellar/stellar-sdk": "npm:15.0.1" "@trezor/connect-plugin-stellar": "npm:^9.0.2" bignumber.js: "npm:^9.1.2" scrypt-async: "npm:^2.0.1" trezor-connect: "npm:^8.2.12" tweetnacl: "npm:^1.0.3" - checksum: 10c0/95dd1667fd14173a8f9b0b40bce149158b266656d9ce0e86be42697e157c378f9ef4216efab9a81ca11ac4a9a3fa5e07b29c18cf8bd7077916342a82f03a1bf7 + checksum: 10c0/19bc91b4fa9eb191b9b5fa5d0c2f4d4f6cb5f54712052d95dc0ae21971d0e3befc2c30722e8940ad67fd092d78dfb3c28f4e785fed934d6afbdd248388658ef1 languageName: node linkType: hard @@ -6150,13 +7586,6 @@ __metadata: languageName: node linkType: hard -"@tootallnate/once@npm:2": - version: 2.0.0 - resolution: "@tootallnate/once@npm:2.0.0" - checksum: 10c0/073bfa548026b1ebaf1659eb8961e526be22fa77139b10d60e712f46d2f0f05f4e6c8bec62a087d41088ee9e29faa7f54838568e475ab2f776171003c3920858 - languageName: node - linkType: hard - "@trezor/connect-plugin-stellar@npm:^9.0.2": version: 9.2.1 resolution: "@trezor/connect-plugin-stellar@npm:9.2.1" @@ -6208,7 +7637,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.1.14": +"@types/babel__core@npm:^7.20.5": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" dependencies: @@ -6240,7 +7669,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": +"@types/babel__traverse@npm:*": version: 7.28.0 resolution: "@types/babel__traverse@npm:7.28.0" dependencies: @@ -6325,6 +7754,13 @@ __metadata: languageName: node linkType: hard +"@types/esrecurse@npm:^4.3.1": + version: 4.3.1 + resolution: "@types/esrecurse@npm:4.3.1" + checksum: 10c0/90dad74d5da3ad27606d8e8e757322f33171cfeaa15ad558b615cf71bb2a516492d18f55f4816384685a3eb2412142e732bbae9a4a7cd2cf3deb7572aa4ebe03 + languageName: node + linkType: hard + "@types/estree-jsx@npm:^1.0.0": version: 1.0.5 resolution: "@types/estree-jsx@npm:1.0.5" @@ -6341,6 +7777,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:^1.0.9": + version: 1.0.9 + resolution: "@types/estree@npm:1.0.9" + checksum: 10c0/3ad3286ca2988cd550dafb8f2ad599c8474868e954fa601a36655bdfefd8039f7c714b8c1c7f2ae219ffbd58bd4660e66fa7479a0120fc02d4777057d4865387 + languageName: node + linkType: hard + "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^5.0.0": version: 5.0.7 resolution: "@types/express-serve-static-core@npm:5.0.7" @@ -6404,12 +7847,10 @@ __metadata: languageName: node linkType: hard -"@types/graceful-fs@npm:^4.1.3": - version: 4.1.9 - resolution: "@types/graceful-fs@npm:4.1.9" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/235d2fc69741448e853333b7c3d1180a966dd2b8972c8cbcd6b2a0c6cd7f8d582ab2b8e58219dbc62cce8f1b40aa317ff78ea2201cdd8249da5025adebed6f0b +"@types/gensync@npm:^1.0.5": + version: 1.0.5 + resolution: "@types/gensync@npm:1.0.5" + checksum: 10c0/7c37c8fc3b1a49efd8889f635a6204008f1c1cc86a09ac6a96e219cf3fc52cf1ff091c4dddc3160e93261d6e599fbba39f5fb698fbf936518d1c410289cdd640 languageName: node linkType: hard @@ -6461,13 +7902,20 @@ __metadata: languageName: node linkType: hard -"@types/http-cache-semantics@npm:^4.0.2, @types/http-cache-semantics@npm:^4.0.4": +"@types/http-cache-semantics@npm:^4.0.2": version: 4.0.4 resolution: "@types/http-cache-semantics@npm:4.0.4" checksum: 10c0/51b72568b4b2863e0fe8d6ce8aad72a784b7510d72dc866215642da51d84945a9459fa89f49ec48f1e9a1752e6a78e85a4cda0ded06b1c73e727610c925f9ce6 languageName: node linkType: hard +"@types/http-cache-semantics@npm:^4.2.0": + version: 4.2.0 + resolution: "@types/http-cache-semantics@npm:4.2.0" + checksum: 10c0/82dd33cbe7d4843f1e884a251c6a12d385b62274353b9db167462e7fbffdbb3a83606f9952203017c5b8cabbd7b9eef0cf240a3a9dedd20f69875c9701939415 + languageName: node + linkType: hard + "@types/http-errors@npm:*": version: 2.0.5 resolution: "@types/http-errors@npm:2.0.5" @@ -6484,7 +7932,7 @@ __metadata: languageName: node linkType: hard -"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": +"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1, @types/istanbul-lib-coverage@npm:^2.0.6": version: 2.0.6 resolution: "@types/istanbul-lib-coverage@npm:2.0.6" checksum: 10c0/3948088654f3eeb45363f1db158354fb013b362dba2a5c2c18c559484d5eb9f6fd85b23d66c0a7c2fcfab7308d0a585b14dadaca6cc8bf89ebfdc7f8f5102fb7 @@ -6500,7 +7948,7 @@ __metadata: languageName: node linkType: hard -"@types/istanbul-reports@npm:^3.0.0": +"@types/istanbul-reports@npm:^3.0.0, @types/istanbul-reports@npm:^3.0.4": version: 3.0.4 resolution: "@types/istanbul-reports@npm:3.0.4" dependencies: @@ -6509,13 +7957,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:29.5.14": - version: 29.5.14 - resolution: "@types/jest@npm:29.5.14" +"@types/jest@npm:30.0.0": + version: 30.0.0 + resolution: "@types/jest@npm:30.0.0" dependencies: - expect: "npm:^29.0.0" - pretty-format: "npm:^29.0.0" - checksum: 10c0/18e0712d818890db8a8dab3d91e9ea9f7f19e3f83c2e50b312f557017dc81466207a71f3ed79cf4428e813ba939954fa26ffa0a9a7f153181ba174581b1c2aed + expect: "npm:^30.0.0" + pretty-format: "npm:^30.0.0" + checksum: 10c0/20c6ce574154bc16f8dd6a97afacca4b8c4921a819496a3970382031c509ebe87a1b37b152a1b8475089b82d8ca951a9e95beb4b9bf78fbf579b1536f0b65969 languageName: node linkType: hard @@ -6526,25 +7974,33 @@ __metadata: languageName: node linkType: hard -"@types/jsdom@npm:21.1.7": - version: 21.1.7 - resolution: "@types/jsdom@npm:21.1.7" +"@types/jsdom@npm:28.0.3": + version: 28.0.3 + resolution: "@types/jsdom@npm:28.0.3" dependencies: "@types/node": "npm:*" "@types/tough-cookie": "npm:*" - parse5: "npm:^7.0.0" - checksum: 10c0/c0c0025adc2b193e85453eeeea168bb909f0ebad08d6552be7474a407e9c163db8f696dcf1e3cbe8cb9c9d970ba45f4386171794509c1a0fe5d1fed72c91679d + parse5: "npm:^8.0.0" + undici-types: "npm:^7.21.0" + checksum: 10c0/08b1cd61ee3e9610676be3c68a782a94667b86a5f73b8a262095d05f84c9e864fc11b25ae53450cd519a0abd46c202906a735bd61aa176257a981964bc5b1166 languageName: node linkType: hard -"@types/jsdom@npm:^20.0.0": - version: 20.0.1 - resolution: "@types/jsdom@npm:20.0.1" +"@types/jsdom@npm:^21.1.7": + version: 21.1.7 + resolution: "@types/jsdom@npm:21.1.7" dependencies: "@types/node": "npm:*" "@types/tough-cookie": "npm:*" parse5: "npm:^7.0.0" - checksum: 10c0/3d4b2a3eab145674ee6da482607c5e48977869109f0f62560bf91ae1a792c9e847ac7c6aaf243ed2e97333cb3c51aef314ffa54a19ef174b8f9592dfcb836b25 + checksum: 10c0/c0c0025adc2b193e85453eeeea168bb909f0ebad08d6552be7474a407e9c163db8f696dcf1e3cbe8cb9c9d970ba45f4386171794509c1a0fe5d1fed72c91679d + languageName: node + linkType: hard + +"@types/jsesc@npm:^2.5.0": + version: 2.5.1 + resolution: "@types/jsesc@npm:2.5.1" + checksum: 10c0/12ba7bf5968aeeb36408269f4b5a39718efc6411fa197cf0f5e967ba36ad7b7d555b78787fc480db43ce63ebe6ab0ffe5fd9f64b1ea3b0d073877f0747491b30 languageName: node linkType: hard @@ -6606,16 +8062,6 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.6.4": - version: 2.6.13 - resolution: "@types/node-fetch@npm:2.6.13" - dependencies: - "@types/node": "npm:*" - form-data: "npm:^4.0.4" - checksum: 10c0/6313c89f62c50bd0513a6839cdff0a06727ac5495ccbb2eeda51bb2bbbc4f3c0a76c0393a491b7610af703d3d2deb6cf60e37e59c81ceeca803ffde745dbf309 - languageName: node - linkType: hard - "@types/node@npm:*": version: 24.3.1 resolution: "@types/node@npm:24.3.1" @@ -6625,12 +8071,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:22.14.1": - version: 22.14.1 - resolution: "@types/node@npm:22.14.1" +"@types/node@npm:26.0.1": + version: 26.0.1 + resolution: "@types/node@npm:26.0.1" dependencies: - undici-types: "npm:~6.21.0" - checksum: 10c0/d49c4d00403b1c2348cf0701b505fd636d80aabe18102105998dc62fdd36dcaf911e73c7a868c48c21c1022b825c67b475b65b1222d84b704d8244d152bb7f86 + undici-types: "npm:~8.3.0" + checksum: 10c0/31d204333c70124da6bcac7d1f27d8980149fe3f95a8419bfcd19c3e5823705c0e370d71ac34399352e1263b2d5fc41c87af964ec81e5a05a32224d65d8d224e languageName: node linkType: hard @@ -6641,15 +8087,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^18.11.18": - version: 18.19.124 - resolution: "@types/node@npm:18.19.124" - dependencies: - undici-types: "npm:~5.26.4" - checksum: 10c0/a1b1aa2d21a0b0dec473b9b15e048a25f86cd26f7fc1b9036b43b838ee50b33534518c503f12c9a86be4cebb0f957fd3583fee9c78372ece973a1081c9fc7966 - languageName: node - linkType: hard - "@types/prismjs@npm:^1.26.0": version: 1.26.5 resolution: "@types/prismjs@npm:1.26.5" @@ -6830,20 +8267,13 @@ __metadata: languageName: node linkType: hard -"@types/stack-utils@npm:^2.0.0": +"@types/stack-utils@npm:^2.0.3": version: 2.0.3 resolution: "@types/stack-utils@npm:2.0.3" checksum: 10c0/1f4658385ae936330581bcb8aa3a066df03867d90281cdf89cc356d404bd6579be0f11902304e1f775d92df22c6dd761d4451c804b0a4fba973e06211e9bd77c languageName: node linkType: hard -"@types/statuses@npm:^2.0.6": - version: 2.0.6 - resolution: "@types/statuses@npm:2.0.6" - checksum: 10c0/dd88c220b0e2c6315686289525fd61472d2204d2e4bef4941acfb76bda01d3066f749ac74782aab5b537a45314fcd7d6261eefa40b6ec872691f5803adaa608d - languageName: node - linkType: hard - "@types/styled-components@npm:5.1.4": version: 5.1.4 resolution: "@types/styled-components@npm:5.1.4" @@ -6921,6 +8351,15 @@ __metadata: languageName: node linkType: hard +"@types/yargs@npm:^17.0.33": + version: 17.0.35 + resolution: "@types/yargs@npm:17.0.35" + dependencies: + "@types/yargs-parser": "npm:*" + checksum: 10c0/609557826a6b85e73ccf587923f6429850d6dc70e420b455bab4601b670bfadf684b09ae288bccedab042c48ba65f1666133cf375814204b544009f57d6eef63 + languageName: node + linkType: hard + "@types/yargs@npm:^17.0.8": version: 17.0.33 resolution: "@types/yargs@npm:17.0.33" @@ -7037,6 +8476,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:^8.59.4": + version: 8.62.1 + resolution: "@typescript-eslint/types@npm:8.62.1" + checksum: 10c0/dfa1c9ef016c867a57d3fbef89f7968f3135d8d4621de1a8d2818258f79ed61f26fb6a3381ef27dde0a880817bfd5883f642f03a027dc127d771007022d1d880 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:8.61.0": version: 8.61.0 resolution: "@typescript-eslint/typescript-estree@npm:8.61.0" @@ -7088,6 +8534,171 @@ __metadata: languageName: node linkType: hard +"@ungap/structured-clone@npm:^1.3.0": + version: 1.3.2 + resolution: "@ungap/structured-clone@npm:1.3.2" + checksum: 10c0/4d76bb376ec3e15f38bdffe045377807c79057daf54ae17eeb977c5b95efddd2d726b38c15aeb5d5c1a45c64ad03aa7e8b1a6dc67895480cba536ffd1c7a06ec + languageName: node + linkType: hard + +"@unrs/resolver-binding-android-arm-eabi@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-android-arm-eabi@npm:1.12.2" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@unrs/resolver-binding-android-arm64@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-android-arm64@npm:1.12.2" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-darwin-arm64@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-darwin-arm64@npm:1.12.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-darwin-x64@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-darwin-x64@npm:1.12.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-freebsd-x64@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-freebsd-x64@npm:1.12.2" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.12.2" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm-musleabihf@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-arm-musleabihf@npm:1.12.2" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm64-gnu@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-arm64-gnu@npm:1.12.2" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm64-musl@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-arm64-musl@npm:1.12.2" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-loong64-gnu@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-loong64-gnu@npm:1.12.2" + conditions: os=linux & cpu=loong64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-loong64-musl@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-loong64-musl@npm:1.12.2" + conditions: os=linux & cpu=loong64 & libc=musl + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-ppc64-gnu@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-ppc64-gnu@npm:1.12.2" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-riscv64-gnu@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-riscv64-gnu@npm:1.12.2" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-riscv64-musl@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-riscv64-musl@npm:1.12.2" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-s390x-gnu@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-s390x-gnu@npm:1.12.2" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-x64-gnu@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-x64-gnu@npm:1.12.2" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-x64-musl@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-linux-x64-musl@npm:1.12.2" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@unrs/resolver-binding-openharmony-arm64@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-openharmony-arm64@npm:1.12.2" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-wasm32-wasi@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-wasm32-wasi@npm:1.12.2" + dependencies: + "@emnapi/core": "npm:1.10.0" + "@emnapi/runtime": "npm:1.10.0" + "@napi-rs/wasm-runtime": "npm:^1.1.4" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@unrs/resolver-binding-win32-arm64-msvc@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-win32-arm64-msvc@npm:1.12.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-win32-ia32-msvc@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-win32-ia32-msvc@npm:1.12.2" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@unrs/resolver-binding-win32-x64-msvc@npm:1.12.2": + version: 1.12.2 + resolution: "@unrs/resolver-binding-win32-x64-msvc@npm:1.12.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@vercel/ncc@npm:0.44.0": version: 0.44.0 resolution: "@vercel/ncc@npm:0.44.0" @@ -7236,50 +8847,17 @@ __metadata: "@webassemblyjs/ieee754": "npm:1.13.2" "@webassemblyjs/leb128": "npm:1.13.2" "@webassemblyjs/utf8": "npm:1.13.2" - checksum: 10c0/95427b9e5addbd0f647939bd28e3e06b8deefdbdadcf892385b5edc70091bf9b92fa5faac3fce8333554437c5d85835afef8c8a7d9d27ab6ba01ffab954db8c6 - languageName: node - linkType: hard - -"@webassemblyjs/wast-printer@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wast-printer@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@xtuc/long": "npm:4.2.2" - checksum: 10c0/8d7768608996a052545251e896eac079c98e0401842af8dd4de78fba8d90bd505efb6c537e909cd6dae96e09db3fa2e765a6f26492553a675da56e2db51f9d24 - languageName: node - linkType: hard - -"@webpack-cli/configtest@npm:^3.0.1": - version: 3.0.1 - resolution: "@webpack-cli/configtest@npm:3.0.1" - peerDependencies: - webpack: ^5.82.0 - webpack-cli: 6.x.x - checksum: 10c0/edd24ecfc429298fe86446f7d7daedfe82d72e7f6236c81420605484fdadade5d59c6bcef3d76bd724e11d9727f74e75de183223ae62d3a568b2d54199688cbe - languageName: node - linkType: hard - -"@webpack-cli/info@npm:^3.0.1": - version: 3.0.1 - resolution: "@webpack-cli/info@npm:3.0.1" - peerDependencies: - webpack: ^5.82.0 - webpack-cli: 6.x.x - checksum: 10c0/b23b94e7dc8c93e79248f20d5f1bd0fbb7b9ba4b012803e2fdc5440b8f2ee1f3eca7f4933bbca346c8168673bf572b1858169a3cb2c17d9b8bcd833d480c2170 + checksum: 10c0/95427b9e5addbd0f647939bd28e3e06b8deefdbdadcf892385b5edc70091bf9b92fa5faac3fce8333554437c5d85835afef8c8a7d9d27ab6ba01ffab954db8c6 languageName: node linkType: hard -"@webpack-cli/serve@npm:^3.0.1": - version: 3.0.1 - resolution: "@webpack-cli/serve@npm:3.0.1" - peerDependencies: - webpack: ^5.82.0 - webpack-cli: 6.x.x - peerDependenciesMeta: - webpack-dev-server: - optional: true - checksum: 10c0/65245e45bfa35e11a5b30631b99cfed0c1b39b2cc8320fa2d2a4185264535618827d349ec032c58af4201d6236cbc43bec894fcb840fdd06314611537a80e210 +"@webassemblyjs/wast-printer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wast-printer@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@xtuc/long": "npm:4.2.2" + checksum: 10c0/8d7768608996a052545251e896eac079c98e0401842af8dd4de78fba8d90bd505efb6c537e909cd6dae96e09db3fa2e765a6f26492553a675da56e2db51f9d24 languageName: node linkType: hard @@ -7297,20 +8875,6 @@ __metadata: languageName: node linkType: hard -"abab@npm:^2.0.6": - version: 2.0.6 - resolution: "abab@npm:2.0.6" - checksum: 10c0/0b245c3c3ea2598fe0025abf7cc7bb507b06949d51e8edae5d12c1b847a0a0c09639abcb94788332b4e2044ac4491c1e8f571b51c7826fd4b0bda1685ad4a278 - languageName: node - linkType: hard - -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 - languageName: node - linkType: hard - "abbrev@npm:^3.0.0": version: 3.0.1 resolution: "abbrev@npm:3.0.1" @@ -7318,12 +8882,10 @@ __metadata: languageName: node linkType: hard -"abort-controller@npm:^3.0.0": - version: 3.0.0 - resolution: "abort-controller@npm:3.0.0" - dependencies: - event-target-shim: "npm:^5.0.0" - checksum: 10c0/90ccc50f010250152509a344eb2e71977fbf8db0ab8f1061197e3275ddf6c61a41a6edfd7b9409c664513131dd96e962065415325ef23efa5db931b382d24ca5 +"abbrev@npm:^4.0.0": + version: 4.0.0 + resolution: "abbrev@npm:4.0.0" + checksum: 10c0/b4cc16935235e80702fc90192e349e32f8ef0ed151ef506aa78c81a7c455ec18375c4125414b99f84b2e055199d66383e787675f0bcd87da7a4dbd59f9eac1d5 languageName: node linkType: hard @@ -7347,16 +8909,6 @@ __metadata: languageName: node linkType: hard -"acorn-globals@npm:^7.0.0": - version: 7.0.1 - resolution: "acorn-globals@npm:7.0.1" - dependencies: - acorn: "npm:^8.1.0" - acorn-walk: "npm:^8.0.2" - checksum: 10c0/7437f58e92d99292dbebd0e79531af27d706c9f272f31c675d793da6c82d897e75302a8744af13c7f7978a8399840f14a353b60cf21014647f71012982456d2b - languageName: node - linkType: hard - "acorn-import-phases@npm:^1.0.3": version: 1.0.4 resolution: "acorn-import-phases@npm:1.0.4" @@ -7375,7 +8927,7 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:^8.0.0, acorn-walk@npm:^8.0.2": +"acorn-walk@npm:^8.0.0": version: 8.3.4 resolution: "acorn-walk@npm:8.3.4" dependencies: @@ -7384,7 +8936,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.1.0, acorn@npm:^8.11.0, acorn@npm:^8.15.0, acorn@npm:^8.16.0, acorn@npm:^8.8.1": +"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.0, acorn@npm:^8.15.0, acorn@npm:^8.16.0": version: 8.17.0 resolution: "acorn@npm:8.17.0" bin: @@ -7416,15 +8968,6 @@ __metadata: languageName: node linkType: hard -"agentkeepalive@npm:^4.2.1": - version: 4.6.0 - resolution: "agentkeepalive@npm:4.6.0" - dependencies: - humanize-ms: "npm:^1.2.1" - checksum: 10c0/235c182432f75046835b05f239708107138a40103deee23b6a08caee5136873709155753b394ec212e49e60e94a378189562cb01347765515cff61b692c69187 - languageName: node - linkType: hard - "aggregate-error@npm:^3.0.0": version: 3.1.0 resolution: "aggregate-error@npm:3.1.0" @@ -7483,7 +9026,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.12.5": version: 6.14.0 resolution: "ajv@npm:6.14.0" dependencies: @@ -7495,6 +9038,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^6.14.0": + version: 6.15.0 + resolution: "ajv@npm:6.15.0" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10c0/67966499dd272ecde1c2e467084411132891523d057487587879d39ac04207f4351b7b2324c83198013967fbfa632c1612adc960114a30770fbe07a0773b32c2 + languageName: node + linkType: hard + "ajv@npm:^8.0.0, ajv@npm:^8.17.1, ajv@npm:^8.9.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" @@ -7549,7 +9104,7 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.2.1": +"ansi-escapes@npm:^4.3.2": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -7583,7 +9138,7 @@ __metadata: languageName: node linkType: hard -"ansi-regex@npm:^6.0.1": +"ansi-regex@npm:^6.0.1, ansi-regex@npm:^6.2.2": version: 6.2.2 resolution: "ansi-regex@npm:6.2.2" checksum: 10c0/05d4acb1d2f59ab2cf4b794339c7b168890d44dda4bf0ce01152a8da0213aca207802f930442ce8cd22d7a92f44907664aac6508904e75e038fa944d2601b30f @@ -7608,14 +9163,14 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^5.0.0": +"ansi-styles@npm:^5.0.0, ansi-styles@npm:^5.2.0": version: 5.2.0 resolution: "ansi-styles@npm:5.2.0" checksum: 10c0/9c4ca80eb3c2fb7b33841c210d2f20807f40865d27008d7c3f707b7f95cab7d67462a565e2388ac3285b71cb3d9bb2173de8da37c57692a362885ec34d6e27df languageName: node linkType: hard -"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": +"ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1, ansi-styles@npm:^6.2.3": version: 6.2.3 resolution: "ansi-styles@npm:6.2.3" checksum: 10c0/23b8a4ce14e18fb854693b95351e286b771d23d8844057ed2e7d083cd3e708376c3323707ec6a24365f7d7eda3ca00327fe04092e29e551499ec4c8b7bfac868 @@ -7629,14 +9184,7 @@ __metadata: languageName: node linkType: hard -"ansis@npm:^4.0.0": - version: 4.2.0 - resolution: "ansis@npm:4.2.0" - checksum: 10c0/cd6a7a681ecd36e72e0d79c1e34f1f3bcb1b15bcbb6f0f8969b4228062d3bfebbef468e09771b00d93b2294370b34f707599d4a113542a876de26823b795b5d2 - languageName: node - linkType: hard - -"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": +"anymatch@npm:^3.1.3, anymatch@npm:~3.1.2": version: 3.1.3 resolution: "anymatch@npm:3.1.3" dependencies: @@ -7646,15 +9194,6 @@ __metadata: languageName: node linkType: hard -"append-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "append-buffer@npm:1.0.2" - dependencies: - buffer-equal: "npm:^1.0.0" - checksum: 10c0/909c34059ddd418ddd7c5a050b2891f971eafd17ffdcf4b39411fcb6ecb780db3e147a17dd8c4482381ee2c3a3447689d6e2ef5529dd9c1f9bb630b763a5aab5 - languageName: node - linkType: hard - "are-docs-informative@npm:^0.0.2": version: 0.0.2 resolution: "are-docs-informative@npm:0.0.2" @@ -7914,7 +9453,18 @@ __metadata: languageName: node linkType: hard -"axios@npm:1.16.1, axios@npm:^1.6.5, axios@npm:^1.6.8, axios@npm:^1.7.7": +"axios@npm:1.14.0": + version: 1.14.0 + resolution: "axios@npm:1.14.0" + dependencies: + follow-redirects: "npm:^1.15.11" + form-data: "npm:^4.0.5" + proxy-from-env: "npm:^2.1.0" + checksum: 10c0/2541f4aa215a7d1842429dad006fc682d82bc0e74bd14500823f7d8cce3bbae0e0a8c328c8538946718f366ab8ce5a4c12e9ad40e5a0f3482ff8bff0cd115d45 + languageName: node + linkType: hard + +"axios@npm:1.16.1, axios@npm:^1.6.5, axios@npm:^1.6.8": version: 1.16.1 resolution: "axios@npm:1.16.1" dependencies: @@ -7933,6 +9483,18 @@ __metadata: languageName: node linkType: hard +"b4a@npm:^1.6.4": + version: 1.8.1 + resolution: "b4a@npm:1.8.1" + peerDependencies: + react-native-b4a: "*" + peerDependenciesMeta: + react-native-b4a: + optional: true + checksum: 10c0/344d8c94b244ec7a9cb516ea43a98216312454cb72478e4b7628a679ee343be237564c53bbe73995ab10ea9bc923b420236081b180b3cf78fd0c945bfc886798 + languageName: node + linkType: hard + "babel-eslint@npm:10.x": version: 10.1.0 resolution: "babel-eslint@npm:10.1.0" @@ -7949,20 +9511,20 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:29.7.0, babel-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "babel-jest@npm:29.7.0" +"babel-jest@npm:30.4.1": + version: 30.4.1 + resolution: "babel-jest@npm:30.4.1" dependencies: - "@jest/transform": "npm:^29.7.0" - "@types/babel__core": "npm:^7.1.14" - babel-plugin-istanbul: "npm:^6.1.1" - babel-preset-jest: "npm:^29.6.3" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" + "@jest/transform": "npm:30.4.1" + "@types/babel__core": "npm:^7.20.5" + babel-plugin-istanbul: "npm:^7.0.1" + babel-preset-jest: "npm:30.4.0" + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" slash: "npm:^3.0.0" peerDependencies: - "@babel/core": ^7.8.0 - checksum: 10c0/2eda9c1391e51936ca573dd1aedfee07b14c59b33dbe16ef347873ddd777bcf6e2fc739681e9e9661ab54ef84a3109a03725be2ac32cd2124c07ea4401cbe8c1 + "@babel/core": ^7.11.0 || ^8.0.0-0 + checksum: 10c0/339b449011f31dc9eb18d9c49f0bb84e8de284e1107e64159a2f4a432bbd532d6a729774a56b7fbe76f5ddd716a0b4b7ad737265feab23b4d0225489b79a6f72 languageName: node linkType: hard @@ -8006,28 +9568,25 @@ __metadata: languageName: node linkType: hard -"babel-plugin-istanbul@npm:^6.1.1": - version: 6.1.1 - resolution: "babel-plugin-istanbul@npm:6.1.1" +"babel-plugin-istanbul@npm:^7.0.1": + version: 7.0.1 + resolution: "babel-plugin-istanbul@npm:7.0.1" dependencies: "@babel/helper-plugin-utils": "npm:^7.0.0" "@istanbuljs/load-nyc-config": "npm:^1.0.0" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-instrument: "npm:^5.0.4" + "@istanbuljs/schema": "npm:^0.1.3" + istanbul-lib-instrument: "npm:^6.0.2" test-exclude: "npm:^6.0.0" - checksum: 10c0/1075657feb705e00fd9463b329921856d3775d9867c5054b449317d39153f8fbcebd3e02ebf00432824e647faff3683a9ca0a941325ef1afe9b3c4dd51b24beb + checksum: 10c0/92975e3df12503b168695463b451468da0c20e117807221652eb8e33a26c160f3b9d4c5c4e65495657420e871c6a54e5e31f539e2e1da37ef2261d7ddd4b1dfd languageName: node linkType: hard -"babel-plugin-jest-hoist@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-plugin-jest-hoist@npm:29.6.3" +"babel-plugin-jest-hoist@npm:30.4.0": + version: 30.4.0 + resolution: "babel-plugin-jest-hoist@npm:30.4.0" dependencies: - "@babel/template": "npm:^7.3.3" - "@babel/types": "npm:^7.3.3" - "@types/babel__core": "npm:^7.1.14" - "@types/babel__traverse": "npm:^7.0.6" - checksum: 10c0/7e6451caaf7dce33d010b8aafb970e62f1b0c0b57f4978c37b0d457bbcf0874d75a395a102daf0bae0bd14eafb9f6e9a165ee5e899c0a4f1f3bb2e07b304ed2e + "@types/babel__core": "npm:^7.20.5" + checksum: 10c0/1738ed536bb5ff536b4d406b8db7dbbd76cf10f80bb20d902e6efdda79898f045b9a991124d7104d8c398d0bd995d511d57694952645fba0f6250595a45277b0 languageName: node linkType: hard @@ -8068,6 +9627,18 @@ __metadata: languageName: node linkType: hard +"babel-plugin-polyfill-corejs3@npm:^1.0.0": + version: 1.0.0 + resolution: "babel-plugin-polyfill-corejs3@npm:1.0.0" + dependencies: + "@babel/helper-define-polyfill-provider": "npm:^1.0.0" + core-js-compat: "npm:^3.48.0" + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0 + checksum: 10c0/265a1bd798dfde9fd900b341476d5e436667735ded7ef7f70375ff30620dad6634acc81d969ac20bd11ddc27c921ef26aa2aa5f563ad8e998e3d1ef6b665f5f1 + languageName: node + linkType: hard + "babel-plugin-polyfill-regenerator@npm:^0.6.5, babel-plugin-polyfill-regenerator@npm:^0.6.6": version: 0.6.8 resolution: "babel-plugin-polyfill-regenerator@npm:0.6.8" @@ -8090,7 +9661,7 @@ __metadata: languageName: node linkType: hard -"babel-preset-current-node-syntax@npm:^1.0.0": +"babel-preset-current-node-syntax@npm:^1.2.0": version: 1.2.0 resolution: "babel-preset-current-node-syntax@npm:1.2.0" dependencies: @@ -8115,15 +9686,15 @@ __metadata: languageName: node linkType: hard -"babel-preset-jest@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-preset-jest@npm:29.6.3" +"babel-preset-jest@npm:30.4.0": + version: 30.4.0 + resolution: "babel-preset-jest@npm:30.4.0" dependencies: - babel-plugin-jest-hoist: "npm:^29.6.3" - babel-preset-current-node-syntax: "npm:^1.0.0" + babel-plugin-jest-hoist: "npm:30.4.0" + babel-preset-current-node-syntax: "npm:^1.2.0" peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/ec5fd0276b5630b05f0c14bb97cc3815c6b31600c683ebb51372e54dcb776cff790bdeeabd5b8d01ede375a040337ccbf6a3ccd68d3a34219125945e167ad943 + "@babel/core": ^7.11.0 || ^8.0.0-beta.1 + checksum: 10c0/ca2623aa4d8bf82b1fd01e5724a87cea7f80ff089341cf12415e9ce4b10f74838ecc6c8a48921f421f90bcd44f7929c0ad300146082e2f400253adb97ab5eb3a languageName: node linkType: hard @@ -8173,6 +9744,18 @@ __metadata: languageName: node linkType: hard +"bare-events@npm:^2.7.0": + version: 2.9.1 + resolution: "bare-events@npm:2.9.1" + peerDependencies: + bare-abort-controller: "*" + peerDependenciesMeta: + bare-abort-controller: + optional: true + checksum: 10c0/576fba522bdd2167f35e86791e6c881fdaaf542aa5fca0acfaf8fac7a2c0789340f1cafa0b63e216808efb5cc710887c0cf683f1783293bf98a215d8555ecc36 + languageName: node + linkType: hard + "bare-module-resolve@npm:^1.10.0": version: 1.11.1 resolution: "bare-module-resolve@npm:1.11.1" @@ -8249,6 +9832,15 @@ __metadata: languageName: node linkType: hard +"bidi-js@npm:^1.0.3": + version: 1.0.3 + resolution: "bidi-js@npm:1.0.3" + dependencies: + require-from-string: "npm:^2.0.2" + checksum: 10c0/fdddea4aa4120a34285486f2267526cd9298b6e8b773ad25e765d4f104b6d7437ab4ba542e6939e3ac834a7570bcf121ee2cf6d3ae7cd7082c4b5bedc8f271e1 + languageName: node + linkType: hard + "big.js@npm:^5.2.2": version: 5.2.2 resolution: "big.js@npm:5.2.2" @@ -8272,10 +9864,10 @@ __metadata: languageName: node linkType: hard -"bignumber.js@npm:9.3.0": - version: 9.3.0 - resolution: "bignumber.js@npm:9.3.0" - checksum: 10c0/f54a79cd6fc98552ac0510c1cd9381650870ae443bdb20ba9b98e3548188d941506ac3c22a9f9c69b2cc60da9be5700e87d3f54d2825310a8b2ae999dfd6d99d +"bignumber.js@npm:11.1.4": + version: 11.1.4 + resolution: "bignumber.js@npm:11.1.4" + checksum: 10c0/18a0830b51816f4225cf4a5d2df355bfdec79427dfa5d7b6fac0853d8c846bd020678aa4ee11460fff030132e6b4b0b05c40f2f5b9d52bca0361b2612d4c6960 languageName: node linkType: hard @@ -8337,6 +9929,17 @@ __metadata: languageName: node linkType: hard +"bl@npm:^5.0.0": + version: 5.1.0 + resolution: "bl@npm:5.1.0" + dependencies: + buffer: "npm:^6.0.3" + inherits: "npm:^2.0.4" + readable-stream: "npm:^3.4.0" + checksum: 10c0/528a9c3d7d6b87af98c46f10a887654d027c28c503c7f7de87440e643f0056d7a2319a967762b8ec18150c64799d2825a277147a752a0570a7407c0b705b0d01 + languageName: node + linkType: hard + "body-parser@npm:^2.2.1": version: 2.2.2 resolution: "body-parser@npm:2.2.2" @@ -8524,13 +10127,6 @@ __metadata: languageName: node linkType: hard -"buffer-equal@npm:^1.0.0": - version: 1.0.1 - resolution: "buffer-equal@npm:1.0.1" - checksum: 10c0/578f03cc9458f9151f68478ab80ebee99a4203de0647a47b491aa3d5fb821938cb4139119a2dae1a1ef9ed5506e0eee4d6a37178efbf2e2e0ee3a9886898fffd - languageName: node - linkType: hard - "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -8587,6 +10183,13 @@ __metadata: languageName: node linkType: hard +"byte-counter@npm:^0.1.0": + version: 0.1.0 + resolution: "byte-counter@npm:0.1.0" + checksum: 10c0/2e7b9cf902d06a6601f8ab893964a8b6b9e2b2dfc60fcee0d340e50b95aa3dc77c4d34ddf3e63cc374b4e5b1d0d694a942de6fbe8ee95d39418f3fdff666b6a4 + languageName: node + linkType: hard + "bytes@npm:3.0.0": version: 3.0.0 resolution: "bytes@npm:3.0.0" @@ -8608,26 +10211,6 @@ __metadata: languageName: node linkType: hard -"cacache@npm:^18.0.0": - version: 18.0.4 - resolution: "cacache@npm:18.0.4" - dependencies: - "@npmcli/fs": "npm:^3.1.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10c0/6c055bafed9de4f3dcc64ac3dc7dd24e863210902b7c470eb9ce55a806309b3efff78033e3d8b4f7dcc5d467f2db43c6a2857aaaf26f0094b8a351d44c42179f - languageName: node - linkType: hard - "cacache@npm:^19.0.1": version: 19.0.1 resolution: "cacache@npm:19.0.1" @@ -8670,18 +10253,18 @@ __metadata: languageName: node linkType: hard -"cacheable-request@npm:^12.0.1": - version: 12.0.1 - resolution: "cacheable-request@npm:12.0.1" +"cacheable-request@npm:^13.0.18": + version: 13.0.19 + resolution: "cacheable-request@npm:13.0.19" dependencies: - "@types/http-cache-semantics": "npm:^4.0.4" + "@types/http-cache-semantics": "npm:^4.2.0" get-stream: "npm:^9.0.1" - http-cache-semantics: "npm:^4.1.1" - keyv: "npm:^4.5.4" + http-cache-semantics: "npm:^4.2.0" + keyv: "npm:^5.6.0" mimic-response: "npm:^4.0.0" - normalize-url: "npm:^8.0.1" - responselike: "npm:^3.0.0" - checksum: 10c0/3ccc26519c8dd0821fcb21fa00781e55f05ab6e1da1487fbbee9c8c03435a3cf72c29a710a991cebe398fb9a5274e2a772fc488546d402db8dc21310764ed83a + normalize-url: "npm:^8.1.1" + responselike: "npm:^4.0.2" + checksum: 10c0/4d905619dcecd01a7f3a41fd3e0d3514a4db6d81504184453c76b1b3dc7463448815556d38bcfc32f9ca290ad35290c41ab64cea2ebbeb9d7c6aca9847cb4c94 languageName: node linkType: hard @@ -8717,7 +10300,7 @@ __metadata: languageName: node linkType: hard -"callsites@npm:^3.0.0": +"callsites@npm:^3.0.0, callsites@npm:^3.1.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 @@ -8741,7 +10324,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.2.0": +"camelcase@npm:^6.2.0, camelcase@npm:^6.3.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 10c0/0d701658219bd3116d12da3eab31acddb3f9440790c0792e0d398f0a520a6a4058018e546862b6fba89d7ae990efaeb97da71e1913e9ebf5a8b5621a3d55c710 @@ -8788,6 +10371,13 @@ __metadata: languageName: node linkType: hard +"chalk@npm:5.6.2, chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0": + version: 5.6.2 + resolution: "chalk@npm:5.6.2" + checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976 + languageName: node + linkType: hard + "chalk@npm:^2.4.1": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -8809,20 +10399,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0": - version: 5.6.2 - resolution: "chalk@npm:5.6.2" - checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976 - languageName: node - linkType: hard - -"chalk@npm:~5.4.1": - version: 5.4.1 - resolution: "chalk@npm:5.4.1" - checksum: 10c0/b23e88132c702f4855ca6d25cb5538b1114343e41472d5263ee8a37cccfccd9c4216d111e1097c6a27830407a1dc81fecdf2a56f2c63033d4dbbd88c10b0dcef - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -8887,22 +10463,22 @@ __metadata: languageName: node linkType: hard -"cheerio@npm:^1.0.0-rc.2": - version: 1.1.2 - resolution: "cheerio@npm:1.1.2" +"cheerio@npm:^1.0.0": + version: 1.2.0 + resolution: "cheerio@npm:1.2.0" dependencies: cheerio-select: "npm:^2.1.0" dom-serializer: "npm:^2.0.0" domhandler: "npm:^5.0.3" domutils: "npm:^3.2.2" encoding-sniffer: "npm:^0.2.1" - htmlparser2: "npm:^10.0.0" + htmlparser2: "npm:^10.1.0" parse5: "npm:^7.3.0" parse5-htmlparser2-tree-adapter: "npm:^7.1.0" parse5-parser-stream: "npm:^7.1.2" - undici: "npm:^7.12.0" + undici: "npm:^7.19.0" whatwg-mimetype: "npm:^4.0.0" - checksum: 10c0/2c6d2274666fe122f54fdca457ee76453e1a993b19563acaa23eb565bf7776f0f01e4c3800092f00e84aa13c83a161f0cf000ac0a8332d1d7f2b2387d6ecc5fc + checksum: 10c0/91a566aabfa9962f28056045bb7d92d79c0f8f3abb1fb86a852a9d1760556adddeb01a36b6f08fa7c133282375d387ae450a181a659e76c6a64016c30cc3f611 languageName: node linkType: hard @@ -8943,13 +10519,6 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^2.0.0": - version: 2.0.0 - resolution: "chownr@npm:2.0.0" - checksum: 10c0/594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 - languageName: node - linkType: hard - "chownr@npm:^3.0.0": version: 3.0.0 resolution: "chownr@npm:3.0.0" @@ -8964,6 +10533,13 @@ __metadata: languageName: node linkType: hard +"chunk-data@npm:^0.1.0": + version: 0.1.0 + resolution: "chunk-data@npm:0.1.0" + checksum: 10c0/0e6eefafded440f5857d53db48ca7b649642d9224d5ff991c2f5abed8e7a6a8f016fb31e3763f15234c0f289fb0486ac1b4d48e5ec3b0cd8dc1d59109ec7d2a2 + languageName: node + linkType: hard + "ci-info@npm:^3.2.0": version: 3.9.0 resolution: "ci-info@npm:3.9.0" @@ -8971,6 +10547,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^4.2.0": + version: 4.4.0 + resolution: "ci-info@npm:4.4.0" + checksum: 10c0/44156201545b8dde01aa8a09ee2fe9fc7a73b1bef9adbd4606c9f61c8caeeb73fb7a575c88b0443f7b4edb5ee45debaa59ed54ba5f99698339393ca01349eb3a + languageName: node + linkType: hard + "cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": version: 1.0.6 resolution: "cipher-base@npm:1.0.6" @@ -8981,10 +10564,10 @@ __metadata: languageName: node linkType: hard -"cjs-module-lexer@npm:^1.0.0": - version: 1.4.3 - resolution: "cjs-module-lexer@npm:1.4.3" - checksum: 10c0/076b3af85adc4d65dbdab1b5b240fe5b45d44fcf0ef9d429044dd94d19be5589376805c44fb2d4b3e684e5fe6a9b7cf3e426476a6507c45283c5fc6ff95240be +"cjs-module-lexer@npm:^2.1.0": + version: 2.2.0 + resolution: "cjs-module-lexer@npm:2.2.0" + checksum: 10c0/aec4ca58f87145fac221386790ecaae8b012f2e2359a45acb61d8c75ea4fa84f6ea869f17abc1a7e91a808eff0fed581209632f03540de16f72f0a28f5fd35ac languageName: node linkType: hard @@ -9047,20 +10630,13 @@ __metadata: languageName: node linkType: hard -"cli-truncate@npm:^4.0.0": - version: 4.0.0 - resolution: "cli-truncate@npm:4.0.0" +"cli-truncate@npm:^5.2.0": + version: 5.2.0 + resolution: "cli-truncate@npm:5.2.0" dependencies: - slice-ansi: "npm:^5.0.0" - string-width: "npm:^7.0.0" - checksum: 10c0/d7f0b73e3d9b88cb496e6c086df7410b541b56a43d18ade6a573c9c18bd001b1c3fba1ad578f741a4218fdc794d042385f8ac02c25e1c295a2d8b9f3cb86eb4c - languageName: node - linkType: hard - -"cli-width@npm:^4.1.0": - version: 4.1.0 - resolution: "cli-width@npm:4.1.0" - checksum: 10c0/1fbd56413578f6117abcaf858903ba1f4ad78370a4032f916745fa2c7e390183a9d9029cf837df320b0fdce8137668e522f60a30a5f3d6529ff3872d265a955f + slice-ansi: "npm:^8.0.0" + string-width: "npm:^8.2.0" + checksum: 10c0/0d4ec94702ca85b64522ac93633837fb5ea7db17b79b1322a60f6045e6ae2b8cd7bd4c1d19ac7d1f9e10e3bbda1112e172e439b68c02b785ee00da8d6a5c5471 languageName: node linkType: hard @@ -9075,10 +10651,14 @@ __metadata: languageName: node linkType: hard -"clone-buffer@npm:^1.0.0": - version: 1.0.0 - resolution: "clone-buffer@npm:1.0.0" - checksum: 10c0/d813f4d12651bc4951d5e4869e2076d34ccfc3b23d0aae4e2e20e5a5e97bc7edbba84038356d222c54b25e3a83b5f45e8b637c18c6bd1794b2f1b49114122c50 +"cliui@npm:^9.0.1": + version: 9.0.1 + resolution: "cliui@npm:9.0.1" + dependencies: + string-width: "npm:^7.2.0" + strip-ansi: "npm:^7.1.0" + wrap-ansi: "npm:^9.0.0" + checksum: 10c0/13441832e9efe7c7a76bd2b8e683555c478d461a9f249dc5db9b17fe8d4b47fa9277b503914b90bd00e4a151abb6b9b02b2288972ffe2e5e3ca40bcb1c2330d3 languageName: node linkType: hard @@ -9093,31 +10673,13 @@ __metadata: languageName: node linkType: hard -"clone-stats@npm:^1.0.0": - version: 1.0.0 - resolution: "clone-stats@npm:1.0.0" - checksum: 10c0/bb1e05991e034e1eb104173c25bb652ea5b2b4dad5a49057a857e00f8d1da39de3bd689128a25bab8cbdfbea8ae8f6066030d106ed5c299a7d92be7967c50217 - languageName: node - linkType: hard - -"clone@npm:^2.1.1": +"clone@npm:^2.1.2": version: 2.1.2 resolution: "clone@npm:2.1.2" checksum: 10c0/ed0601cd0b1606bc7d82ee7175b97e68d1dd9b91fd1250a3617b38d34a095f8ee0431d40a1a611122dcccb4f93295b4fdb94942aa763392b5fe44effa50c2d5e languageName: node linkType: hard -"cloneable-readable@npm:^1.0.0": - version: 1.1.3 - resolution: "cloneable-readable@npm:1.1.3" - dependencies: - inherits: "npm:^2.0.1" - process-nextick-args: "npm:^2.0.0" - readable-stream: "npm:^2.3.5" - checksum: 10c0/52db2904dcfcd117e4e9605b69607167096c954352eff0fcded0a16132c9cfc187b36b5db020bee2dc1b3a968ca354f8b30aef3d8b4ea74e3ea83a81d43e47bb - languageName: node - linkType: hard - "clsx@npm:2.1.1, clsx@npm:^2.0.0": version: 2.1.1 resolution: "clsx@npm:2.1.1" @@ -9153,10 +10715,10 @@ __metadata: languageName: node linkType: hard -"collect-v8-coverage@npm:^1.0.0": - version: 1.0.2 - resolution: "collect-v8-coverage@npm:1.0.2" - checksum: 10c0/ed7008e2e8b6852c5483b444a3ae6e976e088d4335a85aa0a9db2861c5f1d31bd2d7ff97a60469b3388deeba661a619753afbe201279fb159b4b9548ab8269a1 +"collect-v8-coverage@npm:^1.0.2": + version: 1.0.3 + resolution: "collect-v8-coverage@npm:1.0.3" + checksum: 10c0/bc62ba251bcce5e3354a8f88fa6442bee56e3e612fec08d4dfcf66179b41ea0bf544b0f78c4ebc0f8050871220af95bb5c5578a6aef346feea155640582f09dc languageName: node linkType: hard @@ -9199,14 +10761,14 @@ __metadata: languageName: node linkType: hard -"colorette@npm:^2.0.10, colorette@npm:^2.0.14, colorette@npm:^2.0.20": +"colorette@npm:^2.0.10": version: 2.0.20 resolution: "colorette@npm:2.0.20" checksum: 10c0/e94116ff33b0ff56f3b83b9ace895e5bf87c2a7a47b3401b8c3f3226e050d5ef76cf4072fb3325f9dc24d1698f9b730baf4e05eeaf861d74a1883073f4c98a40 languageName: node linkType: hard -"colors@npm:1.4.0": +"colors@npm:^1.4.0": version: 1.4.0 resolution: "colors@npm:1.4.0" checksum: 10c0/9af357c019da3c5a098a301cf64e3799d27549d8f185d86f79af23069e4f4303110d115da98483519331f6fb71c8568d5688fa1c6523600044fd4a54e97c4efb @@ -9250,7 +10812,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^12.1.0, commander@npm:~12.1.0": +"commander@npm:^12.1.0": version: 12.1.0 resolution: "commander@npm:12.1.0" checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9 @@ -9285,17 +10847,17 @@ __metadata: languageName: node linkType: hard -"commander@npm:^8.3.0, commander@npm:~8.3.0": +"commander@npm:^8.3.0": version: 8.3.0 resolution: "commander@npm:8.3.0" checksum: 10c0/8b043bb8322ea1c39664a1598a95e0495bfe4ca2fad0d84a92d7d1d8d213e2a155b441d2470c8e08de7c4a28cf2bc6e169211c49e1b21d9f7edc6ae4d9356060 languageName: node linkType: hard -"comment-parser@npm:1.4.1": - version: 1.4.1 - resolution: "comment-parser@npm:1.4.1" - checksum: 10c0/d6c4be3f5be058f98b24f2d557f745d8fe1cc9eb75bebbdccabd404a0e1ed41563171b16285f593011f8b6a5ec81f564fb1f2121418ac5cbf0f49255bf0840dd +"comment-parser@npm:1.4.7": + version: 1.4.7 + resolution: "comment-parser@npm:1.4.7" + checksum: 10c0/09a8e6cc4a9f92e8828bbd8819d8b025cb1bf03d8d611e372627380f55b6401bb0009cf1b7940a028794f150891bfe855185b94173eb89f14b824e847335278d languageName: node linkType: hard @@ -9337,33 +10899,20 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:~2.0.0": - version: 2.0.0 - resolution: "concat-stream@npm:2.0.0" - dependencies: - buffer-from: "npm:^1.0.0" - inherits: "npm:^2.0.3" - readable-stream: "npm:^3.0.2" - typedarray: "npm:^0.0.6" - checksum: 10c0/29565dd9198fe1d8cf57f6cc71527dbc6ad67e12e4ac9401feb389c53042b2dceedf47034cbe702dfc4fd8df3ae7e6bfeeebe732cc4fa2674e484c13f04c219a - languageName: node - linkType: hard - -"concurrently@npm:9.1.2": - version: 9.1.2 - resolution: "concurrently@npm:9.1.2" +"concurrently@npm:10.0.3": + version: 10.0.3 + resolution: "concurrently@npm:10.0.3" dependencies: - chalk: "npm:^4.1.2" - lodash: "npm:^4.17.21" - rxjs: "npm:^7.8.1" - shell-quote: "npm:^1.8.1" - supports-color: "npm:^8.1.1" - tree-kill: "npm:^1.2.2" - yargs: "npm:^17.7.2" + chalk: "npm:5.6.2" + rxjs: "npm:7.8.2" + shell-quote: "npm:1.8.4" + supports-color: "npm:10.2.2" + tree-kill: "npm:1.2.2" + yargs: "npm:18.0.0" bin: - conc: dist/bin/concurrently.js - concurrently: dist/bin/concurrently.js - checksum: 10c0/88e00269366aa885ca2b97fd53b04e7af2b0f31774d991bfc0e88c0de61cdebdf115ddacc9c897fbd1f1b90369014637fa77045a171d072a75693332b36dcc70 + conc: dist/bin/index.js + concurrently: dist/bin/index.js + checksum: 10c0/59a4d9a7946fdbfbfa380543e5e5a40eb5b993cde18862126e8c7fe117813ebd26d67aa67b64781543c0e357eb23fb551f303b622e439354398ff0d7d71735b6 languageName: node linkType: hard @@ -9434,13 +10983,6 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.5.0": - version: 1.9.0 - resolution: "convert-source-map@npm:1.9.0" - checksum: 10c0/281da55454bf8126cbc6625385928c43479f2060984180c42f3a86c8b8c12720a24eac260624a7d1e090004028d2dee78602330578ceec1a08e27cb8bb0a8a5b - languageName: node - linkType: hard - "convert-source-map@npm:^2.0.0": version: 2.0.0 resolution: "convert-source-map@npm:2.0.0" @@ -9469,7 +11011,7 @@ __metadata: languageName: node linkType: hard -"cookie@npm:^1.0.1, cookie@npm:^1.0.2": +"cookie@npm:^1.0.1": version: 1.1.1 resolution: "cookie@npm:1.1.1" checksum: 10c0/79c4ddc0fcad9c4f045f826f42edf54bcc921a29586a4558b0898277fa89fb47be95bc384c2253f493af7b29500c830da28341274527328f18eba9f58afa112c @@ -9492,18 +11034,18 @@ __metadata: languageName: node linkType: hard -"copy-webpack-plugin@npm:13.0.0": - version: 13.0.0 - resolution: "copy-webpack-plugin@npm:13.0.0" +"copy-webpack-plugin@npm:14.0.0": + version: 14.0.0 + resolution: "copy-webpack-plugin@npm:14.0.0" dependencies: glob-parent: "npm:^6.0.1" normalize-path: "npm:^3.0.0" schema-utils: "npm:^4.2.0" - serialize-javascript: "npm:^6.0.2" + serialize-javascript: "npm:^7.0.3" tinyglobby: "npm:^0.2.12" peerDependencies: webpack: ^5.1.0 - checksum: 10c0/955037f77c6beb249b690710c35bacceb03b61bb5b7c5fc59ac7dff122c706eb794ef601bc3d9bbdb1350bda3e2615e0b43bf33f1ce2ca14ed934d9a89f43637 + checksum: 10c0/1296bec96c9b7bb603c11aac95bc9580810e3f6be062044d2d4442c54d11ac5a0cd535e118fee6d65a83709a7a440e231686c0a2755f36df73061f7e4a0024d6 languageName: node linkType: hard @@ -9624,23 +11166,6 @@ __metadata: languageName: node linkType: hard -"create-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "create-jest@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - chalk: "npm:^4.0.0" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - jest-config: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - prompts: "npm:^2.0.1" - bin: - create-jest: bin/create-jest.js - checksum: 10c0/e7e54c280692470d3398f62a6238fd396327e01c6a0757002833f06d00afc62dd7bfe04ff2b9cd145264460e6b4d1eb8386f2925b7e567f97939843b7b0e812f - languageName: node - linkType: hard - "cross-fetch@npm:^3.1.5": version: 3.2.0 resolution: "cross-fetch@npm:3.2.0" @@ -9856,6 +11381,16 @@ __metadata: languageName: node linkType: hard +"css-tree@npm:^3.0.0, css-tree@npm:^3.2.1": + version: 3.2.1 + resolution: "css-tree@npm:3.2.1" + dependencies: + mdn-data: "npm:2.27.1" + source-map-js: "npm:^1.2.1" + checksum: 10c0/1f65e9ccaa56112a4706d6f003dd43d777f0dbcf848e66fd320f823192533581f8dd58daa906cb80622658332d50284d6be13b87a6ab4556cbbfe9ef535bbf7e + languageName: node + linkType: hard + "css-tree@npm:~2.2.0": version: 2.2.1 resolution: "css-tree@npm:2.2.1" @@ -9990,29 +11525,6 @@ __metadata: languageName: node linkType: hard -"cssom@npm:^0.5.0": - version: 0.5.0 - resolution: "cssom@npm:0.5.0" - checksum: 10c0/8c4121c243baf0678c65dcac29b201ff0067dfecf978de9d5c83b2ff127a8fdefd2bfd54577f5ad8c80ed7d2c8b489ae01c82023545d010c4ecb87683fb403dd - languageName: node - linkType: hard - -"cssom@npm:~0.3.6": - version: 0.3.8 - resolution: "cssom@npm:0.3.8" - checksum: 10c0/d74017b209440822f9e24d8782d6d2e808a8fdd58fa626a783337222fe1c87a518ba944d4c88499031b4786e68772c99dfae616638d71906fe9f203aeaf14411 - languageName: node - linkType: hard - -"cssstyle@npm:^2.3.0": - version: 2.3.0 - resolution: "cssstyle@npm:2.3.0" - dependencies: - cssom: "npm:~0.3.6" - checksum: 10c0/863400da2a458f73272b9a55ba7ff05de40d850f22eb4f37311abebd7eff801cf1cd2fb04c4c92b8c3daed83fe766e52e4112afb7bc88d86c63a9c2256a7d178 - languageName: node - linkType: hard - "cssstyle@npm:^4.2.1": version: 4.6.0 resolution: "cssstyle@npm:4.6.0" @@ -10044,17 +11556,6 @@ __metadata: languageName: node linkType: hard -"data-urls@npm:^3.0.2": - version: 3.0.2 - resolution: "data-urls@npm:3.0.2" - dependencies: - abab: "npm:^2.0.6" - whatwg-mimetype: "npm:^3.0.0" - whatwg-url: "npm:^11.0.0" - checksum: 10c0/051c3aaaf3e961904f136aab095fcf6dff4db23a7fc759dd8ba7b3e6ba03fc07ef608086caad8ab910d864bd3b5e57d0d2f544725653d77c96a2c971567045f4 - languageName: node - linkType: hard - "data-urls@npm:^5.0.0": version: 5.0.0 resolution: "data-urls@npm:5.0.0" @@ -10065,6 +11566,16 @@ __metadata: languageName: node linkType: hard +"data-urls@npm:^7.0.0": + version: 7.0.0 + resolution: "data-urls@npm:7.0.0" + dependencies: + whatwg-mimetype: "npm:^5.0.0" + whatwg-url: "npm:^16.0.0" + checksum: 10c0/08d88ef50d8966a070ffdaa703e1e4b29f01bb2da364dfbc1612b1c2a4caa8045802c9532d81347b21781100132addb36a585071c8323b12cce97973961dee9f + languageName: node + linkType: hard + "data-view-buffer@npm:^1.0.2": version: 1.0.2 resolution: "data-view-buffer@npm:1.0.2" @@ -10098,13 +11609,6 @@ __metadata: languageName: node linkType: hard -"de-indent@npm:^1.0.2": - version: 1.0.2 - resolution: "de-indent@npm:1.0.2" - checksum: 10c0/7058ce58abd6dfc123dd204e36be3797abd419b59482a634605420f47ae97639d0c183ec5d1b904f308a01033f473673897afc2bd59bc620ebf1658763ef4291 - languageName: node - linkType: hard - "debounce@npm:^1.2.1": version: 1.2.1 resolution: "debounce@npm:1.2.1" @@ -10121,7 +11625,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.6, debug@npm:^4.3.7, debug@npm:^4.4.0, debug@npm:^4.4.3, debug@npm:~4.4.0": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -10149,7 +11653,7 @@ __metadata: languageName: node linkType: hard -"decimal.js@npm:^10.4.2, decimal.js@npm:^10.4.3": +"decimal.js@npm:^10.5.0, decimal.js@npm:^10.6.0": version: 10.6.0 resolution: "decimal.js@npm:10.6.0" checksum: 10c0/07d69fbcc54167a340d2d97de95f546f9ff1f69d2b45a02fd7a5292412df3cd9eb7e23065e532a318f5474a2e1bccf8392fdf0443ef467f97f3bf8cb0477e5aa @@ -10165,6 +11669,15 @@ __metadata: languageName: node linkType: hard +"decompress-response@npm:^10.0.0": + version: 10.0.0 + resolution: "decompress-response@npm:10.0.0" + dependencies: + mimic-response: "npm:^4.0.0" + checksum: 10c0/e8ce13b3f790fbac1e75a7be9ce4f77be62a6e5fcccfd9bd73e9d8b48b9a3b6c1b7b918ecd321095f3839b3bc9b6f6af2b1bd9c905eeddc0d1177d297b073232 + languageName: node + linkType: hard + "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -10174,7 +11687,7 @@ __metadata: languageName: node linkType: hard -"dedent@npm:^1.0.0, dedent@npm:^1.6.0": +"dedent@npm:^1.6.0": version: 1.7.1 resolution: "dedent@npm:1.7.1" peerDependencies: @@ -10325,7 +11838,7 @@ __metadata: languageName: node linkType: hard -"detect-newline@npm:^3.0.0": +"detect-newline@npm:^3.1.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" checksum: 10c0/c38cfc8eeb9fda09febb44bcd85e467c970d4e3bf526095394e5a4f18bc26dd0cf6b22c69c1fa9969261521c593836db335c2795218f6d781a512aea2fb8209d @@ -10368,13 +11881,6 @@ __metadata: languageName: node linkType: hard -"diff-sequences@npm:^29.6.3": - version: 29.6.3 - resolution: "diff-sequences@npm:29.6.3" - checksum: 10c0/32e27ac7dbffdf2fb0eb5a84efd98a9ad084fbabd5ac9abb8757c6770d5320d2acd172830b28c4add29bb873d59420601dfc805ac4064330ce59b1adfd0593b2 - languageName: node - linkType: hard - "diff@npm:^5.1.0": version: 5.2.2 resolution: "diff@npm:5.2.2" @@ -10413,7 +11919,7 @@ __metadata: dependencies: "@docusaurus/core": "npm:3.10.1" "@docusaurus/preset-classic": "npm:3.10.1" - "@lavamoat/allow-scripts": "npm:3.3.2" + "@lavamoat/allow-scripts": "npm:5.1.0" "@stellar/freighter-api": "npm:latest" clsx: "npm:2.1.1" react: "npm:19.2.7" @@ -10484,15 +11990,6 @@ __metadata: languageName: node linkType: hard -"domexception@npm:^4.0.0": - version: 4.0.0 - resolution: "domexception@npm:4.0.0" - dependencies: - webidl-conversions: "npm:^7.0.0" - checksum: 10c0/774277cd9d4df033f852196e3c0077a34dbd15a96baa4d166e0e47138a80f4c0bdf0d94e4703e6ff5883cec56bb821a6fff84402d8a498e31de7c87eb932a294 - languageName: node - linkType: hard - "domhandler@npm:^4.0.0, domhandler@npm:^4.2.0, domhandler@npm:^4.3.1": version: 4.3.1 resolution: "domhandler@npm:4.3.1" @@ -10522,7 +12019,7 @@ __metadata: languageName: node linkType: hard -"domutils@npm:^3.0.1, domutils@npm:^3.2.1, domutils@npm:^3.2.2": +"domutils@npm:^3.0.1, domutils@npm:^3.2.2": version: 3.2.2 resolution: "domutils@npm:3.2.2" dependencies: @@ -10552,23 +12049,30 @@ __metadata: languageName: node linkType: hard -"dotenv-defaults@npm:^2.0.2": - version: 2.0.2 - resolution: "dotenv-defaults@npm:2.0.2" +"dotenv-defaults@npm:^5.0.2": + version: 5.0.2 + resolution: "dotenv-defaults@npm:5.0.2" dependencies: - dotenv: "npm:^8.2.0" - checksum: 10c0/14b7b8f6c21a30404106384398728746e63405bfeabe47ef7aadd0e81de49986d5896a612e5b1acddf655af6472a24947b7b113aa3ef3270a2877afa9c5bd287 + dotenv: "npm:^14.0.0" + checksum: 10c0/89fe77f8d97a183c701307dde7d328a973271b8ce04af3a48928250cd707a9f324b04a672a2ceb770db117a7724995c48e93edc438b3c9ce1207a67adee77098 languageName: node linkType: hard -"dotenv-webpack@npm:8.1.0": - version: 8.1.0 - resolution: "dotenv-webpack@npm:8.1.0" +"dotenv-webpack@npm:9.0.0": + version: 9.0.0 + resolution: "dotenv-webpack@npm:9.0.0" dependencies: - dotenv-defaults: "npm:^2.0.2" + dotenv-defaults: "npm:^5.0.2" peerDependencies: webpack: ^4 || ^5 - checksum: 10c0/7a64587fc96eba8e4ffccf56d6af09606611a32bc5cf04a37057b8c2881bcd11bf43c3395404581be734ae7fd2788471ceac76cb3d0ba1283e675223f98e5816 + checksum: 10c0/de58c3a4986c4ae0fc09a6c8e8ceaacf6e23535d4d0752ef116ee1a155a14e6730eee7b1b471d8d6ed4b0cbf58b9c8594595f6300a6c84420727259b50f67fbc + languageName: node + linkType: hard + +"dotenv@npm:^14.0.0": + version: 14.3.2 + resolution: "dotenv@npm:14.3.2" + checksum: 10c0/cb428358aa3a8da735be727f8a9de56e148ddf97d84a75e528039dc90e55787688766e48204a50b8326ba1ebaa6e039584c1019dfc28fa144e68145d8cbe5946 languageName: node linkType: hard @@ -10586,13 +12090,6 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^8.2.0": - version: 8.6.0 - resolution: "dotenv@npm:8.6.0" - checksum: 10c0/6750431dea8efbd54b9f2d9681b04e1ccc7989486461dcf058bb708d9e3d63b04115fcdf8840e38ad1e24a4a2e1e7c1560626c5e3ac7bc09371b127c49e2d45f - languageName: node - linkType: hard - "dtrace-provider@npm:~0.8": version: 0.8.8 resolution: "dtrace-provider@npm:0.8.8" @@ -10621,18 +12118,6 @@ __metadata: languageName: node linkType: hard -"duplexify@npm:^3.6.0": - version: 3.7.1 - resolution: "duplexify@npm:3.7.1" - dependencies: - end-of-stream: "npm:^1.0.0" - inherits: "npm:^2.0.1" - readable-stream: "npm:^2.0.0" - stream-shift: "npm:^1.0.0" - checksum: 10c0/59d1440c1b4e3a4db35ae96933392703ce83518db1828d06b9b6322920d6cbbf0b7159e88be120385fe459e77f1eb0c7622f26e9ec1f47c9ff05c2b35747dbd3 - languageName: node - linkType: hard - "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -10715,6 +12200,13 @@ __metadata: languageName: node linkType: hard +"empathic@npm:^2.0.1": + version: 2.0.1 + resolution: "empathic@npm:2.0.1" + checksum: 10c0/577f2868bfcad4ffbf911b57c75016125eb8cc8a7d32cf2d3e9fbcb31bfe6e9e6b66d9457ac34ccb2cd38bff353b3af34287899e0360b8c561ff6d4a048aca62 + languageName: node + linkType: hard + "encodeurl@npm:^2.0.0, encodeurl@npm:~2.0.0": version: 2.0.0 resolution: "encodeurl@npm:2.0.0" @@ -10750,15 +12242,6 @@ __metadata: languageName: node linkType: hard -"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0": - version: 1.4.5 - resolution: "end-of-stream@npm:1.4.5" - dependencies: - once: "npm:^1.4.0" - checksum: 10c0/b0701c92a10b89afb1cb45bf54a5292c6f008d744eb4382fa559d54775ff31617d1d7bc3ef617575f552e24fad2c7c1a1835948c66b3f3a4be0a6c1f35c883d8 - languageName: node - linkType: hard - "enhanced-resolve@npm:5.21.6": version: 5.21.6 resolution: "enhanced-resolve@npm:5.21.6" @@ -10769,7 +12252,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.15.0, enhanced-resolve@npm:^5.22.0, enhanced-resolve@npm:^5.7.0": +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.22.0, enhanced-resolve@npm:^5.7.0": version: 5.24.0 resolution: "enhanced-resolve@npm:5.24.0" dependencies: @@ -10807,6 +12290,20 @@ __metadata: languageName: node linkType: hard +"entities@npm:^7.0.1": + version: 7.0.1 + resolution: "entities@npm:7.0.1" + checksum: 10c0/b4fb9937bb47ecb00aaaceb9db9cdd1cc0b0fb649c0e843d05cf5dbbd2e9d2df8f98721d8b1b286445689c72af7b54a7242fc2d63ef7c9739037a8c73363e7ca + languageName: node + linkType: hard + +"entities@npm:^8.0.0": + version: 8.0.0 + resolution: "entities@npm:8.0.0" + checksum: 10c0/938e631664c19451823344a351aeeafd74fae2d5fa51e4d5b6ff635afaefd4bacf0f609989888c04c42733f46ffdac15211608267ebb02488005891a4793e94d + languageName: node + linkType: hard + "env-paths@npm:^2.2.0, env-paths@npm:^2.2.1": version: 2.2.1 resolution: "env-paths@npm:2.2.1" @@ -10814,12 +12311,12 @@ __metadata: languageName: node linkType: hard -"envinfo@npm:^7.14.0": - version: 7.14.0 - resolution: "envinfo@npm:7.14.0" +"envinfo@npm:^7.21.0": + version: 7.21.0 + resolution: "envinfo@npm:7.21.0" bin: envinfo: dist/cli.js - checksum: 10c0/059a031eee101e056bd9cc5cbfe25c2fab433fe1780e86cf0a82d24a000c6931e327da6a8ffb3dce528a24f83f256e7efc0b36813113eff8fdc6839018efe327 + checksum: 10c0/4170127ca72dbf85be2c114f85558bd08178e8a43b394951ba9fd72d067c6fea3374df45a7b040e39e4e7b30bdd268e5bdf8661d99ae28302c2a88dedb41b5e6 languageName: node linkType: hard @@ -10953,13 +12450,6 @@ __metadata: languageName: node linkType: hard -"es-module-lexer@npm:^1.5.3": - version: 1.7.0 - resolution: "es-module-lexer@npm:1.7.0" - checksum: 10c0/4c935affcbfeba7fb4533e1da10fa8568043df1e3574b869385980de9e2d475ddc36769891936dbb07036edb3c3786a8b78ccf44964cd130dedc1f2c984b6c7b - languageName: node - linkType: hard - "es-module-lexer@npm:^2.1.0": version: 2.1.0 resolution: "es-module-lexer@npm:2.1.0" @@ -11032,6 +12522,95 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:^0.25.0": + version: 0.25.12 + resolution: "esbuild@npm:0.25.12" + dependencies: + "@esbuild/aix-ppc64": "npm:0.25.12" + "@esbuild/android-arm": "npm:0.25.12" + "@esbuild/android-arm64": "npm:0.25.12" + "@esbuild/android-x64": "npm:0.25.12" + "@esbuild/darwin-arm64": "npm:0.25.12" + "@esbuild/darwin-x64": "npm:0.25.12" + "@esbuild/freebsd-arm64": "npm:0.25.12" + "@esbuild/freebsd-x64": "npm:0.25.12" + "@esbuild/linux-arm": "npm:0.25.12" + "@esbuild/linux-arm64": "npm:0.25.12" + "@esbuild/linux-ia32": "npm:0.25.12" + "@esbuild/linux-loong64": "npm:0.25.12" + "@esbuild/linux-mips64el": "npm:0.25.12" + "@esbuild/linux-ppc64": "npm:0.25.12" + "@esbuild/linux-riscv64": "npm:0.25.12" + "@esbuild/linux-s390x": "npm:0.25.12" + "@esbuild/linux-x64": "npm:0.25.12" + "@esbuild/netbsd-arm64": "npm:0.25.12" + "@esbuild/netbsd-x64": "npm:0.25.12" + "@esbuild/openbsd-arm64": "npm:0.25.12" + "@esbuild/openbsd-x64": "npm:0.25.12" + "@esbuild/openharmony-arm64": "npm:0.25.12" + "@esbuild/sunos-x64": "npm:0.25.12" + "@esbuild/win32-arm64": "npm:0.25.12" + "@esbuild/win32-ia32": "npm:0.25.12" + "@esbuild/win32-x64": "npm:0.25.12" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/openharmony-arm64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10c0/c205357531423220a9de8e1e6c6514242bc9b1666e762cd67ccdf8fdfdc3f1d0bd76f8d9383958b97ad4c953efdb7b6e8c1f9ca5951cd2b7c5235e8755b34a6b + languageName: node + linkType: hard + "escalade@npm:^3.1.1, escalade@npm:^3.2.0": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -11081,24 +12660,6 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^2.0.0": - version: 2.1.0 - resolution: "escodegen@npm:2.1.0" - dependencies: - esprima: "npm:^4.0.1" - estraverse: "npm:^5.2.0" - esutils: "npm:^2.0.2" - source-map: "npm:~0.6.1" - dependenciesMeta: - source-map: - optional: true - bin: - escodegen: bin/escodegen.js - esgenerate: bin/esgenerate.js - checksum: 10c0/e1450a1f75f67d35c061bf0d60888b15f62ab63aef9df1901cffc81cffbbb9e8b3de237c5502cf8613a017c1df3a3003881307c78835a1ab54d8c8d2206e01d3 - languageName: node - linkType: hard - "eslint-config-prettier@npm:10.1.8": version: 10.1.8 resolution: "eslint-config-prettier@npm:10.1.8" @@ -11117,6 +12678,21 @@ __metadata: languageName: node linkType: hard +"eslint-import-context@npm:^0.1.8": + version: 0.1.9 + resolution: "eslint-import-context@npm:0.1.9" + dependencies: + get-tsconfig: "npm:^4.10.1" + stable-hash-x: "npm:^0.2.0" + peerDependencies: + unrs-resolver: ^1.0.0 + peerDependenciesMeta: + unrs-resolver: + optional: true + checksum: 10c0/07851103443b70af681c5988e2702e681ff9b956e055e11d4bd9b2322847fa0d9e8da50c18fc7cb1165106b043f34fbd0384d7011c239465c4645c52132e56f3 + languageName: node + linkType: hard + "eslint-import-resolver-node@npm:^0.3.9": version: 0.3.9 resolution: "eslint-import-resolver-node@npm:0.3.9" @@ -11128,18 +12704,17 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-typescript@npm:3.7.0": - version: 3.7.0 - resolution: "eslint-import-resolver-typescript@npm:3.7.0" +"eslint-import-resolver-typescript@npm:4.4.5": + version: 4.4.5 + resolution: "eslint-import-resolver-typescript@npm:4.4.5" dependencies: - "@nolyfill/is-core-module": "npm:1.0.39" - debug: "npm:^4.3.7" - enhanced-resolve: "npm:^5.15.0" - fast-glob: "npm:^3.3.2" - get-tsconfig: "npm:^4.7.5" - is-bun-module: "npm:^1.0.2" - is-glob: "npm:^4.0.3" - stable-hash: "npm:^0.0.4" + debug: "npm:^4.4.1" + eslint-import-context: "npm:^0.1.8" + get-tsconfig: "npm:^4.10.1" + is-bun-module: "npm:^2.0.0" + stable-hash-x: "npm:^0.2.0" + tinyglobby: "npm:^0.2.14" + unrs-resolver: "npm:^1.7.11" peerDependencies: eslint: "*" eslint-plugin-import: "*" @@ -11149,7 +12724,7 @@ __metadata: optional: true eslint-plugin-import-x: optional: true - checksum: 10c0/b1dec542a31486b3b5730f71f08a8ee2ac4915dbc4aa1493fd15bc8fcadcb029772ab39a425824c235045b3a7e629290a339d4a7e7f3dd32b24e715106352d40 + checksum: 10c0/15fa1c47dfc508deaef638d8f9b65eedfd4722c23c1b4e51391082daf4f23a75fc5e42ebcbc5ebcae8a3977f9aa204dd2574528ab0c27b678e582122f3c8cc02 languageName: node linkType: hard @@ -11194,24 +12769,27 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jsdoc@npm:50.6.2": - version: 50.6.2 - resolution: "eslint-plugin-jsdoc@npm:50.6.2" +"eslint-plugin-jsdoc@npm:63.0.10": + version: 63.0.10 + resolution: "eslint-plugin-jsdoc@npm:63.0.10" dependencies: - "@es-joy/jsdoccomment": "npm:~0.49.0" + "@es-joy/jsdoccomment": "npm:~0.87.0" + "@es-joy/resolve.exports": "npm:1.2.0" are-docs-informative: "npm:^0.0.2" - comment-parser: "npm:1.4.1" - debug: "npm:^4.3.6" + comment-parser: "npm:1.4.7" + debug: "npm:^4.4.3" escape-string-regexp: "npm:^4.0.0" - espree: "npm:^10.1.0" - esquery: "npm:^1.6.0" - parse-imports: "npm:^2.1.1" - semver: "npm:^7.6.3" + espree: "npm:^11.2.0" + esquery: "npm:^1.7.0" + html-entities: "npm:^2.6.0" + object-deep-merge: "npm:^2.0.1" + parse-imports-exports: "npm:^0.2.4" + semver: "npm:^7.8.2" spdx-expression-parse: "npm:^4.0.0" - synckit: "npm:^0.9.1" + to-valid-identifier: "npm:^1.0.0" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/7349681c33c1a37e8e635b8b354e1ac3f13b348cbdaf8e9b2db878601976d29cb9b2359156e4176ed66b65d10fb237fc6eb2a921512b9fedd811ed6d1a95b445 + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 + checksum: 10c0/0a42c66e964398e3fa08743cc3c5aee18f175dc65b048a813c218d270c4cd1a67732839b098e7208422e62fb6d4a2524bd86940216e57924b6a525c0211c6746 languageName: node linkType: hard @@ -11269,12 +12847,18 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:5.1.0": - version: 5.1.0 - resolution: "eslint-plugin-react-hooks@npm:5.1.0" +"eslint-plugin-react-hooks@npm:7.1.1": + version: 7.1.1 + resolution: "eslint-plugin-react-hooks@npm:7.1.1" + dependencies: + "@babel/core": "npm:^7.24.4" + "@babel/parser": "npm:^7.24.4" + hermes-parser: "npm:^0.25.1" + zod: "npm:^3.25.0 || ^4.0.0" + zod-validation-error: "npm:^3.5.0 || ^4.0.0" peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - checksum: 10c0/37ef76e1d916d46ab8e93a596078efcf2162e2c653614437e0c54e31d02a5dadabec22802fab717effe257aeb4bdc20c2a710666a89ab1cf07e01e614dde75d8 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0 + checksum: 10c0/cee8454915d71ac5d70a0d8f4f260e76eaf45fcd4162747dd4282b792ee5616d187351dabe6cdcff9040c79d0cec625635c4fd0777276be119efa88ebe058525 languageName: node linkType: hard @@ -11316,13 +12900,15 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^8.2.0": - version: 8.4.0 - resolution: "eslint-scope@npm:8.4.0" +"eslint-scope@npm:^9.1.0, eslint-scope@npm:^9.1.2": + version: 9.1.2 + resolution: "eslint-scope@npm:9.1.2" dependencies: + "@types/esrecurse": "npm:^4.3.1" + "@types/estree": "npm:^1.0.8" esrecurse: "npm:^4.3.0" estraverse: "npm:^5.2.0" - checksum: 10c0/407f6c600204d0f3705bd557f81bd0189e69cd7996f408f8971ab5779c0af733d1af2f1412066b40ee1588b085874fc37a2333986c6521669cdbdd36ca5058e0 + checksum: 10c0/9fb8bca5a73e5741efb6cec84467027b6cb6f4203ff9b43a938e272c5cd30800bde46a5c20dfd1609f840225f0b62b7673be391b20acadf8658ca9fa4729b3dd languageName: node linkType: hard @@ -11333,13 +12919,6 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^2.1.0": - version: 2.1.0 - resolution: "eslint-visitor-keys@npm:2.1.0" - checksum: 10c0/9f0e3a2db751d84067d15977ac4b4472efd6b303e369e6ff241a99feac04da758f46d5add022c33d06b53596038dbae4b4aceb27c7e68b8dfc1055b35e495787 - languageName: node - linkType: hard - "eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" @@ -11347,61 +12926,50 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^4.2.0, eslint-visitor-keys@npm:^4.2.1": - version: 4.2.1 - resolution: "eslint-visitor-keys@npm:4.2.1" - checksum: 10c0/fcd43999199d6740db26c58dbe0c2594623e31ca307e616ac05153c9272f12f1364f5a0b1917a8e962268fdecc6f3622c1c2908b4fcc2e047a106fe6de69dc43 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^5.0.0": +"eslint-visitor-keys@npm:^5.0.0, eslint-visitor-keys@npm:^5.0.1": version: 5.0.1 resolution: "eslint-visitor-keys@npm:5.0.1" checksum: 10c0/16190bdf2cbae40a1109384c94450c526a79b0b9c3cb21e544256ed85ac48a4b84db66b74a6561d20fe6ab77447f150d711c2ad5ad74df4fcc133736bce99678 languageName: node linkType: hard -"eslint-webpack-plugin@npm:5.0.0": - version: 5.0.0 - resolution: "eslint-webpack-plugin@npm:5.0.0" +"eslint-webpack-plugin@npm:6.0.0": + version: 6.0.0 + resolution: "eslint-webpack-plugin@npm:6.0.0" dependencies: "@types/eslint": "npm:^9.6.1" - jest-worker: "npm:^29.7.0" micromatch: "npm:^4.0.8" normalize-path: "npm:^3.0.0" - schema-utils: "npm:^4.3.0" + schema-utils: "npm:^4.3.3" peerDependencies: - eslint: ^8.0.0 || ^9.0.0 + eslint: ^9.0.0 || ^10.0.0 webpack: ^5.0.0 - checksum: 10c0/cf1467c7c69970ba6db0c715db2a2e5d1974a10d682f383b2b723c7a07049bcd7dae3d3ddc6bd68199d3f42503f483ec18439cd79cd342898167306f6820ef98 + checksum: 10c0/9805305057c5a715287d23a03e9359f41b7b52407c4e73d81d4168843a52d548cf621d3a6341456918be1914a06d594b8021b67c18038c69473afab62b1a9302 languageName: node linkType: hard -"eslint@npm:9.18.0": - version: 9.18.0 - resolution: "eslint@npm:9.18.0" +"eslint@npm:10.6.0": + version: 10.6.0 + resolution: "eslint@npm:10.6.0" dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.19.0" - "@eslint/core": "npm:^0.10.0" - "@eslint/eslintrc": "npm:^3.2.0" - "@eslint/js": "npm:9.18.0" - "@eslint/plugin-kit": "npm:^0.2.5" + "@eslint-community/eslint-utils": "npm:^4.8.0" + "@eslint-community/regexpp": "npm:^4.12.2" + "@eslint/config-array": "npm:^0.23.5" + "@eslint/config-helpers": "npm:^0.6.0" + "@eslint/core": "npm:^1.2.1" + "@eslint/plugin-kit": "npm:^0.7.2" "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.4.1" + "@humanwhocodes/retry": "npm:^0.4.2" "@types/estree": "npm:^1.0.6" - "@types/json-schema": "npm:^7.0.15" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" + ajv: "npm:^6.14.0" cross-spawn: "npm:^7.0.6" debug: "npm:^4.3.2" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.2.0" - eslint-visitor-keys: "npm:^4.2.0" - espree: "npm:^10.3.0" - esquery: "npm:^1.5.0" + eslint-scope: "npm:^9.1.2" + eslint-visitor-keys: "npm:^5.0.1" + espree: "npm:^11.2.0" + esquery: "npm:^1.7.0" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" file-entry-cache: "npm:^8.0.0" @@ -11411,8 +12979,7 @@ __metadata: imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" + minimatch: "npm:^10.2.4" natural-compare: "npm:^1.4.0" optionator: "npm:^0.9.3" peerDependencies: @@ -11422,22 +12989,22 @@ __metadata: optional: true bin: eslint: bin/eslint.js - checksum: 10c0/7f592ad228b9bd627a24870fdc875bacdab7bf535d4b67316c4cb791e90d0125130a74769f3c407b0c4b7027b3082ef33864a63ee1024552a60a17db60493f15 + checksum: 10c0/ebe0261fc750afb7f1a0c5a14f5288e57b971e0bee9754b1620132d22ad0c23690183977b0c9514ffa7ad460768d689d3fb9792ad9267b6c6205e2e0c17d8563 languageName: node linkType: hard -"espree@npm:^10.0.1, espree@npm:^10.1.0, espree@npm:^10.3.0": - version: 10.4.0 - resolution: "espree@npm:10.4.0" +"espree@npm:^11.2.0": + version: 11.2.0 + resolution: "espree@npm:11.2.0" dependencies: - acorn: "npm:^8.15.0" + acorn: "npm:^8.16.0" acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^4.2.1" - checksum: 10c0/c63fe06131c26c8157b4083313cb02a9a54720a08e21543300e55288c40e06c3fc284bdecf108d3a1372c5934a0a88644c98714f38b6ae8ed272b40d9ea08d6b + eslint-visitor-keys: "npm:^5.0.1" + checksum: 10c0/cf87e18ffd9dc113eb8d16588e7757701bc10c9934a71cce8b89c2611d51672681a918307bd6b19ac3ccd0e7ba1cbccc2f815b36b52fa7e73097b251014c3d81 languageName: node linkType: hard -"esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": +"esprima@npm:^4.0.0, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -11447,12 +13014,12 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.5.0, esquery@npm:^1.6.0": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" +"esquery@npm:^1.7.0": + version: 1.7.0 + resolution: "esquery@npm:1.7.0" dependencies: estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 + checksum: 10c0/77d5173db450b66f3bc685d11af4c90cffeedb340f34a39af96d43509a335ce39c894fd79233df32d38f5e4e219fa0f7076f6ec90bae8320170ba082c0db4793 languageName: node linkType: hard @@ -11587,13 +13154,6 @@ __metadata: languageName: node linkType: hard -"event-target-shim@npm:^5.0.0": - version: 5.0.1 - resolution: "event-target-shim@npm:5.0.1" - checksum: 10c0/0255d9f936215fd206156fd4caa9e8d35e62075d720dc7d847e89b417e5e62cf1ce6c9b4e0a1633a9256de0efefaf9f8d26924b1f3c8620cffb9db78e7d3076b - languageName: node - linkType: hard - "eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.4": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" @@ -11601,10 +13161,19 @@ __metadata: languageName: node linkType: hard -"eventemitter3@npm:^5.0.1": - version: 5.0.1 - resolution: "eventemitter3@npm:5.0.1" - checksum: 10c0/4ba5c00c506e6c786b4d6262cfbce90ddc14c10d4667e5c83ae993c9de88aa856033994dd2b35b83e8dc1170e224e66a319fa80adc4c32adcd2379bbc75da814 +"eventemitter3@npm:^5.0.4": + version: 5.0.4 + resolution: "eventemitter3@npm:5.0.4" + checksum: 10c0/575b8cac8d709e1473da46f8f15ef311b57ff7609445a7c71af5cd42598583eee6f098fa7a593e30f27e94b8865642baa0689e8fa97c016f742abdb3b1bf6d9a + languageName: node + linkType: hard + +"events-universal@npm:^1.0.0": + version: 1.0.1 + resolution: "events-universal@npm:1.0.1" + dependencies: + bare-events: "npm:^2.7.0" + checksum: 10c0/a1d9a5e9f95843650f8ec240dd1221454c110189a9813f32cdf7185759b43f1f964367ac7dca4ebc69150b59043f2d77c7e122b0d03abf7c25477ea5494785a5 languageName: node linkType: hard @@ -11647,7 +13216,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:^5.0.0, execa@npm:^5.1.1": +"execa@npm:^5.1.1": version: 5.1.1 resolution: "execa@npm:5.1.1" dependencies: @@ -11684,40 +13253,24 @@ __metadata: languageName: node linkType: hard -"execa@npm:~8.0.1": - version: 8.0.1 - resolution: "execa@npm:8.0.1" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^8.0.1" - human-signals: "npm:^5.0.0" - is-stream: "npm:^3.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^5.1.0" - onetime: "npm:^6.0.0" - signal-exit: "npm:^4.1.0" - strip-final-newline: "npm:^3.0.0" - checksum: 10c0/2c52d8775f5bf103ce8eec9c7ab3059909ba350a5164744e9947ed14a53f51687c040a250bda833f906d1283aa8803975b84e6c8f7a7c42f99dc8ef80250d1af - languageName: node - linkType: hard - -"exit@npm:^0.1.2": - version: 0.1.2 - resolution: "exit@npm:0.1.2" - checksum: 10c0/71d2ad9b36bc25bb8b104b17e830b40a08989be7f7d100b13269aaae7c3784c3e6e1e88a797e9e87523993a25ba27c8958959a554535370672cfb4d824af8989 +"exit-x@npm:^0.2.2": + version: 0.2.2 + resolution: "exit-x@npm:0.2.2" + checksum: 10c0/212a7a095ca5540e9581f1ef2d1d6a40df7a6027c8cc96e78ce1d16b86d1a88326d4a0eff8dff2b5ec1e68bb0c1edd5d0dfdde87df1869bf7514d4bc6a5cbd72 languageName: node linkType: hard -"expect@npm:^29.0.0, expect@npm:^29.7.0": - version: 29.7.0 - resolution: "expect@npm:29.7.0" +"expect@npm:30.4.1, expect@npm:^30.0.0": + version: 30.4.1 + resolution: "expect@npm:30.4.1" dependencies: - "@jest/expect-utils": "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - jest-matcher-utils: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - checksum: 10c0/2eddeace66e68b8d8ee5f7be57f3014b19770caaf6815c7a08d131821da527fb8c8cb7b3dcd7c883d2d3d8d184206a4268984618032d1e4b16dc8d6596475d41 + "@jest/expect-utils": "npm:30.4.1" + "@jest/get-type": "npm:30.1.0" + jest-matcher-utils: "npm:30.4.1" + jest-message-util: "npm:30.4.1" + jest-mock: "npm:30.4.1" + jest-util: "npm:30.4.1" + checksum: 10c0/ad04fbdffac5a2bae186478938a60f737e3aac823db9a80c87f3f390f9f458bddcc454dc3a3997d715706747c6aff928923e6a71db3a221adb89a51cc1582e72 languageName: node linkType: hard @@ -11836,29 +13389,29 @@ __metadata: dependencies: "@amplitude/analytics-browser": "npm:^2.37.0" "@amplitude/experiment-js-client": "npm:^1.20.3" - "@lavamoat/allow-scripts": "npm:3.3.2" + "@lavamoat/allow-scripts": "npm:5.1.0" "@ledgerhq/hw-app-str": "npm:7.7.4" "@ledgerhq/hw-transport-webhid": "npm:6.35.4" "@playwright/test": "npm:1.61.0" "@radix-ui/react-dialog": "npm:1.1.16" "@radix-ui/react-popover": "npm:1.1.16" "@reduxjs/toolkit": "npm:2.12.0" - "@sentry/browser": "npm:9.13.0" - "@sentry/webpack-plugin": "npm:3.3.1" + "@sentry/browser": "npm:10.62.0" + "@sentry/webpack-plugin": "npm:5.3.0" "@shared/api": "npm:1.0.0" "@shared/constants": "npm:1.0.0" "@shared/helpers": "npm:1.0.0" "@stellar/design-system": "npm:3.2.8" - "@stellar/typescript-wallet-sdk-km": "npm:1.9.0" + "@stellar/typescript-wallet-sdk-km": "npm:3.0.1" "@svgr/webpack": "npm:8.1.0" "@tailwindcss/postcss": "npm:4.3.1" "@testing-library/react": "npm:16.3.2" "@testing-library/user-event": "npm:14.6.1" "@types/chrome": "npm:0.1.43" "@types/js-yaml": "npm:4.0.9" - "@types/jsdom": "npm:21.1.7" + "@types/jsdom": "npm:28.0.3" "@types/lodash": "npm:4.17.24" - "@types/node": "npm:22.14.1" + "@types/node": "npm:26.0.1" "@types/qrcode.react": "npm:3.0.0" "@types/react": "npm:19.2.17" "@types/react-copy-to-clipboard": "npm:5.0.7" @@ -11869,26 +13422,26 @@ __metadata: "@types/semver": "npm:7.7.1" "@types/webextension-polyfill": "npm:0.12.5" "@types/yup": "npm:0.32.0" - bignumber.js: "npm:9.3.0" + bignumber.js: "npm:11.1.4" buffer: "npm:6.0.3" classnames: "npm:2.5.1" - concurrently: "npm:9.1.2" - copy-webpack-plugin: "npm:13.0.0" + concurrently: "npm:10.0.3" + copy-webpack-plugin: "npm:14.0.0" css-loader: "npm:7.1.4" - dotenv-webpack: "npm:8.1.0" + dotenv-webpack: "npm:9.0.0" fetch: "npm:1.1.0" fork-ts-checker-webpack-plugin: "npm:9.1.0" formik: "npm:2.4.9" html-loader: "npm:5.1.0" html-webpack-plugin: "npm:5.6.7" https-browserify: "npm:1.0.0" - i18next: "npm:25.0.1" + i18next: "npm:26.3.3" i18next-browser-languagedetector: "npm:8.2.1" i18next-resources-to-backend: "npm:1.2.1" - i18next-scanner-webpack: "npm:0.9.1" + i18next-scanner-webpack: "npm:1.0.0" jest-canvas-mock: "npm:2.5.2" - jest-environment-jsdom: "npm:29.7.0" - js-yaml: "npm:4.2.0" + jest-environment-jsdom: "npm:30.4.1" + js-yaml: "npm:5.2.0" jsonschema: "npm:1.5.0" lodash: "npm:4.18.1" mini-css-extract-plugin: "npm:2.10.2" @@ -11910,10 +13463,10 @@ __metadata: react-router-dom: "npm:7.17.0" redux: "npm:5.0.1" sass: "npm:1.101.0" - sass-loader: "npm:16.0.5" + sass-loader: "npm:17.0.0" semver: "npm:7.8.4" - ses: "npm:1.12.0" - shadcn: "npm:3.8.4" + ses: "npm:2.2.0" + shadcn: "npm:4.12.0" sonner: "npm:2.0.7" soroswap-router-sdk: "npm:1.4.6" speed-measure-webpack-plugin: "npm:1.6.0" @@ -11951,7 +13504,14 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2, fast-glob@npm:^3.3.3": +"fast-fifo@npm:^1.3.2": + version: 1.3.2 + resolution: "fast-fifo@npm:1.3.2" + checksum: 10c0/d53f6f786875e8b0529f784b59b4b05d4b5c31c651710496440006a398389a579c8dbcd2081311478b5bf77f4b0b21de69109c5a4eabea9d8e8783d1eb864e4c + languageName: node + linkType: hard + +"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.3": version: 3.3.3 resolution: "fast-glob@npm:3.3.3" dependencies: @@ -11985,10 +13545,12 @@ __metadata: languageName: node linkType: hard -"fastest-levenshtein@npm:^1.0.12": - version: 1.0.16 - resolution: "fastest-levenshtein@npm:1.0.16" - checksum: 10c0/7e3d8ae812a7f4fdf8cad18e9cde436a39addf266a5986f653ea0d81e0de0900f50c0f27c6d5aff3f686bcb48acbd45be115ae2216f36a6a13a7dbbf5cad878b +"fastq@npm:^1.13.0": + version: 1.20.1 + resolution: "fastq@npm:1.20.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10c0/e5dd725884decb1f11e5c822221d76136f239d0236f176fab80b7b8f9e7619ae57e6b4e5b73defc21e6b9ef99437ee7b545cff8e6c2c337819633712fa9d352e languageName: node linkType: hard @@ -12019,7 +13581,7 @@ __metadata: languageName: node linkType: hard -"fb-watchman@npm:^2.0.0": +"fb-watchman@npm:^2.0.2": version: 2.0.2 resolution: "fb-watchman@npm:2.0.2" dependencies: @@ -12040,15 +13602,6 @@ __metadata: languageName: node linkType: hard -"feaxios@npm:^0.0.20": - version: 0.0.20 - resolution: "feaxios@npm:0.0.20" - dependencies: - is-retry-allowed: "npm:^3.0.0" - checksum: 10c0/3e043b05d47b5565823fe604da7a374388574bd94d4d26d35fa697a1ffd338e6005ea1c4b9801d6d26b804ba3ccd277702eb8d80bab75b07e9433dea269858b2 - languageName: node - linkType: hard - "feaxios@npm:^0.0.23": version: 0.0.23 resolution: "feaxios@npm:0.0.23" @@ -12221,17 +13774,7 @@ __metadata: languageName: node linkType: hard -"flush-write-stream@npm:^1.0.2": - version: 1.1.1 - resolution: "flush-write-stream@npm:1.1.1" - dependencies: - inherits: "npm:^2.0.3" - readable-stream: "npm:^2.3.6" - checksum: 10c0/2cd4f65b728d5f388197a03dafabc6a5e4f0c2ed1a2d912e288f7aa1c2996dd90875e55b50cf32c78dca55ad2e2dfae5d3db09b223838388033d87cf5920dd87 - languageName: node - linkType: hard - -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.16.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.15.11, follow-redirects@npm:^1.16.0": version: 1.16.0 resolution: "follow-redirects@npm:1.16.0" peerDependenciesMeta: @@ -12250,7 +13793,7 @@ __metadata: languageName: node linkType: hard -"foreground-child@npm:^3.1.0, foreground-child@npm:^3.3.1": +"foreground-child@npm:^3.1.0": version: 3.3.1 resolution: "foreground-child@npm:3.3.1" dependencies: @@ -12283,13 +13826,6 @@ __metadata: languageName: node linkType: hard -"form-data-encoder@npm:1.7.2": - version: 1.7.2 - resolution: "form-data-encoder@npm:1.7.2" - checksum: 10c0/56553768037b6d55d9de524f97fe70555f0e415e781cb56fc457a68263de3d40fadea2304d4beef2d40b1a851269bd7854e42c362107071892cb5238debe9464 - languageName: node - linkType: hard - "form-data-encoder@npm:^2.1.2": version: 2.1.4 resolution: "form-data-encoder@npm:2.1.4" @@ -12297,14 +13833,7 @@ __metadata: languageName: node linkType: hard -"form-data-encoder@npm:^4.0.2": - version: 4.1.0 - resolution: "form-data-encoder@npm:4.1.0" - checksum: 10c0/cbd655aa8ffff6f7c2733b1d8e95fa9a2fe8a88a90bde29fb54b8e02c9406e51f32a014bfe8297d67fbac9f77614d14a8b4bbc4fd0352838e67e97a881d06332 - languageName: node - linkType: hard - -"form-data@npm:^4.0.0, form-data@npm:^4.0.1, form-data@npm:^4.0.4, form-data@npm:^4.0.5": +"form-data@npm:^4.0.5": version: 4.0.5 resolution: "form-data@npm:4.0.5" dependencies: @@ -12324,16 +13853,6 @@ __metadata: languageName: node linkType: hard -"formdata-node@npm:^4.3.2": - version: 4.4.1 - resolution: "formdata-node@npm:4.4.1" - dependencies: - node-domexception: "npm:1.0.0" - web-streams-polyfill: "npm:4.0.0-beta.3" - checksum: 10c0/74151e7b228ffb33b565cec69182694ad07cc3fdd9126a8240468bb70a8ba66e97e097072b60bcb08729b24c7ce3fd3e0bd7f1f80df6f9f662b9656786e76f6a - languageName: node - linkType: hard - "formdata-polyfill@npm:^4.0.10": version: 4.0.10 resolution: "formdata-polyfill@npm:4.0.10" @@ -12379,18 +13898,18 @@ __metadata: version: 0.0.0-use.local resolution: "freighter@workspace:." dependencies: - "@actions/core": "npm:1.11.1" - "@babel/core": "npm:7.29.7" - "@babel/eslint-parser": "npm:7.29.7" + "@actions/core": "npm:3.0.1" + "@babel/core": "npm:8.0.1" + "@babel/eslint-parser": "npm:8.0.1" "@babel/plugin-proposal-optional-chaining": "npm:7.21.0" - "@babel/preset-env": "npm:7.29.7" - "@babel/preset-react": "npm:7.29.7" - "@babel/preset-typescript": "npm:7.29.7" - "@lavamoat/allow-scripts": "npm:3.3.1" - "@lavamoat/preinstall-always-fail": "npm:2.1.0" + "@babel/preset-env": "npm:8.0.2" + "@babel/preset-react": "npm:8.0.1" + "@babel/preset-typescript": "npm:8.0.1" + "@lavamoat/allow-scripts": "npm:5.1.0" + "@lavamoat/preinstall-always-fail": "npm:3.0.0" "@testing-library/dom": "npm:10.4.1" "@testing-library/jest-dom": "npm:6.9.1" - "@types/jest": "npm:29.5.14" + "@types/jest": "npm:30.0.0" "@types/react": "npm:19.2.17" "@types/react-dom": "npm:19.2.3" "@types/styled-components": "npm:5.1.4" @@ -12398,41 +13917,41 @@ __metadata: "@typescript-eslint/parser": "npm:8.61.0" "@vercel/ncc": "npm:0.44.0" babel-eslint: "npm:10.x" - babel-jest: "npm:29.7.0" + babel-jest: "npm:30.4.1" babel-loader: "npm:10.1.1" babel-plugin-dynamic-import-node: "npm:2.3.3" babel-polyfill: "npm:6.26.0" - eslint: "npm:9.18.0" + eslint: "npm:10.6.0" eslint-config-prettier: "npm:10.1.8" eslint-config-react: "npm:1.1.7" - eslint-import-resolver-typescript: "npm:3.7.0" + eslint-import-resolver-typescript: "npm:4.4.5" eslint-plugin-import: "npm:2.32.0" - eslint-plugin-jsdoc: "npm:50.6.2" + eslint-plugin-jsdoc: "npm:63.0.10" eslint-plugin-jsx-a11y: "npm:6.x" eslint-plugin-prefer-arrow: "npm:1.2.3" eslint-plugin-prettier: "npm:5.5.6" eslint-plugin-react: "npm:7.37.5" - eslint-plugin-react-hooks: "npm:5.1.0" - eslint-webpack-plugin: "npm:5.0.0" - glob: "npm:12.0.0" - globals: "npm:16.0.0" - got: "npm:14.4.5" + eslint-plugin-react-hooks: "npm:7.1.1" + eslint-webpack-plugin: "npm:6.0.0" + glob: "npm:13.0.6" + globals: "npm:17.7.0" + got: "npm:15.0.6" husky: "npm:9.1.7" isomorphic-unfetch: "npm:4.0.2" - jest: "npm:29.7.0" + jest: "npm:30.4.2" jest-fixed-jsdom: "npm:0.0.11" jest-localstorage-mock: "npm:2.4.26" - jsdom: "npm:26.0.0" + jsdom: "npm:29.1.1" jsdom-global: "npm:3.0.2" - lint-staged: "npm:15.4.1" + lint-staged: "npm:17.0.8" npm-run-all: "npm:4.1.5" prettier: "npm:3.8.4" pretty-quick: "npm:4.2.2" - react-i18next: "npm:15.4.1" + react-i18next: "npm:17.0.8" ts-loader: "npm:9.6.0" - typescript: "npm:5.7.3" + typescript: "npm:6.0.3" webpack: "npm:5.107.2" - webpack-cli: "npm:6.0.1" + webpack-cli: "npm:7.1.0" webpack-dev-server: "npm:5.2.5" webpack-merge: "npm:6.0.1" languageName: unknown @@ -12498,15 +14017,6 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^2.0.0": - version: 2.1.0 - resolution: "fs-minipass@npm:2.1.0" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 - languageName: node - linkType: hard - "fs-minipass@npm:^3.0.0": version: 3.0.3 resolution: "fs-minipass@npm:3.0.3" @@ -12516,13 +14026,13 @@ __metadata: languageName: node linkType: hard -"fs-mkdirp-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "fs-mkdirp-stream@npm:1.0.0" +"fs-mkdirp-stream@npm:^2.0.1": + version: 2.0.1 + resolution: "fs-mkdirp-stream@npm:2.0.1" dependencies: - graceful-fs: "npm:^4.1.11" - through2: "npm:^2.0.3" - checksum: 10c0/c1a6a8913e6cda1741e1d146d05baa21fe6a91802b836b3a0ae1b0654269b5097727d77d97cf5f242317b2c5e44831f834fd3bb36853a2083494d94523221a39 + graceful-fs: "npm:^4.2.8" + streamx: "npm:^2.12.0" + checksum: 10c0/57d25f59a15acd7a1c5d0c9fc0fee08f9e1224a3010e21eecedf1e6d42672b3e377d10ea41cf8fc86ceb2651601648156af615fd18216318435be48031001ec8 languageName: node linkType: hard @@ -12563,7 +14073,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": +"fsevents@npm:^2.3.3, fsevents@npm:~2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -12582,7 +14092,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A^2.3.3#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -12626,13 +14136,6 @@ __metadata: languageName: node linkType: hard -"fzf@npm:^0.5.2": - version: 0.5.2 - resolution: "fzf@npm:0.5.2" - checksum: 10c0/5b1f945b289855891c4e3cb03db35381f8d85464dceb15b6d32f0fc74e43d7d2b9a13554cf78a86760ba762de39134d40644ccb54e60668a4bc5b15c4765d36e - languageName: node - linkType: hard - "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" @@ -12654,6 +14157,13 @@ __metadata: languageName: node linkType: hard +"get-east-asian-width@npm:^1.5.0": + version: 1.6.0 + resolution: "get-east-asian-width@npm:1.6.0" + checksum: 10c0/7e72e9550fd49ca5b246f9af6bb2afc129c96412845ff6556b3274fd44817a381702ca17028efe9866b261a3d44254cbf21e6c90cf05b4b61675630af776d431 + languageName: node + linkType: hard + "get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7, get-intrinsic@npm:^1.3.0": version: 1.3.0 resolution: "get-intrinsic@npm:1.3.0" @@ -12717,13 +14227,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^8.0.1": - version: 8.0.1 - resolution: "get-stream@npm:8.0.1" - checksum: 10c0/5c2181e98202b9dae0bb4a849979291043e5892eb40312b47f0c22b9414fc9b28a3b6063d2375705eb24abc41ecf97894d9a51f64ff021511b504477b27b4290 - languageName: node - linkType: hard - "get-stream@npm:^9.0.0, get-stream@npm:^9.0.1": version: 9.0.1 resolution: "get-stream@npm:9.0.1" @@ -12745,12 +14248,12 @@ __metadata: languageName: node linkType: hard -"get-tsconfig@npm:^4.7.5": - version: 4.10.1 - resolution: "get-tsconfig@npm:4.10.1" +"get-tsconfig@npm:^4.10.1": + version: 4.14.0 + resolution: "get-tsconfig@npm:4.14.0" dependencies: resolve-pkg-maps: "npm:^1.0.0" - checksum: 10c0/7f8e3dabc6a49b747920a800fb88e1952fef871cdf51b79e98db48275a5de6cdaf499c55ee67df5fa6fe7ce65f0063e26de0f2e53049b408c585aa74d39ffa21 + checksum: 10c0/abc2b9275468eb589079a0b7a95eb5107c14fdd0ca6dda1bff116fe774ea1f79975421dcb22a0c86b4f820fcc69a7655dddf9b6d6a8a2c06fcb59e19794c0724 languageName: node linkType: hard @@ -12761,16 +14264,6 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^3.1.0": - version: 3.1.0 - resolution: "glob-parent@npm:3.1.0" - dependencies: - is-glob: "npm:^3.1.0" - path-dirname: "npm:^1.0.0" - checksum: 10c0/bfa89ce5ae1dfea4c2ece7b61d2ea230d87fcbec7472915cfdb3f4caf688a91ecb0dc86ae39b1e17505adce7e64cae3b971d64dc66091f3a0131169fd631b00d - languageName: node - linkType: hard - "glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" @@ -12789,21 +14282,19 @@ __metadata: languageName: node linkType: hard -"glob-stream@npm:^6.1.0": - version: 6.1.0 - resolution: "glob-stream@npm:6.1.0" +"glob-stream@npm:^8.0.3": + version: 8.0.3 + resolution: "glob-stream@npm:8.0.3" dependencies: - extend: "npm:^3.0.0" - glob: "npm:^7.1.1" - glob-parent: "npm:^3.1.0" + "@gulpjs/to-absolute-glob": "npm:^4.0.0" + anymatch: "npm:^3.1.3" + fastq: "npm:^1.13.0" + glob-parent: "npm:^6.0.2" + is-glob: "npm:^4.0.3" is-negated-glob: "npm:^1.0.0" - ordered-read-streams: "npm:^1.0.0" - pumpify: "npm:^1.3.5" - readable-stream: "npm:^2.1.5" - remove-trailing-separator: "npm:^1.0.1" - to-absolute-glob: "npm:^2.0.0" - unique-stream: "npm:^2.0.2" - checksum: 10c0/6b2653f2aafe99f17c0348de34dc0782cc20c3425ade4d4e354ef125b6e049e71cb4a209c6ea624a6a72bf99e0d7a25f1c2f04f81e42b0b8091b48d210fc48f5 + normalize-path: "npm:^3.0.0" + streamx: "npm:^2.12.5" + checksum: 10c0/feb45646aa346251eece096229282d574e106b343714618d6e5c60e9e53478e17d11a7304957dbbfc15314df607464025ddad206aa331dbcba73bacaa127b3f4 languageName: node linkType: hard @@ -12823,25 +14314,36 @@ __metadata: languageName: node linkType: hard -"glob@npm:12.0.0": - version: 12.0.0 - resolution: "glob@npm:12.0.0" +"glob@npm:13.0.6, glob@npm:^13.0.0, glob@npm:^13.0.6": + version: 13.0.6 + resolution: "glob@npm:13.0.6" + dependencies: + minimatch: "npm:^10.2.2" + minipass: "npm:^7.1.3" + path-scurry: "npm:^2.0.2" + checksum: 10c0/269c236f11a9b50357fe7a8c6aadac667e01deb5242b19c84975628f05f4438d8ee1354bb62c5d6c10f37fd59911b54d7799730633a2786660d8c69f1d18120a + languageName: node + linkType: hard + +"glob@npm:^10.2.2": + version: 10.4.5 + resolution: "glob@npm:10.4.5" dependencies: - foreground-child: "npm:^3.3.1" - jackspeak: "npm:^4.1.1" - minimatch: "npm:^10.1.1" + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" minipass: "npm:^7.1.2" package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^2.0.0" + path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 10c0/923fbb7e30913496dc1c30191edb7ebb610a26edac81710a5f697c718b08694bce7fb0245baceba5383472778a8431ff7c36571703507cc6563602d3c139c993 + checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": - version: 10.4.5 - resolution: "glob@npm:10.4.5" +"glob@npm:^10.5.0": + version: 10.5.0 + resolution: "glob@npm:10.5.0" dependencies: foreground-child: "npm:^3.1.0" jackspeak: "npm:^3.1.2" @@ -12851,7 +14353,7 @@ __metadata: path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e + checksum: 10c0/100705eddbde6323e7b35e1d1ac28bcb58322095bd8e63a7d0bef1a2cdafe0d0f7922a981b2b48369a4f8c1b077be5c171804534c3509dfe950dde15fbe6d828 languageName: node linkType: hard @@ -12868,7 +14370,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4": +"glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -12882,18 +14384,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^9.3.2": - version: 9.3.5 - resolution: "glob@npm:9.3.5" - dependencies: - fs.realpath: "npm:^1.0.0" - minimatch: "npm:^8.0.2" - minipass: "npm:^4.2.4" - path-scurry: "npm:^1.6.1" - checksum: 10c0/2f6c2b9ee019ee21dc258ae97a88719614591e4c979cb4580b1b9df6f0f778a3cb38b4bdaf18dfa584637ea10f89a3c5f2533a5e449cf8741514ad18b0951f2e - languageName: node - linkType: hard - "global-dirs@npm:^3.0.0": version: 3.0.1 resolution: "global-dirs@npm:3.0.1" @@ -12903,17 +14393,10 @@ __metadata: languageName: node linkType: hard -"globals@npm:16.0.0": - version: 16.0.0 - resolution: "globals@npm:16.0.0" - checksum: 10c0/8906d5f01838df64a81d6c2a7b7214312e2216cf65c5ed1546dc9a7d0febddf55ffa906cf04efd5b01eec2534d6f14859a89535d1a68241832810e41ef3fd5bb - languageName: node - linkType: hard - -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d +"globals@npm:17.7.0": + version: 17.7.0 + resolution: "globals@npm:17.7.0" + checksum: 10c0/e83f791acf537b85fa1632ac48a45432a1999a61acd9f955b5c2145f66d6b5000a7945029874b6184fa2dfac8d33af03885a5a7ffa457866f1bcf0b40d0c1291 languageName: node linkType: hard @@ -12961,22 +14444,23 @@ __metadata: languageName: node linkType: hard -"got@npm:14.4.5": - version: 14.4.5 - resolution: "got@npm:14.4.5" +"got@npm:15.0.6": + version: 15.0.6 + resolution: "got@npm:15.0.6" dependencies: - "@sindresorhus/is": "npm:^7.0.1" - "@szmarczak/http-timer": "npm:^5.0.1" + "@sindresorhus/is": "npm:^8.0.0" + byte-counter: "npm:^0.1.0" cacheable-lookup: "npm:^7.0.0" - cacheable-request: "npm:^12.0.1" - decompress-response: "npm:^6.0.0" - form-data-encoder: "npm:^4.0.2" + cacheable-request: "npm:^13.0.18" + chunk-data: "npm:^0.1.0" + decompress-response: "npm:^10.0.0" http2-wrapper: "npm:^2.2.1" - lowercase-keys: "npm:^3.0.0" - p-cancelable: "npm:^4.0.1" - responselike: "npm:^3.0.0" - type-fest: "npm:^4.26.1" - checksum: 10c0/37bcb77dcbe6b2d00345d11e2749bb9f5fcab38850dab84015684545b72ba0169324330ccde81e40ef356150238008c3b282ea38fb774bde66289f6433681cd8 + keyv: "npm:^5.6.0" + lowercase-keys: "npm:^4.0.1" + responselike: "npm:^4.0.2" + type-fest: "npm:^5.6.0" + uint8array-extras: "npm:^1.5.0" + checksum: 10c0/06042ed8b18c3c621013abe87a490a6bca8e8eb902f5dfb1c304c2f9d347510aad6e406ecad68c4c6f1eecd21d7ddafe6cfe049da4f9ab36e72f900a842a6a60 languageName: node linkType: hard @@ -13006,20 +14490,13 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.0.0, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.8, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 languageName: node linkType: hard -"graphql@npm:^16.12.0": - version: 16.12.0 - resolution: "graphql@npm:16.12.0" - checksum: 10c0/b6fffa4e8a4e4a9933ebe85e7470b346dbf49050c1a482fac5e03e4a1a7bed2ecd3a4c97e29f04457af929464bc5e4f2aac991090c2f320111eef26e902a5c75 - languageName: node - linkType: hard - "gray-matter@npm:^4.0.3": version: 4.0.3 resolution: "gray-matter@npm:4.0.3" @@ -13278,13 +14755,6 @@ __metadata: languageName: node linkType: hard -"headers-polyfill@npm:^4.0.2": - version: 4.0.3 - resolution: "headers-polyfill@npm:4.0.3" - checksum: 10c0/53e85b2c6385f8d411945fb890c5369f1469ce8aa32a6e8d28196df38568148de640c81cf88cbc7c67767103dd9acba48f4f891982da63178fc6e34560022afe - languageName: node - linkType: hard - "heimdalljs-logger@npm:^0.1.10, heimdalljs-logger@npm:^0.1.7": version: 0.1.10 resolution: "heimdalljs-logger@npm:0.1.10" @@ -13304,6 +14774,22 @@ __metadata: languageName: node linkType: hard +"hermes-estree@npm:0.25.1": + version: 0.25.1 + resolution: "hermes-estree@npm:0.25.1" + checksum: 10c0/48be3b2fa37a0cbc77a112a89096fa212f25d06de92781b163d67853d210a8a5c3784fac23d7d48335058f7ed283115c87b4332c2a2abaaccc76d0ead1a282ac + languageName: node + linkType: hard + +"hermes-parser@npm:^0.25.1": + version: 0.25.1 + resolution: "hermes-parser@npm:0.25.1" + dependencies: + hermes-estree: "npm:0.25.1" + checksum: 10c0/3abaa4c6f1bcc25273f267297a89a4904963ea29af19b8e4f6eabe04f1c2c7e9abd7bfc4730ddb1d58f2ea04b6fee74053d8bddb5656ec6ebf6c79cc8d14202c + languageName: node + linkType: hard + "history@npm:^4.9.0": version: 4.10.1 resolution: "history@npm:4.10.1" @@ -13341,12 +14827,12 @@ __metadata: languageName: node linkType: hard -"hosted-git-info@npm:^7.0.0": - version: 7.0.2 - resolution: "hosted-git-info@npm:7.0.2" +"hosted-git-info@npm:^9.0.0": + version: 9.0.3 + resolution: "hosted-git-info@npm:9.0.3" dependencies: - lru-cache: "npm:^10.0.1" - checksum: 10c0/b19dbd92d3c0b4b0f1513cf79b0fc189f54d6af2129eeb201de2e9baaa711f1936929c848b866d9c8667a0f956f34bf4f07418c12be1ee9ca74fd9246335ca1f + lru-cache: "npm:^11.1.0" + checksum: 10c0/8f216ccb461ca54ae1846745325ced6a880b53101a58c820b813f067caa301576bf974f787df5688b7f0f1b752cdfcbaa2979751d1fcfd604032cc57bc538607 languageName: node linkType: hard @@ -13356,18 +14842,9 @@ __metadata: dependencies: inherits: "npm:^2.0.1" obuf: "npm:^1.0.0" - readable-stream: "npm:^2.0.1" - wbuf: "npm:^1.1.0" - checksum: 10c0/55b9e824430bab82a19d079cb6e33042d7d0640325678c9917fcc020c61d8a08ca671b6c942c7f0aae9bb6e4b67ffb50734a72f9e21d66407c3138c1983b70f0 - languageName: node - linkType: hard - -"html-encoding-sniffer@npm:^3.0.0": - version: 3.0.0 - resolution: "html-encoding-sniffer@npm:3.0.0" - dependencies: - whatwg-encoding: "npm:^2.0.0" - checksum: 10c0/b17b3b0fb5d061d8eb15121c3b0b536376c3e295ecaf09ba48dd69c6b6c957839db124fe1e2b3f11329753a4ee01aa7dedf63b7677999e86da17fbbdd82c5386 + readable-stream: "npm:^2.0.1" + wbuf: "npm:^1.1.0" + checksum: 10c0/55b9e824430bab82a19d079cb6e33042d7d0640325678c9917fcc020c61d8a08ca671b6c942c7f0aae9bb6e4b67ffb50734a72f9e21d66407c3138c1983b70f0 languageName: node linkType: hard @@ -13380,6 +14857,22 @@ __metadata: languageName: node linkType: hard +"html-encoding-sniffer@npm:^6.0.0": + version: 6.0.0 + resolution: "html-encoding-sniffer@npm:6.0.0" + dependencies: + "@exodus/bytes": "npm:^1.6.0" + checksum: 10c0/66dc3f6f5539cc3beb814fcbfae7eacf4ec38cf824d6e1425b72039b51a40f4456bd8541ba66f4f4fe09cdf885ab5cd5bae6ec6339d6895a930b2fdb83c53025 + languageName: node + linkType: hard + +"html-entities@npm:^2.6.0": + version: 2.6.0 + resolution: "html-entities@npm:2.6.0" + checksum: 10c0/7c8b15d9ea0cd00dc9279f61bab002ba6ca8a7a0f3c36ed2db3530a67a9621c017830d1d2c1c65beb9b8e3436ea663e9cf8b230472e0e413359399413b27c8b7 + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0, html-escaper@npm:^2.0.2": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -13477,15 +14970,15 @@ __metadata: languageName: node linkType: hard -"htmlparser2@npm:^10.0.0": - version: 10.0.0 - resolution: "htmlparser2@npm:10.0.0" +"htmlparser2@npm:^10.1.0": + version: 10.1.0 + resolution: "htmlparser2@npm:10.1.0" dependencies: domelementtype: "npm:^2.3.0" domhandler: "npm:^5.0.3" - domutils: "npm:^3.2.1" - entities: "npm:^6.0.0" - checksum: 10c0/47cfa37e529c86a7ba9a1e0e6f951ad26ef8ca5af898ab6e8916fa02c0264c1453b4a65f28b7b8a7f9d0d29b5a70abead8203bf8b3f07bc69407e85e7d9a68e4 + domutils: "npm:^3.2.2" + entities: "npm:^7.0.1" + checksum: 10c0/36394e29b80cfcc5e78e0fa4d3aa21fdaac3e6778d23e5c933e625c290987cd9a724a2eb0753ab60ed0c69dfaba0ab115f0ee50fb112fd8f0c4d522e7e0089a2 languageName: node linkType: hard @@ -13513,7 +15006,7 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.1.1": +"http-cache-semantics@npm:^4.1.1, http-cache-semantics@npm:^4.2.0": version: 4.2.0 resolution: "http-cache-semantics@npm:4.2.0" checksum: 10c0/45b66a945cf13ec2d1f29432277201313babf4a01d9e52f44b31ca923434083afeca03f18417f599c9ab3d0e7b618ceb21257542338b57c54b710463b4a53e37 @@ -13559,17 +15052,6 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "http-proxy-agent@npm:5.0.0" - dependencies: - "@tootallnate/once": "npm:2" - agent-base: "npm:6" - debug: "npm:4" - checksum: 10c0/32a05e413430b2c1e542e5c74b38a9f14865301dd69dff2e53ddb684989440e3d2ce0c4b64d25eb63cf6283e6265ff979a61cf93e3ca3d23047ddfdc8df34a32 - languageName: node - linkType: hard - "http-proxy-agent@npm:^7.0.0, http-proxy-agent@npm:^7.0.2": version: 7.0.2 resolution: "http-proxy-agent@npm:7.0.2" @@ -13653,13 +15135,6 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^5.0.0": - version: 5.0.0 - resolution: "human-signals@npm:5.0.0" - checksum: 10c0/5a9359073fe17a8b58e5a085e9a39a950366d9f00217c4ff5878bd312e09d80f460536ea6a3f260b5943a01fe55c158d1cea3fc7bee3d0520aeef04f6d915c82 - languageName: node - linkType: hard - "human-signals@npm:^8.0.1": version: 8.0.1 resolution: "human-signals@npm:8.0.1" @@ -13667,15 +15142,6 @@ __metadata: languageName: node linkType: hard -"humanize-ms@npm:^1.2.1": - version: 1.2.1 - resolution: "humanize-ms@npm:1.2.1" - dependencies: - ms: "npm:^2.0.0" - checksum: 10c0/f34a2c20161d02303c2807badec2f3b49cbfbbb409abd4f95a07377ae01cfe6b59e3d15ac609cffcd8f2521f0eb37b7e1091acf65da99aa2a4f1ad63c21e7e7a - languageName: node - linkType: hard - "husky@npm:9.1.7": version: 9.1.7 resolution: "husky@npm:9.1.7" @@ -13701,31 +15167,30 @@ __metadata: languageName: node linkType: hard -"i18next-parser@npm:^5.3.0": - version: 5.4.0 - resolution: "i18next-parser@npm:5.4.0" +"i18next-parser@npm:^9.3.0": + version: 9.4.0 + resolution: "i18next-parser@npm:9.4.0" dependencies: - "@babel/runtime": "npm:^7.15.4" + "@babel/runtime": "npm:^7.25.0" broccoli-plugin: "npm:^4.0.7" - cheerio: "npm:^1.0.0-rc.2" - colors: "npm:1.4.0" - commander: "npm:~8.3.0" - concat-stream: "npm:~2.0.0" + cheerio: "npm:^1.0.0" + colors: "npm:^1.4.0" + commander: "npm:^12.1.0" eol: "npm:^0.9.1" - fs-extra: "npm:^10.0.0" + esbuild: "npm:^0.25.0" + fs-extra: "npm:^11.2.0" gulp-sort: "npm:^2.0.0" - i18next: "npm:^21.2.0" - js-yaml: "npm:4.1.0" - rsvp: "npm:^4.8.2" - sort-keys: "npm:^4.2.0" - through2: "npm:~4.0.2" - typescript: "npm:^4.2.4" - vinyl: "npm:~2.2.1" - vinyl-fs: "npm:^3.0.2" - vue-template-compiler: "npm:^2.6.11" + i18next: "npm:^23.5.1 || ^24.2.0" + js-yaml: "npm:^4.1.0" + lilconfig: "npm:^3.1.3" + rsvp: "npm:^4.8.5" + sort-keys: "npm:^5.0.0" + typescript: "npm:^5.0.4" + vinyl: "npm:^3.0.0" + vinyl-fs: "npm:^4.0.0" bin: i18next: bin/cli.js - checksum: 10c0/c677c6060dd2f3bd95490a6125b710861495eceaae23d326f60d36ac1caaefcd3bb901012c4c85a3da96cdd0bfd9ae466337621793260dbb440c4a4137e694d2 + checksum: 10c0/4a9c94d16ea0869e58cd600216d56e6ccb2d815bf5acdb96df1aba0750d053514abd52136434681de3601bc0f5324464b8a42f608bfe6c95961f5c2a2e38e3da languageName: node linkType: hard @@ -13738,36 +15203,39 @@ __metadata: languageName: node linkType: hard -"i18next-scanner-webpack@npm:0.9.1": - version: 0.9.1 - resolution: "i18next-scanner-webpack@npm:0.9.1" +"i18next-scanner-webpack@npm:1.0.0": + version: 1.0.0 + resolution: "i18next-scanner-webpack@npm:1.0.0" dependencies: - i18next-parser: "npm:^5.3.0" - vinyl-fs: "npm:^3.0.3" - checksum: 10c0/6b6213907ae6aff536190c08dd2c56ed18bdcdc8c97448711931c4d74a736b4f34a320f7ce83e5bb9880ff3ebe749fda22ccf8066e6e0f06779bddfc1c6dbacb + i18next-parser: "npm:^9.3.0" + vinyl-fs: "npm:^4.0.2" + checksum: 10c0/a0a2ca1f89f2b71070c83cc1a1e309aaad13b1dddf81e276cc0641fa58e79b53a0f32bb25f39b8586d02f5d0e5628dbb222539b82243e386850c35b9ddee2c88 languageName: node linkType: hard -"i18next@npm:25.0.1": - version: 25.0.1 - resolution: "i18next@npm:25.0.1" - dependencies: - "@babel/runtime": "npm:^7.26.10" +"i18next@npm:26.3.3": + version: 26.3.3 + resolution: "i18next@npm:26.3.3" peerDependencies: - typescript: ^5 + typescript: ^5 || ^6 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/2f380658472e6697c2133240c2bbffbacefdc49ef7224f00823816f7dcb7977047ad54bfb3dd49e2bd27cf66cc3fb77aa04141328b2efe83c58c0430fce0cdf7 + checksum: 10c0/7a6676a8bade1683d23c3187b92d571528eeadf9f3d6776b4ef1bd27789d2ee7594a9aa7ca05394d8e11c931c8c8f224d85b2b5059a5613cb79b04b8d46a291e languageName: node linkType: hard -"i18next@npm:^21.2.0": - version: 21.10.0 - resolution: "i18next@npm:21.10.0" +"i18next@npm:^23.5.1 || ^24.2.0": + version: 24.2.3 + resolution: "i18next@npm:24.2.3" dependencies: - "@babel/runtime": "npm:^7.17.2" - checksum: 10c0/2a674739aab219704d5a0bf62d03bed20ad2bceff9579efb4da61c4946c883fc172062ba7405a26bf795995860f2ab15826b05271f4c457bf7eb19e852f6006d + "@babel/runtime": "npm:^7.26.10" + peerDependencies: + typescript: ^5 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/7ac11a67d618ec714beef303aa497c1249bf5f1977dd3ebe9ca2673dfa6cadbba9e2d39ec1337688903ae3866ce9c1bc22cd6b265e66cce54c5db3a9bbedd390 languageName: node linkType: hard @@ -13851,7 +15319,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": +"import-fresh@npm:^3.3.0": version: 3.3.1 resolution: "import-fresh@npm:3.3.1" dependencies: @@ -13868,7 +15336,7 @@ __metadata: languageName: node linkType: hard -"import-local@npm:^3.0.2": +"import-local@npm:^3.2.0": version: 3.2.0 resolution: "import-local@npm:3.2.0" dependencies: @@ -13880,6 +15348,13 @@ __metadata: languageName: node linkType: hard +"import-meta-resolve@npm:^4.2.0": + version: 4.2.0 + resolution: "import-meta-resolve@npm:4.2.0" + checksum: 10c0/3ee8aeecb61d19b49d2703987f977e9d1c7d4ba47db615a570eaa02fe414f40dfa63f7b953e842cbe8470d26df6371332bfcf21b2fd92b0112f9fea80dde2c4c + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -13939,10 +15414,10 @@ __metadata: languageName: node linkType: hard -"ini@npm:^4.1.3": - version: 4.1.3 - resolution: "ini@npm:4.1.3" - checksum: 10c0/0d27eff094d5f3899dd7c00d0c04ea733ca03a8eb6f9406ce15daac1a81de022cb417d6eaff7e4342451ffa663389c565ffc68d6825eaf686bf003280b945764 +"ini@npm:^6.0.0": + version: 6.0.0 + resolution: "ini@npm:6.0.0" + checksum: 10c0/9a7f55f306e2b25b41ae67c8b526e8f4673f057b70852b9025816ef4f15f07bf1ba35ed68ea4471ff7b31718f7ef1bc50d709f8d03cb012e10a3135eb99c7206 languageName: node linkType: hard @@ -14001,16 +15476,6 @@ __metadata: languageName: node linkType: hard -"is-absolute@npm:^1.0.0": - version: 1.0.0 - resolution: "is-absolute@npm:1.0.0" - dependencies: - is-relative: "npm:^1.0.0" - is-windows: "npm:^1.0.1" - checksum: 10c0/422302ce879d4f3ca6848499b6f3ddcc8fd2dc9f3e9cad3f6bcedff58cdfbbbd7f4c28600fffa7c59a858f1b15c27fb6cfe1d5275e58a36d2bf098a44ef5abc4 - languageName: node - linkType: hard - "is-alphabetical@npm:^2.0.0": version: 2.0.1 resolution: "is-alphabetical@npm:2.0.1" @@ -14097,19 +15562,12 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^1.1.5": - version: 1.1.6 - resolution: "is-buffer@npm:1.1.6" - checksum: 10c0/ae18aa0b6e113d6c490ad1db5e8df9bdb57758382b313f5a22c9c61084875c6396d50bbf49315f5b1926d142d74dfb8d31b40d993a383e0a158b15fea7a82234 - languageName: node - linkType: hard - -"is-bun-module@npm:^1.0.2": - version: 1.3.0 - resolution: "is-bun-module@npm:1.3.0" +"is-bun-module@npm:^2.0.0": + version: 2.0.0 + resolution: "is-bun-module@npm:2.0.0" dependencies: - semver: "npm:^7.6.3" - checksum: 10c0/2966744188fcd28e0123c52158c7073973f88babfa9ab04e2846ec5862d6b0f8f398df6413429d930f7c5ee6111ce2cbfb3eb8652d9ec42d4a37dc5089a866fb + semver: "npm:^7.7.1" + checksum: 10c0/7d27a0679cfa5be1f5052650391f9b11040cd70c48d45112e312c56bc6b6ca9c9aea70dcce6cc40b1e8947bfff8567a5c5715d3b066fb478522dab46ea379240 languageName: node linkType: hard @@ -14131,7 +15589,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.16.0, is-core-module@npm:^2.16.1": +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.16.1": version: 2.16.2 resolution: "is-core-module@npm:2.16.2" dependencies: @@ -14193,7 +15651,7 @@ __metadata: languageName: node linkType: hard -"is-extglob@npm:^2.1.0, is-extglob@npm:^2.1.1": +"is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 @@ -14216,14 +15674,7 @@ __metadata: languageName: node linkType: hard -"is-fullwidth-code-point@npm:^4.0.0": - version: 4.0.0 - resolution: "is-fullwidth-code-point@npm:4.0.0" - checksum: 10c0/df2a717e813567db0f659c306d61f2f804d480752526886954a2a3e2246c7745fd07a52b5fecf2b68caf0a6c79dcdace6166fdf29cc76ed9975cc334f0a018b8 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^5.0.0": +"is-fullwidth-code-point@npm:^5.0.0, is-fullwidth-code-point@npm:^5.1.0": version: 5.1.0 resolution: "is-fullwidth-code-point@npm:5.1.0" dependencies: @@ -14232,7 +15683,7 @@ __metadata: languageName: node linkType: hard -"is-generator-fn@npm:^2.0.0": +"is-generator-fn@npm:^2.1.0": version: 2.1.0 resolution: "is-generator-fn@npm:2.1.0" checksum: 10c0/2957cab387997a466cd0bf5c1b6047bd21ecb32bdcfd8996b15747aa01002c1c88731802f1b3d34ac99f4f6874b626418bd118658cf39380fe5fff32a3af9c4d @@ -14251,15 +15702,6 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^3.1.0": - version: 3.1.0 - resolution: "is-glob@npm:3.1.0" - dependencies: - is-extglob: "npm:^2.1.0" - checksum: 10c0/ba816a35dcf5285de924a8a4654df7b183a86381d73ea3bbf3df3cc61b3ba61fdddf90ee205709a2235b210ee600ee86e5e8600093cf291a662607fd032e2ff4 - languageName: node - linkType: hard - "is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" @@ -14311,13 +15753,6 @@ __metadata: languageName: node linkType: hard -"is-lambda@npm:^1.0.1": - version: 1.0.1 - resolution: "is-lambda@npm:1.0.1" - checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d - languageName: node - linkType: hard - "is-map@npm:^2.0.3": version: 2.0.3 resolution: "is-map@npm:2.0.3" @@ -14346,13 +15781,6 @@ __metadata: languageName: node linkType: hard -"is-node-process@npm:^1.2.0": - version: 1.2.0 - resolution: "is-node-process@npm:1.2.0" - checksum: 10c0/5b24fda6776d00e42431d7bcd86bce81cb0b6cabeb944142fe7b077a54ada2e155066ad06dbe790abdb397884bdc3151e04a9707b8cd185099efbc79780573ed - languageName: node - linkType: hard - "is-npm@npm:^6.0.0": version: 6.0.0 resolution: "is-npm@npm:6.0.0" @@ -14405,13 +15833,6 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:^2.0.0": - version: 2.1.0 - resolution: "is-plain-obj@npm:2.1.0" - checksum: 10c0/e5c9814cdaa627a9ad0a0964ded0e0491bfd9ace405c49a5d63c88b30a162f1512c069d5b80997893c4d0181eadc3fed02b4ab4b81059aba5620bfcdfdeb9c53 - languageName: node - linkType: hard - "is-plain-obj@npm:^3.0.0": version: 3.0.0 resolution: "is-plain-obj@npm:3.0.0" @@ -14475,15 +15896,6 @@ __metadata: languageName: node linkType: hard -"is-relative@npm:^1.0.0": - version: 1.0.0 - resolution: "is-relative@npm:1.0.0" - dependencies: - is-unc-path: "npm:^1.0.0" - checksum: 10c0/61157c4be8594dd25ac6f0ef29b1218c36667259ea26698367a4d9f39ff9018368bc365c490b3c79be92dfb1e389e43c4b865c95709e7b3bc72c5932f751fb60 - languageName: node - linkType: hard - "is-retry-allowed@npm:^3.0.0": version: 3.0.0 resolution: "is-retry-allowed@npm:3.0.0" @@ -14514,13 +15926,6 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "is-stream@npm:3.0.0" - checksum: 10c0/eb2f7127af02ee9aa2a0237b730e47ac2de0d4e76a4a905a50a11557f2339df5765eaea4ceb8029f1efa978586abe776908720bfcb1900c20c6ec5145f6f29d8 - languageName: node - linkType: hard - "is-stream@npm:^4.0.1": version: 4.0.1 resolution: "is-stream@npm:4.0.1" @@ -14565,15 +15970,6 @@ __metadata: languageName: node linkType: hard -"is-unc-path@npm:^1.0.0": - version: 1.0.0 - resolution: "is-unc-path@npm:1.0.0" - dependencies: - unc-path-regex: "npm:^0.1.2" - checksum: 10c0/ac1b78f9b748196e3be3d0e722cd4b0f98639247a130a8f2473a58b29baf63fdb1b1c5a12c830660c5ee6ef0279c5418ca8e346f98cbe1a29e433d7ae531d42e - languageName: node - linkType: hard - "is-unicode-supported@npm:^1.3.0": version: 1.3.0 resolution: "is-unicode-supported@npm:1.3.0" @@ -14588,13 +15984,6 @@ __metadata: languageName: node linkType: hard -"is-utf8@npm:^0.2.1": - version: 0.2.1 - resolution: "is-utf8@npm:0.2.1" - checksum: 10c0/3ed45e5b4ddfa04ed7e32c63d29c61b980ecd6df74698f45978b8c17a54034943bcbffb6ae243202e799682a66f90fef526f465dd39438745e9fe70794c1ef09 - languageName: node - linkType: hard - "is-valid-glob@npm:^1.0.0": version: 1.0.0 resolution: "is-valid-glob@npm:1.0.0" @@ -14628,13 +16017,6 @@ __metadata: languageName: node linkType: hard -"is-windows@npm:^1.0.1": - version: 1.0.2 - resolution: "is-windows@npm:1.0.2" - checksum: 10c0/b32f418ab3385604a66f1b7a3ce39d25e8881dee0bd30816dc8344ef6ff9df473a732bcc1ec4e84fe99b2f229ae474f7133e8e93f9241686cfcf7eebe53ba7a5 - languageName: node - linkType: hard - "is-wsl@npm:^2.2.0": version: 2.2.0 resolution: "is-wsl@npm:2.2.0" @@ -14695,6 +16077,13 @@ __metadata: languageName: node linkType: hard +"isexe@npm:^4.0.0": + version: 4.0.0 + resolution: "isexe@npm:4.0.0" + checksum: 10c0/5884815115bceac452877659a9c7726382531592f43dc29e5d48b7c4100661aed54018cb90bd36cb2eaeba521092570769167acbb95c18d39afdccbcca06c5ce + languageName: node + linkType: hard + "isobject@npm:^3.0.1": version: 3.0.1 resolution: "isobject@npm:3.0.1" @@ -14719,20 +16108,7 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-instrument@npm:^5.0.4": - version: 5.2.1 - resolution: "istanbul-lib-instrument@npm:5.2.1" - dependencies: - "@babel/core": "npm:^7.12.3" - "@babel/parser": "npm:^7.14.7" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-coverage: "npm:^3.2.0" - semver: "npm:^6.3.0" - checksum: 10c0/8a1bdf3e377dcc0d33ec32fe2b6ecacdb1e4358fd0eb923d4326bb11c67622c0ceb99600a680f3dad5d29c66fc1991306081e339b4d43d0b8a2ab2e1d910a6ee - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^6.0.0": +"istanbul-lib-instrument@npm:^6.0.0, istanbul-lib-instrument@npm:^6.0.2": version: 6.0.3 resolution: "istanbul-lib-instrument@npm:6.0.3" dependencies: @@ -14756,14 +16132,14 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-source-maps@npm:^4.0.0": - version: 4.0.1 - resolution: "istanbul-lib-source-maps@npm:4.0.1" +"istanbul-lib-source-maps@npm:^5.0.0": + version: 5.0.6 + resolution: "istanbul-lib-source-maps@npm:5.0.6" dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.23" debug: "npm:^4.1.1" istanbul-lib-coverage: "npm:^3.0.0" - source-map: "npm:^0.6.1" - checksum: 10c0/19e4cc405016f2c906dff271a76715b3e881fa9faeb3f09a86cb99b8512b3a5ed19cadfe0b54c17ca0e54c1142c9c6de9330d65506e35873994e06634eebeb66 + checksum: 10c0/ffe75d70b303a3621ee4671554f306e0831b16f39ab7f4ab52e54d356a5d33e534d97563e318f1333a6aae1d42f91ec49c76b6cd3f3fb378addcb5c81da0255f languageName: node linkType: hard @@ -14804,15 +16180,6 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^4.1.1": - version: 4.1.1 - resolution: "jackspeak@npm:4.1.1" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - checksum: 10c0/84ec4f8e21d6514db24737d9caf65361511f75e5e424980eebca4199f400874f45e562ac20fa8aeb1dd20ca2f3f81f0788b6e9c3e64d216a5794fd6f30e0e042 - languageName: node - linkType: hard - "jest-canvas-mock@npm:2.5.2": version: 2.5.2 resolution: "jest-canvas-mock@npm:2.5.2" @@ -14823,175 +16190,174 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-changed-files@npm:29.7.0" +"jest-changed-files@npm:30.4.1": + version: 30.4.1 + resolution: "jest-changed-files@npm:30.4.1" dependencies: - execa: "npm:^5.0.0" - jest-util: "npm:^29.7.0" + execa: "npm:^5.1.1" + jest-util: "npm:30.4.1" p-limit: "npm:^3.1.0" - checksum: 10c0/e071384d9e2f6bb462231ac53f29bff86f0e12394c1b49ccafbad225ce2ab7da226279a8a94f421949920bef9be7ef574fd86aee22e8adfa149be73554ab828b + checksum: 10c0/324bbec3920a7d9ceb1d11872b9f1befe73d152a7ef289243f663bf3b22afe124c2c656ec316e44393f30a83b74a1738b56307a066906fa49b800686fd4d0f04 languageName: node linkType: hard -"jest-circus@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-circus@npm:29.7.0" +"jest-circus@npm:30.4.2": + version: 30.4.2 + resolution: "jest-circus@npm:30.4.2" dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/expect": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" + "@jest/environment": "npm:30.4.1" + "@jest/expect": "npm:30.4.1" + "@jest/test-result": "npm:30.4.1" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - chalk: "npm:^4.0.0" + chalk: "npm:^4.1.2" co: "npm:^4.6.0" - dedent: "npm:^1.0.0" - is-generator-fn: "npm:^2.0.0" - jest-each: "npm:^29.7.0" - jest-matcher-utils: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-runtime: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - jest-util: "npm:^29.7.0" + dedent: "npm:^1.6.0" + is-generator-fn: "npm:^2.1.0" + jest-each: "npm:30.4.1" + jest-matcher-utils: "npm:30.4.1" + jest-message-util: "npm:30.4.1" + jest-runtime: "npm:30.4.2" + jest-snapshot: "npm:30.4.1" + jest-util: "npm:30.4.1" p-limit: "npm:^3.1.0" - pretty-format: "npm:^29.7.0" - pure-rand: "npm:^6.0.0" + pretty-format: "npm:30.4.1" + pure-rand: "npm:^7.0.0" slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10c0/8d15344cf7a9f14e926f0deed64ed190c7a4fa1ed1acfcd81e4cc094d3cc5bf7902ebb7b874edc98ada4185688f90c91e1747e0dfd7ac12463b097968ae74b5e + stack-utils: "npm:^2.0.6" + checksum: 10c0/5d99f1336eb249057063a007fabad4ced802501fbaad7ddeea8db9553fa54fbd44d26e71e8bf61a0979d42b3b93a3d920e6f00afa26cdbb70d1e7d0969515d10 languageName: node linkType: hard -"jest-cli@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-cli@npm:29.7.0" +"jest-cli@npm:30.4.2": + version: 30.4.2 + resolution: "jest-cli@npm:30.4.2" dependencies: - "@jest/core": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - chalk: "npm:^4.0.0" - create-jest: "npm:^29.7.0" - exit: "npm:^0.1.2" - import-local: "npm:^3.0.2" - jest-config: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - yargs: "npm:^17.3.1" + "@jest/core": "npm:30.4.2" + "@jest/test-result": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + chalk: "npm:^4.1.2" + exit-x: "npm:^0.2.2" + import-local: "npm:^3.2.0" + jest-config: "npm:30.4.2" + jest-util: "npm:30.4.1" + jest-validate: "npm:30.4.1" + yargs: "npm:^17.7.2" peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true bin: - jest: bin/jest.js - checksum: 10c0/a658fd55050d4075d65c1066364595962ead7661711495cfa1dfeecf3d6d0a8ffec532f3dbd8afbb3e172dd5fd2fb2e813c5e10256e7cf2fea766314942fb43a + jest: ./bin/jest.js + checksum: 10c0/a036a1bf06ce7d5fed644a518c4a4ccf60c5fe5f3d96d143973048e6690c4a28a4f97fa3275d90ca236430a1b2a7c10544e7e190a4f2edfdf0a4e6daf1f6a384 languageName: node linkType: hard -"jest-config@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-config@npm:29.7.0" +"jest-config@npm:30.4.2": + version: 30.4.2 + resolution: "jest-config@npm:30.4.2" dependencies: - "@babel/core": "npm:^7.11.6" - "@jest/test-sequencer": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - babel-jest: "npm:^29.7.0" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - deepmerge: "npm:^4.2.2" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - jest-circus: "npm:^29.7.0" - jest-environment-node: "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - jest-regex-util: "npm:^29.6.3" - jest-resolve: "npm:^29.7.0" - jest-runner: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - micromatch: "npm:^4.0.4" + "@babel/core": "npm:^7.27.4" + "@jest/get-type": "npm:30.1.0" + "@jest/pattern": "npm:30.4.0" + "@jest/test-sequencer": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + babel-jest: "npm:30.4.1" + chalk: "npm:^4.1.2" + ci-info: "npm:^4.2.0" + deepmerge: "npm:^4.3.1" + glob: "npm:^10.5.0" + graceful-fs: "npm:^4.2.11" + jest-circus: "npm:30.4.2" + jest-docblock: "npm:30.4.0" + jest-environment-node: "npm:30.4.1" + jest-regex-util: "npm:30.4.0" + jest-resolve: "npm:30.4.1" + jest-runner: "npm:30.4.2" + jest-util: "npm:30.4.1" + jest-validate: "npm:30.4.1" parse-json: "npm:^5.2.0" - pretty-format: "npm:^29.7.0" + pretty-format: "npm:30.4.1" slash: "npm:^3.0.0" strip-json-comments: "npm:^3.1.1" peerDependencies: "@types/node": "*" + esbuild-register: ">=3.4.0" ts-node: ">=9.0.0" peerDependenciesMeta: "@types/node": optional: true + esbuild-register: + optional: true ts-node: optional: true - checksum: 10c0/bab23c2eda1fff06e0d104b00d6adfb1d1aabb7128441899c9bff2247bd26710b050a5364281ce8d52b46b499153bf7e3ee88b19831a8f3451f1477a0246a0f1 + checksum: 10c0/18300b1dc54a4bfb5d1db6c10aeb01b6c64736224e3f60d119da9504d49cbab5a76d789f38c44af7d168418463356db6843ad7e44f249c63ce7f409758eba0c6 languageName: node linkType: hard -"jest-diff@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-diff@npm:29.7.0" +"jest-diff@npm:30.4.1": + version: 30.4.1 + resolution: "jest-diff@npm:30.4.1" dependencies: - chalk: "npm:^4.0.0" - diff-sequences: "npm:^29.6.3" - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10c0/89a4a7f182590f56f526443dde69acefb1f2f0c9e59253c61d319569856c4931eae66b8a3790c443f529267a0ddba5ba80431c585deed81827032b2b2a1fc999 + "@jest/diff-sequences": "npm:30.4.0" + "@jest/get-type": "npm:30.1.0" + chalk: "npm:^4.1.2" + pretty-format: "npm:30.4.1" + checksum: 10c0/787e11f0ea27e94815479d6c5415e4173da1e74bede34c1515b8515fc9d1fe053e2ad25a3c31f9998a7292c186a0e4d395ed82e0e149d57d7708ee6759b442e9 languageName: node linkType: hard -"jest-docblock@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-docblock@npm:29.7.0" +"jest-docblock@npm:30.4.0": + version: 30.4.0 + resolution: "jest-docblock@npm:30.4.0" dependencies: - detect-newline: "npm:^3.0.0" - checksum: 10c0/d932a8272345cf6b6142bb70a2bb63e0856cc0093f082821577ea5bdf4643916a98744dfc992189d2b1417c38a11fa42466f6111526bc1fb81366f56410f3be9 + detect-newline: "npm:^3.1.0" + checksum: 10c0/1fe1c971207e1b905e4f23d98e508a03ae631337e9ffa347ff2f6df81a1d75ced7ed3e52a809fad75fb8a8cd55b6bda4483bc124e5e1d7529eeb4ef76b29e913 languageName: node linkType: hard -"jest-each@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-each@npm:29.7.0" +"jest-each@npm:30.4.1": + version: 30.4.1 + resolution: "jest-each@npm:30.4.1" dependencies: - "@jest/types": "npm:^29.6.3" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.6.3" - jest-util: "npm:^29.7.0" - pretty-format: "npm:^29.7.0" - checksum: 10c0/f7f9a90ebee80cc688e825feceb2613627826ac41ea76a366fa58e669c3b2403d364c7c0a74d862d469b103c843154f8456d3b1c02b487509a12afa8b59edbb4 + "@jest/get-type": "npm:30.1.0" + "@jest/types": "npm:30.4.1" + chalk: "npm:^4.1.2" + jest-util: "npm:30.4.1" + pretty-format: "npm:30.4.1" + checksum: 10c0/41bc1cec23901cb0c7d8f547a70574fffca8cc16a1660ed97645bf3b61f4e6151aaa58bb14ce55a3cd9f5a63a2cc782a39366caf3304a2159d1e3cc5ae79a9e4 languageName: node linkType: hard -"jest-environment-jsdom@npm:29.7.0": - version: 29.7.0 - resolution: "jest-environment-jsdom@npm:29.7.0" +"jest-environment-jsdom@npm:30.4.1": + version: 30.4.1 + resolution: "jest-environment-jsdom@npm:30.4.1" dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/fake-timers": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - "@types/jsdom": "npm:^20.0.0" - "@types/node": "npm:*" - jest-mock: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jsdom: "npm:^20.0.0" + "@jest/environment": "npm:30.4.1" + "@jest/environment-jsdom-abstract": "npm:30.4.1" + jsdom: "npm:^26.1.0" peerDependencies: - canvas: ^2.5.0 + canvas: ^3.0.0 peerDependenciesMeta: canvas: optional: true - checksum: 10c0/139b94e2c8ec1bb5a46ce17df5211da65ce867354b3fd4e00fa6a0d1da95902df4cf7881273fc6ea937e5c325d39d6773f0d41b6c469363334de9d489d2c321f + checksum: 10c0/fec7ab60f4072c3495c5c05d272c578573df184feabf8da1bd210ad9af957166e2ded215727e516f856437f1403b2a0ad3f3efe0c2a92225bbf4197e24d7cea1 languageName: node linkType: hard -"jest-environment-node@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-environment-node@npm:29.7.0" +"jest-environment-node@npm:30.4.1": + version: 30.4.1 + resolution: "jest-environment-node@npm:30.4.1" dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/fake-timers": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" + "@jest/environment": "npm:30.4.1" + "@jest/fake-timers": "npm:30.4.1" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - jest-mock: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - checksum: 10c0/61f04fec077f8b1b5c1a633e3612fc0c9aa79a0ab7b05600683428f1e01a4d35346c474bde6f439f9fcc1a4aa9a2861ff852d079a43ab64b02105d1004b2592b + jest-mock: "npm:30.4.1" + jest-util: "npm:30.4.1" + jest-validate: "npm:30.4.1" + checksum: 10c0/d8d6bb22bfd280f077b5856558d9d7112c48fd3bae6eda9b76694f1c8e1be783a725686a137437d180c9d49e6b37386c8e342e0b8e5bfcb6526dee9c10cc31ec languageName: node linkType: hard @@ -15004,43 +16370,35 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-get-type@npm:29.6.3" - checksum: 10c0/552e7a97a983d3c2d4e412a44eb7de0430ff773dd99f7500962c268d6dfbfa431d7d08f919c9d960530e5f7f78eb47f267ad9b318265e5092b3ff9ede0db7c2b - languageName: node - linkType: hard - -"jest-haste-map@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-haste-map@npm:29.7.0" +"jest-haste-map@npm:30.4.1": + version: 30.4.1 + resolution: "jest-haste-map@npm:30.4.1" dependencies: - "@jest/types": "npm:^29.6.3" - "@types/graceful-fs": "npm:^4.1.3" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - anymatch: "npm:^3.0.3" - fb-watchman: "npm:^2.0.0" - fsevents: "npm:^2.3.2" - graceful-fs: "npm:^4.2.9" - jest-regex-util: "npm:^29.6.3" - jest-util: "npm:^29.7.0" - jest-worker: "npm:^29.7.0" - micromatch: "npm:^4.0.4" + anymatch: "npm:^3.1.3" + fb-watchman: "npm:^2.0.2" + fsevents: "npm:^2.3.3" + graceful-fs: "npm:^4.2.11" + jest-regex-util: "npm:30.4.0" + jest-util: "npm:30.4.1" + jest-worker: "npm:30.4.1" + picomatch: "npm:^4.0.3" walker: "npm:^1.0.8" dependenciesMeta: fsevents: optional: true - checksum: 10c0/2683a8f29793c75a4728787662972fedd9267704c8f7ef9d84f2beed9a977f1cf5e998c07b6f36ba5603f53cb010c911fe8cd0ac9886e073fe28ca66beefd30c + checksum: 10c0/1350c24952bbf31c86cb1ed4e2e5edd4766a93e2be8816c4648c05463d06cfae89f3c73732f9274fdb626fdfdfe6605ed6f259b6c21257df536a6379d4b9a5e7 languageName: node linkType: hard -"jest-leak-detector@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-leak-detector@npm:29.7.0" +"jest-leak-detector@npm:30.4.1": + version: 30.4.1 + resolution: "jest-leak-detector@npm:30.4.1" dependencies: - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10c0/71bb9f77fc489acb842a5c7be030f2b9acb18574dc9fb98b3100fc57d422b1abc55f08040884bd6e6dbf455047a62f7eaff12aa4058f7cbdc11558718ca6a395 + "@jest/get-type": "npm:30.1.0" + pretty-format: "npm:30.4.1" + checksum: 10c0/57256ac08f12186e3ed1687126b8d75a12de9c4ffa959ff41322e9ba5f93e3ed8af91dc36bc4d59f77cef6d4008bcf5a3e646cdd950743898576aec8dbae6778 languageName: node linkType: hard @@ -15051,47 +16409,48 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-matcher-utils@npm:29.7.0" +"jest-matcher-utils@npm:30.4.1": + version: 30.4.1 + resolution: "jest-matcher-utils@npm:30.4.1" dependencies: - chalk: "npm:^4.0.0" - jest-diff: "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10c0/0d0e70b28fa5c7d4dce701dc1f46ae0922102aadc24ed45d594dd9b7ae0a8a6ef8b216718d1ab79e451291217e05d4d49a82666e1a3cc2b428b75cd9c933244e + "@jest/get-type": "npm:30.1.0" + chalk: "npm:^4.1.2" + jest-diff: "npm:30.4.1" + pretty-format: "npm:30.4.1" + checksum: 10c0/ddbb0c7075def27ba30160883c327cb3fd13f561f5789d00a1edca1b48b0651f8ea23a1c51bcfcb6413a68c47d658bcf47a34701b8a39ce135dd28d87a3117af languageName: node linkType: hard -"jest-message-util@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-message-util@npm:29.7.0" +"jest-message-util@npm:30.4.1": + version: 30.4.1 + resolution: "jest-message-util@npm:30.4.1" dependencies: - "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^29.6.3" - "@types/stack-utils": "npm:^2.0.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.7.0" + "@babel/code-frame": "npm:^7.27.1" + "@jest/types": "npm:30.4.1" + "@types/stack-utils": "npm:^2.0.3" + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" + jest-util: "npm:30.4.1" + picomatch: "npm:^4.0.3" + pretty-format: "npm:30.4.1" slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10c0/850ae35477f59f3e6f27efac5215f706296e2104af39232bb14e5403e067992afb5c015e87a9243ec4d9df38525ef1ca663af9f2f4766aa116f127247008bd22 + stack-utils: "npm:^2.0.6" + checksum: 10c0/ae7427544e042bc1c14abf3c0dbe8b83d0dbec22a9a5efefaca5b8ccb6b9bf391abe732e6f2117ca995c6889bfe1be35c78cec75e5ea0a50e28cffe1ba6f9fdf languageName: node linkType: hard -"jest-mock@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-mock@npm:29.7.0" +"jest-mock@npm:30.4.1": + version: 30.4.1 + resolution: "jest-mock@npm:30.4.1" dependencies: - "@jest/types": "npm:^29.6.3" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - jest-util: "npm:^29.7.0" - checksum: 10c0/7b9f8349ee87695a309fe15c46a74ab04c853369e5c40952d68061d9dc3159a0f0ed73e215f81b07ee97a9faaf10aebe5877a9d6255068a0977eae6a9ff1d5ac + jest-util: "npm:30.4.1" + checksum: 10c0/5185a41255285c1634c5d85dda037afaaadfc12793b3293c9e253a30bb67449f8df968447f830abb9cf7a52e63694e6734680130e8085ce119056280890bf6fc languageName: node linkType: hard -"jest-pnp-resolver@npm:^1.2.2": +"jest-pnp-resolver@npm:^1.2.3": version: 1.2.3 resolution: "jest-pnp-resolver@npm:1.2.3" peerDependencies: @@ -15103,124 +16462,139 @@ __metadata: languageName: node linkType: hard -"jest-regex-util@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-regex-util@npm:29.6.3" - checksum: 10c0/4e33fb16c4f42111159cafe26397118dcfc4cf08bc178a67149fb05f45546a91928b820894572679d62559839d0992e21080a1527faad65daaae8743a5705a3b +"jest-regex-util@npm:30.4.0": + version: 30.4.0 + resolution: "jest-regex-util@npm:30.4.0" + checksum: 10c0/fe7426f67b54d38bed8e9d6e6a099d63d72f41f5bf65b922d9d03fedcb55c614b45657207632f6ee22d0a59d8d11327891f258d23f68a58912fcdb0f7db48435 languageName: node linkType: hard -"jest-resolve-dependencies@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve-dependencies@npm:29.7.0" +"jest-resolve-dependencies@npm:30.4.2": + version: 30.4.2 + resolution: "jest-resolve-dependencies@npm:30.4.2" dependencies: - jest-regex-util: "npm:^29.6.3" - jest-snapshot: "npm:^29.7.0" - checksum: 10c0/b6e9ad8ae5b6049474118ea6441dfddd385b6d1fc471db0136f7c8fbcfe97137a9665e4f837a9f49f15a29a1deb95a14439b7aec812f3f99d08f228464930f0d + jest-regex-util: "npm:30.4.0" + jest-snapshot: "npm:30.4.1" + checksum: 10c0/4101afabd2a4ef4e6c82bf82ea145286c1238373f7611938e8d47ddcf5aaa6e10af365436a934b7af194451e351774829cb021ac73f857b4873dcccc7aabb616 languageName: node linkType: hard -"jest-resolve@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve@npm:29.7.0" +"jest-resolve@npm:30.4.1": + version: 30.4.1 + resolution: "jest-resolve@npm:30.4.1" dependencies: - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" - jest-pnp-resolver: "npm:^1.2.2" - jest-util: "npm:^29.7.0" - jest-validate: "npm:^29.7.0" - resolve: "npm:^1.20.0" - resolve.exports: "npm:^2.0.0" + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.4.1" + jest-pnp-resolver: "npm:^1.2.3" + jest-util: "npm:30.4.1" + jest-validate: "npm:30.4.1" slash: "npm:^3.0.0" - checksum: 10c0/59da5c9c5b50563e959a45e09e2eace783d7f9ac0b5dcc6375dea4c0db938d2ebda97124c8161310082760e8ebbeff9f6b177c15ca2f57fb424f637a5d2adb47 + unrs-resolver: "npm:^1.7.11" + checksum: 10c0/0a99ef4f4fd7b3678d58a5e1cf8f0b5ec1997cdba21f5d66a8b26353d57a226f8e6a5fffc450c8836e90ab0e20d5e7935d0dea939d9a9b6a08781b9a7413184c languageName: node linkType: hard -"jest-runner@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runner@npm:29.7.0" +"jest-runner@npm:30.4.2": + version: 30.4.2 + resolution: "jest-runner@npm:30.4.2" dependencies: - "@jest/console": "npm:^29.7.0" - "@jest/environment": "npm:^29.7.0" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" + "@jest/console": "npm:30.4.1" + "@jest/environment": "npm:30.4.1" + "@jest/test-result": "npm:30.4.1" + "@jest/transform": "npm:30.4.1" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - chalk: "npm:^4.0.0" + chalk: "npm:^4.1.2" emittery: "npm:^0.13.1" - graceful-fs: "npm:^4.2.9" - jest-docblock: "npm:^29.7.0" - jest-environment-node: "npm:^29.7.0" - jest-haste-map: "npm:^29.7.0" - jest-leak-detector: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-resolve: "npm:^29.7.0" - jest-runtime: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - jest-watcher: "npm:^29.7.0" - jest-worker: "npm:^29.7.0" + exit-x: "npm:^0.2.2" + graceful-fs: "npm:^4.2.11" + jest-docblock: "npm:30.4.0" + jest-environment-node: "npm:30.4.1" + jest-haste-map: "npm:30.4.1" + jest-leak-detector: "npm:30.4.1" + jest-message-util: "npm:30.4.1" + jest-resolve: "npm:30.4.1" + jest-runtime: "npm:30.4.2" + jest-util: "npm:30.4.1" + jest-watcher: "npm:30.4.1" + jest-worker: "npm:30.4.1" p-limit: "npm:^3.1.0" source-map-support: "npm:0.5.13" - checksum: 10c0/2194b4531068d939f14c8d3274fe5938b77fa73126aedf9c09ec9dec57d13f22c72a3b5af01ac04f5c1cf2e28d0ac0b4a54212a61b05f10b5d6b47f2a1097bb4 + checksum: 10c0/339e630fb1a7db52e208ed9f12f722122733fe9a450d9bd83c0fccc10fbc5142a8808f624c41ab1e25833af02f9c3eca85561554b75a5b3ad75b4a226f72c5cf languageName: node linkType: hard -"jest-runtime@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runtime@npm:29.7.0" - dependencies: - "@jest/environment": "npm:^29.7.0" - "@jest/fake-timers": "npm:^29.7.0" - "@jest/globals": "npm:^29.7.0" - "@jest/source-map": "npm:^29.6.3" - "@jest/test-result": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" +"jest-runtime@npm:30.4.2": + version: 30.4.2 + resolution: "jest-runtime@npm:30.4.2" + dependencies: + "@jest/environment": "npm:30.4.1" + "@jest/fake-timers": "npm:30.4.1" + "@jest/globals": "npm:30.4.1" + "@jest/source-map": "npm:30.0.1" + "@jest/test-result": "npm:30.4.1" + "@jest/transform": "npm:30.4.1" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - chalk: "npm:^4.0.0" - cjs-module-lexer: "npm:^1.0.0" - collect-v8-coverage: "npm:^1.0.0" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-mock: "npm:^29.7.0" - jest-regex-util: "npm:^29.6.3" - jest-resolve: "npm:^29.7.0" - jest-snapshot: "npm:^29.7.0" - jest-util: "npm:^29.7.0" + chalk: "npm:^4.1.2" + cjs-module-lexer: "npm:^2.1.0" + collect-v8-coverage: "npm:^1.0.2" + glob: "npm:^10.5.0" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.4.1" + jest-message-util: "npm:30.4.1" + jest-mock: "npm:30.4.1" + jest-regex-util: "npm:30.4.0" + jest-resolve: "npm:30.4.1" + jest-snapshot: "npm:30.4.1" + jest-util: "npm:30.4.1" slash: "npm:^3.0.0" strip-bom: "npm:^4.0.0" - checksum: 10c0/7cd89a1deda0bda7d0941835434e44f9d6b7bd50b5c5d9b0fc9a6c990b2d4d2cab59685ab3cb2850ed4cc37059f6de903af5a50565d7f7f1192a77d3fd6dd2a6 + checksum: 10c0/9fce55b0c78fbe47dc2c10a944e9513833fd43c14f292460ef5cdd91e375088bf35549336e66f69fc9d29bf4f410894e9a7eef0bf12a6f39d99174a5300c2c53 languageName: node linkType: hard -"jest-snapshot@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-snapshot@npm:29.7.0" - dependencies: - "@babel/core": "npm:^7.11.6" - "@babel/generator": "npm:^7.7.2" - "@babel/plugin-syntax-jsx": "npm:^7.7.2" - "@babel/plugin-syntax-typescript": "npm:^7.7.2" - "@babel/types": "npm:^7.3.3" - "@jest/expect-utils": "npm:^29.7.0" - "@jest/transform": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - babel-preset-current-node-syntax: "npm:^1.0.0" - chalk: "npm:^4.0.0" - expect: "npm:^29.7.0" - graceful-fs: "npm:^4.2.9" - jest-diff: "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - jest-matcher-utils: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - natural-compare: "npm:^1.4.0" - pretty-format: "npm:^29.7.0" - semver: "npm:^7.5.3" - checksum: 10c0/6e9003c94ec58172b4a62864a91c0146513207bedf4e0a06e1e2ac70a4484088a2683e3a0538d8ea913bcfd53dc54a9b98a98cdfa562e7fe1d1339aeae1da570 +"jest-snapshot@npm:30.4.1": + version: 30.4.1 + resolution: "jest-snapshot@npm:30.4.1" + dependencies: + "@babel/core": "npm:^7.27.4" + "@babel/generator": "npm:^7.27.5" + "@babel/plugin-syntax-jsx": "npm:^7.27.1" + "@babel/plugin-syntax-typescript": "npm:^7.27.1" + "@babel/types": "npm:^7.27.3" + "@jest/expect-utils": "npm:30.4.1" + "@jest/get-type": "npm:30.1.0" + "@jest/snapshot-utils": "npm:30.4.1" + "@jest/transform": "npm:30.4.1" + "@jest/types": "npm:30.4.1" + babel-preset-current-node-syntax: "npm:^1.2.0" + chalk: "npm:^4.1.2" + expect: "npm:30.4.1" + graceful-fs: "npm:^4.2.11" + jest-diff: "npm:30.4.1" + jest-matcher-utils: "npm:30.4.1" + jest-message-util: "npm:30.4.1" + jest-util: "npm:30.4.1" + pretty-format: "npm:30.4.1" + semver: "npm:^7.7.2" + synckit: "npm:^0.11.8" + checksum: 10c0/cebd70277b6f0d2606f22815480146cf1e37295ed69a1d16e260a99a2ab48db167857e2fb9a938923d22ac13203c83a5e31d7f066b58d87c6d42db58c914ff13 + languageName: node + linkType: hard + +"jest-util@npm:30.4.1": + version: 30.4.1 + resolution: "jest-util@npm:30.4.1" + dependencies: + "@jest/types": "npm:30.4.1" + "@types/node": "npm:*" + chalk: "npm:^4.1.2" + ci-info: "npm:^4.2.0" + graceful-fs: "npm:^4.2.11" + picomatch: "npm:^4.0.3" + checksum: 10c0/3efe1f25e5a172d04c6af8612d82867ab603b7c1bd8cb89073ff834679b44eba178793cf3af162cf5e25be13aa736ebd23a7826683acc85bddc5873f305b1f6e languageName: node linkType: hard @@ -15238,33 +16612,46 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-validate@npm:29.7.0" +"jest-validate@npm:30.4.1": + version: 30.4.1 + resolution: "jest-validate@npm:30.4.1" dependencies: - "@jest/types": "npm:^29.6.3" - camelcase: "npm:^6.2.0" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.6.3" + "@jest/get-type": "npm:30.1.0" + "@jest/types": "npm:30.4.1" + camelcase: "npm:^6.3.0" + chalk: "npm:^4.1.2" leven: "npm:^3.1.0" - pretty-format: "npm:^29.7.0" - checksum: 10c0/a20b930480c1ed68778c739f4739dce39423131bc070cd2505ddede762a5570a256212e9c2401b7ae9ba4d7b7c0803f03c5b8f1561c62348213aba18d9dbece2 + pretty-format: "npm:30.4.1" + checksum: 10c0/23e6677ee6d06476f368c8b6d442b4207e5fbe062e74c1da3eae9ed30a18605f4e8a14809fa9cc7f22a2d8446e8de91a512f59c278720db2ad61c77dc25ffefc languageName: node linkType: hard -"jest-watcher@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-watcher@npm:29.7.0" +"jest-watcher@npm:30.4.1": + version: 30.4.1 + resolution: "jest-watcher@npm:30.4.1" dependencies: - "@jest/test-result": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" + "@jest/test-result": "npm:30.4.1" + "@jest/types": "npm:30.4.1" "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" + ansi-escapes: "npm:^4.3.2" + chalk: "npm:^4.1.2" emittery: "npm:^0.13.1" - jest-util: "npm:^29.7.0" - string-length: "npm:^4.0.1" - checksum: 10c0/ec6c75030562fc8f8c727cb8f3b94e75d831fc718785abfc196e1f2a2ebc9a2e38744a15147170039628a853d77a3b695561ce850375ede3a4ee6037a2574567 + jest-util: "npm:30.4.1" + string-length: "npm:^4.0.2" + checksum: 10c0/a56e1714b7b0f9c620c5cee95a84a48b780093594cd188e365a24768f208714895a0deb784ee48e4eec7f1828bc00435ab3c39208d490c33be3786937e997c97 + languageName: node + linkType: hard + +"jest-worker@npm:30.4.1": + version: 30.4.1 + resolution: "jest-worker@npm:30.4.1" + dependencies: + "@types/node": "npm:*" + "@ungap/structured-clone": "npm:^1.3.0" + jest-util: "npm:30.4.1" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.1.1" + checksum: 10c0/3eb7ec7e928b82491e66ae6709e3a1eef3edad2bc351514a5d52037b997151989de6ce2912d6a5a3806ae3ae3bf6a1c36b1ad7bbc567d0790503fdb74576f140 languageName: node linkType: hard @@ -15279,7 +16666,7 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^29.4.3, jest-worker@npm:^29.7.0": +"jest-worker@npm:^29.4.3": version: 29.7.0 resolution: "jest-worker@npm:29.7.0" dependencies: @@ -15291,22 +16678,22 @@ __metadata: languageName: node linkType: hard -"jest@npm:29.7.0": - version: 29.7.0 - resolution: "jest@npm:29.7.0" +"jest@npm:30.4.2": + version: 30.4.2 + resolution: "jest@npm:30.4.2" dependencies: - "@jest/core": "npm:^29.7.0" - "@jest/types": "npm:^29.6.3" - import-local: "npm:^3.0.2" - jest-cli: "npm:^29.7.0" + "@jest/core": "npm:30.4.2" + "@jest/types": "npm:30.4.1" + import-local: "npm:^3.2.0" + jest-cli: "npm:30.4.2" peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true bin: - jest: bin/jest.js - checksum: 10c0/f40eb8171cf147c617cc6ada49d062fbb03b4da666cb8d39cdbfb739a7d75eea4c3ca150fb072d0d273dce0c753db4d0467d54906ad0293f59c54f9db4a09d8b + jest: ./bin/jest.js + checksum: 10c0/26a76eaabfc043abd8ee702b97f61ff968dde03412efdb4a69c22c99a5e4bf47788a3e45f75134aec1377a686a9d59d1e3bae85a816e409013475a80de1458ec languageName: node linkType: hard @@ -15355,6 +16742,13 @@ __metadata: languageName: node linkType: hard +"js-tokens@npm:^10.0.0": + version: 10.0.0 + resolution: "js-tokens@npm:10.0.0" + checksum: 10c0/a93498747812ba3e0c8626f95f75ab29319f2a13613a0de9e610700405760931624433a0de59eb7c27ff8836e526768fb20783861b86ef89be96676f2c996b64 + languageName: node + linkType: hard + "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -15362,25 +16756,14 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f - languageName: node - linkType: hard - -"js-yaml@npm:4.2.0, js-yaml@npm:^4.1.0": - version: 4.2.0 - resolution: "js-yaml@npm:4.2.0" +"js-yaml@npm:5.2.0": + version: 5.2.0 + resolution: "js-yaml@npm:5.2.0" dependencies: argparse: "npm:^2.0.1" bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/1916456c118746603b067d74bbcbb0445d9a1d5e474ad4ae775e7b20525bed902e01d9d97dd0c81fcd8d4f596162309d0eb057f4aa38f3e9647f14075e9dea45 + js-yaml: bin/js-yaml.mjs + checksum: 10c0/13d803a7fbaea594bd702e341b5f12a1c7c1d1650809d67544071132b2ae7140de2721e31fa6296c0f49ff398c8cccff47e646e7507bd9f4261e138192c9c0a1 languageName: node linkType: hard @@ -15396,6 +16779,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^4.1.0": + version: 4.2.0 + resolution: "js-yaml@npm:4.2.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/1916456c118746603b067d74bbcbb0445d9a1d5e474ad4ae775e7b20525bed902e01d9d97dd0c81fcd8d4f596162309d0eb057f4aa38f3e9647f14075e9dea45 + languageName: node + linkType: hard + "jsbi@npm:^4.3.0": version: 4.3.2 resolution: "jsbi@npm:4.3.2" @@ -15403,10 +16797,10 @@ __metadata: languageName: node linkType: hard -"jsdoc-type-pratt-parser@npm:~4.1.0": - version: 4.1.0 - resolution: "jsdoc-type-pratt-parser@npm:4.1.0" - checksum: 10c0/7700372d2e733a32f7ea0a1df9cec6752321a5345c11a91b2ab478a031a426e934f16d5c1f15c8566c7b2c10af9f27892a29c2c789039f595470e929a4aa60ea +"jsdoc-type-pratt-parser@npm:~7.2.0": + version: 7.2.0 + resolution: "jsdoc-type-pratt-parser@npm:7.2.0" + checksum: 10c0/efe7e87583adba264234d445b47c5bfdb98c81d5c8ce8ea4c5ebcf4e249cc152cf6ecb0ec3e040a7359f391899556858fc8a22f9deb2373885cdd8ee6e221b29 languageName: node linkType: hard @@ -15419,14 +16813,47 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:26.0.0": - version: 26.0.0 - resolution: "jsdom@npm:26.0.0" +"jsdom@npm:29.1.1": + version: 29.1.1 + resolution: "jsdom@npm:29.1.1" + dependencies: + "@asamuzakjp/css-color": "npm:^5.1.11" + "@asamuzakjp/dom-selector": "npm:^7.1.1" + "@bramus/specificity": "npm:^2.4.2" + "@csstools/css-syntax-patches-for-csstree": "npm:^1.1.3" + "@exodus/bytes": "npm:^1.15.0" + css-tree: "npm:^3.2.1" + data-urls: "npm:^7.0.0" + decimal.js: "npm:^10.6.0" + html-encoding-sniffer: "npm:^6.0.0" + is-potential-custom-element-name: "npm:^1.0.1" + lru-cache: "npm:^11.3.5" + parse5: "npm:^8.0.1" + saxes: "npm:^6.0.0" + symbol-tree: "npm:^3.2.4" + tough-cookie: "npm:^6.0.1" + undici: "npm:^7.25.0" + w3c-xmlserializer: "npm:^5.0.0" + webidl-conversions: "npm:^8.0.1" + whatwg-mimetype: "npm:^5.0.0" + whatwg-url: "npm:^16.0.1" + xml-name-validator: "npm:^5.0.0" + peerDependencies: + canvas: ^3.0.0 + peerDependenciesMeta: + canvas: + optional: true + checksum: 10c0/20e2174b09d9d06393cb48e1392b7a1cb7191d6656a6f7b3b8fbf9853b4ab0ef60b4a42c2c55f71b55ca5da50ffa75bcdc6986210963182e7993c6f9cd4f499b + languageName: node + linkType: hard + +"jsdom@npm:^26.1.0": + version: 26.1.0 + resolution: "jsdom@npm:26.1.0" dependencies: cssstyle: "npm:^4.2.1" data-urls: "npm:^5.0.0" - decimal.js: "npm:^10.4.3" - form-data: "npm:^4.0.1" + decimal.js: "npm:^10.5.0" html-encoding-sniffer: "npm:^4.0.0" http-proxy-agent: "npm:^7.0.2" https-proxy-agent: "npm:^7.0.6" @@ -15436,12 +16863,12 @@ __metadata: rrweb-cssom: "npm:^0.8.0" saxes: "npm:^6.0.0" symbol-tree: "npm:^3.2.4" - tough-cookie: "npm:^5.0.0" + tough-cookie: "npm:^5.1.1" w3c-xmlserializer: "npm:^5.0.0" webidl-conversions: "npm:^7.0.0" whatwg-encoding: "npm:^3.1.1" whatwg-mimetype: "npm:^4.0.0" - whatwg-url: "npm:^14.1.0" + whatwg-url: "npm:^14.1.1" ws: "npm:^8.18.0" xml-name-validator: "npm:^5.0.0" peerDependencies: @@ -15449,46 +16876,7 @@ __metadata: peerDependenciesMeta: canvas: optional: true - checksum: 10c0/e48725ba4027edcfc9bca5799eaec72c6561ecffe3675a8ff87fe9c3541ca4ff9f82b4eff5b3d9c527302da0d859b2f60e9364347a5d42b77f5c76c436c569dc - languageName: node - linkType: hard - -"jsdom@npm:^20.0.0": - version: 20.0.3 - resolution: "jsdom@npm:20.0.3" - dependencies: - abab: "npm:^2.0.6" - acorn: "npm:^8.8.1" - acorn-globals: "npm:^7.0.0" - cssom: "npm:^0.5.0" - cssstyle: "npm:^2.3.0" - data-urls: "npm:^3.0.2" - decimal.js: "npm:^10.4.2" - domexception: "npm:^4.0.0" - escodegen: "npm:^2.0.0" - form-data: "npm:^4.0.0" - html-encoding-sniffer: "npm:^3.0.0" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.1" - is-potential-custom-element-name: "npm:^1.0.1" - nwsapi: "npm:^2.2.2" - parse5: "npm:^7.1.1" - saxes: "npm:^6.0.0" - symbol-tree: "npm:^3.2.4" - tough-cookie: "npm:^4.1.2" - w3c-xmlserializer: "npm:^4.0.0" - webidl-conversions: "npm:^7.0.0" - whatwg-encoding: "npm:^2.0.0" - whatwg-mimetype: "npm:^3.0.0" - whatwg-url: "npm:^11.0.0" - ws: "npm:^8.11.0" - xml-name-validator: "npm:^4.0.0" - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - checksum: 10c0/b109073bb826a966db7828f46cb1d7371abecd30f182b143c52be5fe1ed84513bbbe995eb3d157241681fcd18331381e61e3dc004d4949f3a63bca02f6214902 + checksum: 10c0/5b14a5bc32ce077a06fb42d1ab95b1191afa5cbbce8859e3b96831c5143becbbcbf0511d4d4934e922d2901443ced2cdc3b734c1cf30b5f73b3e067ce457d0f4 languageName: node linkType: hard @@ -15522,10 +16910,10 @@ __metadata: languageName: node linkType: hard -"json-parse-even-better-errors@npm:^3.0.0": - version: 3.0.2 - resolution: "json-parse-even-better-errors@npm:3.0.2" - checksum: 10c0/147f12b005768abe9fab78d2521ce2b7e1381a118413d634a40e6d907d7d10f5e9a05e47141e96d6853af7cc36d2c834d0a014251be48791e037ff2f13d2b94b +"json-parse-even-better-errors@npm:^5.0.0": + version: 5.0.0 + resolution: "json-parse-even-better-errors@npm:5.0.0" + checksum: 10c0/9a33d120090a7637a2aa850acec610c011d7c6488c5184d7ffc0460ee0401057f3131a4dff70c6510900cf15a95ab99d3f0f2d959f59edfe6438d227e90bf5ca languageName: node linkType: hard @@ -15637,6 +17025,15 @@ __metadata: languageName: node linkType: hard +"keyv@npm:^5.6.0": + version: 5.6.0 + resolution: "keyv@npm:5.6.0" + dependencies: + "@keyv/serialize": "npm:^1.1.1" + checksum: 10c0/c3ea795b6e03593ca57c8f70928a69bad14c13389a7fb75649a115ff55615244b04d8902798d841c17f0bb4a8a8866c97133b543b93f151b440170bba09176db + languageName: node + linkType: hard + "kind-of@npm:^6.0.0, kind-of@npm:^6.0.2": version: 6.0.3 resolution: "kind-of@npm:6.0.3" @@ -15693,21 +17090,10 @@ __metadata: languageName: node linkType: hard -"lazystream@npm:^1.0.0": - version: 1.0.1 - resolution: "lazystream@npm:1.0.1" - dependencies: - readable-stream: "npm:^2.0.5" - checksum: 10c0/ea4e509a5226ecfcc303ba6782cc269be8867d372b9bcbd625c88955df1987ea1a20da4643bf9270336415a398d33531ebf0d5f0d393b9283dc7c98bfcbd7b69 - languageName: node - linkType: hard - -"lead@npm:^1.0.0": - version: 1.0.0 - resolution: "lead@npm:1.0.0" - dependencies: - flush-write-stream: "npm:^1.0.2" - checksum: 10c0/355fa4cce74a62cec9d4dc4520a8a6a3bd0472e88e070208a895aa1d144bd5f35a099e0f0d4938f4bc909b6a40fb64cc389e0ec32cc86471540e7a643ffe0519 +"lead@npm:^4.0.0": + version: 4.0.0 + resolution: "lead@npm:4.0.0" + checksum: 10c0/71d2509b3c921dc74c47561a3c7bf0b76ecb530af178c3e0f469f3bdf20940ca08bcb4f18bbcfde0619706c1e550d3ba67ea187407722304db8fd3bc13a4405d languageName: node linkType: hard @@ -15848,7 +17234,7 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:^3.1.1, lilconfig@npm:~3.1.3": +"lilconfig@npm:^3.1.1, lilconfig@npm:^3.1.3": version: 3.1.3 resolution: "lilconfig@npm:3.1.3" checksum: 10c0/f5604e7240c5c275743561442fbc5abf2a84ad94da0f5adc71d25e31fa8483048de3dcedcb7a44112a942fed305fd75841cdf6c9681c7f640c63f1049e9a5dcc @@ -15862,37 +17248,34 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:15.4.1": - version: 15.4.1 - resolution: "lint-staged@npm:15.4.1" +"lint-staged@npm:17.0.8": + version: 17.0.8 + resolution: "lint-staged@npm:17.0.8" dependencies: - chalk: "npm:~5.4.1" - commander: "npm:~12.1.0" - debug: "npm:~4.4.0" - execa: "npm:~8.0.1" - lilconfig: "npm:~3.1.3" - listr2: "npm:~8.2.5" - micromatch: "npm:~4.0.8" - pidtree: "npm:~0.6.0" - string-argv: "npm:~0.3.2" - yaml: "npm:~2.6.1" + listr2: "npm:^10.2.1" + picomatch: "npm:^4.0.4" + string-argv: "npm:^0.3.2" + tinyexec: "npm:^1.2.4" + yaml: "npm:^2.9.0" + dependenciesMeta: + yaml: + optional: true bin: lint-staged: bin/lint-staged.js - checksum: 10c0/1ba9ac047f644a36d476f5e139854ea7fef8bfa97b59d6f709ffca36d3d8b3b45b8c0dbcdeed9d9b9eacb36ca4abc8170d857761d8e0e748f85f1e155ef3e47d + checksum: 10c0/8f5692a6777de3e71b4a32a944ac3c756bb3f15a886f54d46d71d0a1694b3e3caf1b2ea207bdb20c9b730661e0aedd68b6c1d1c6ab5d5012be64e9cd820b7c87 languageName: node linkType: hard -"listr2@npm:~8.2.5": - version: 8.2.5 - resolution: "listr2@npm:8.2.5" +"listr2@npm:^10.2.1": + version: 10.2.2 + resolution: "listr2@npm:10.2.2" dependencies: - cli-truncate: "npm:^4.0.0" - colorette: "npm:^2.0.20" - eventemitter3: "npm:^5.0.1" + cli-truncate: "npm:^5.2.0" + eventemitter3: "npm:^5.0.4" log-update: "npm:^6.1.0" rfdc: "npm:^1.4.1" - wrap-ansi: "npm:^9.0.0" - checksum: 10c0/f5a9599514b00c27d7eb32d1117c83c61394b2a985ec20e542c798bf91cf42b19340215701522736f5b7b42f557e544afeadec47866e35e5d4f268f552729671 + wrap-ansi: "npm:^10.0.0" + checksum: 10c0/537f453fae217b8d33aa6b8edc49fbc981aa0e0d82e4e05d705bead086ff1e81d372435f1f3c473055dbbf91ff04dc044a90f9b60dba6cca4d22671b319f4d6a languageName: node linkType: hard @@ -15974,13 +17357,6 @@ __metadata: languageName: node linkType: hard -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - "lodash.uniq@npm:^4.5.0": version: 4.5.0 resolution: "lodash.uniq@npm:4.5.0" @@ -16052,6 +17428,13 @@ __metadata: languageName: node linkType: hard +"lowercase-keys@npm:^4.0.1": + version: 4.0.1 + resolution: "lowercase-keys@npm:4.0.1" + checksum: 10c0/07daec6b36c8be1824f463acfcc525b6ef6c198cc890724dda7918f3c68962172b70a82a07f22d244c8cfa1eefb225abde3f78ae93c05254f52141a9a718bd03 + languageName: node + linkType: hard + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0, lru-cache@npm:^10.4.3": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -16066,6 +17449,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1, lru-cache@npm:^11.3.5": + version: 11.5.1 + resolution: "lru-cache@npm:11.5.1" + checksum: 10c0/7b341cea79a8efe9c6a6f20c8757a77eca5b25d7ff983ccf4e11e547b81f6787824baa1c84705251dff84ab4ffac85717ac354b9d02e465f86a9f8b166409979 + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -16084,16 +17474,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:0.30.8": - version: 0.30.8 - resolution: "magic-string@npm:0.30.8" - dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - checksum: 10c0/51a1f06f678c082aceddfb5943de9b6bdb88f2ea1385a1c2adf116deb73dfcfa50df6c222901d691b529455222d4d68d0b28be5689ac6f69b3baa3462861f922 - languageName: node - linkType: hard - -"magic-string@npm:^0.30.21": +"magic-string@npm:^0.30.21, magic-string@npm:~0.30.8": version: 0.30.21 resolution: "magic-string@npm:0.30.21" dependencies: @@ -16111,26 +17492,6 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^13.0.0": - version: 13.0.1 - resolution: "make-fetch-happen@npm:13.0.1" - dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" - http-cache-semantics: "npm:^4.1.1" - is-lambda: "npm:^1.0.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - proc-log: "npm:^4.2.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^10.0.0" - checksum: 10c0/df5f4dbb6d98153b751bccf4dc4cc500de85a96a9331db9805596c46aa9f99d9555983954e6c1266d9f981ae37a9e4647f42b9a4bb5466f867f4012e582c9e7e - languageName: node - linkType: hard - "make-fetch-happen@npm:^14.0.3": version: 14.0.3 resolution: "make-fetch-happen@npm:14.0.3" @@ -16469,6 +17830,13 @@ __metadata: languageName: node linkType: hard +"mdn-data@npm:2.27.1": + version: 2.27.1 + resolution: "mdn-data@npm:2.27.1" + checksum: 10c0/eb8abf5d22e4d1e090346f5e81b67d23cef14c83940e445da5c44541ad874dc8fb9f6ca236e8258c3a489d9fb5884188a4d7d58773adb9089ac2c0b966796393 + languageName: node + linkType: hard + "media-typer@npm:0.3.0": version: 0.3.0 resolution: "media-typer@npm:0.3.0" @@ -17046,7 +18414,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.0, micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5, micromatch@npm:^4.0.8, micromatch@npm:~4.0.8": +"micromatch@npm:^4.0.0, micromatch@npm:^4.0.2, micromatch@npm:^4.0.5, micromatch@npm:^4.0.8": version: 4.0.8 resolution: "micromatch@npm:4.0.8" dependencies: @@ -17120,13 +18488,6 @@ __metadata: languageName: node linkType: hard -"mimic-fn@npm:^4.0.0": - version: 4.0.0 - resolution: "mimic-fn@npm:4.0.0" - checksum: 10c0/de9cc32be9996fd941e512248338e43407f63f6d497abe8441fa33447d922e927de54d4cc3c1a3c6d652857acd770389d5a3823f311a744132760ce2be15ccbf - languageName: node - linkType: hard - "mimic-function@npm:^5.0.0": version: 5.0.1 resolution: "mimic-function@npm:5.0.1" @@ -17183,7 +18544,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^10.0.1, minimatch@npm:^10.1.1, minimatch@npm:^10.2.2": +"minimatch@npm:^10.0.1, minimatch@npm:^10.2.2, minimatch@npm:^10.2.4": version: 10.2.5 resolution: "minimatch@npm:10.2.5" dependencies: @@ -17192,15 +18553,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^8.0.2": - version: 8.0.4 - resolution: "minimatch@npm:8.0.4" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/a0a394c356dd5b4cb7f821720841a82fa6f07c9c562c5b716909d1b6ec5e56a7e4c4b5029da26dd256b7d2b3a3f38cbf9ddd8680e887b9b5282b09c05501c1ca - languageName: node - linkType: hard - "minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" @@ -17226,21 +18578,6 @@ __metadata: languageName: node linkType: hard -"minipass-fetch@npm:^3.0.0": - version: 3.0.5 - resolution: "minipass-fetch@npm:3.0.5" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^7.0.3" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.1.2" - dependenciesMeta: - encoding: - optional: true - checksum: 10c0/9d702d57f556274286fdd97e406fc38a2f5c8d15e158b498d7393b1105974b21249289ec571fa2b51e038a4872bfc82710111cf75fae98c662f3d6f95e72152b - languageName: node - linkType: hard - "minipass-fetch@npm:^4.0.0": version: 4.0.1 resolution: "minipass-fetch@npm:4.0.1" @@ -17292,20 +18629,6 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^4.2.4": - version: 4.2.8 - resolution: "minipass@npm:4.2.8" - checksum: 10c0/4ea76b030d97079f4429d6e8a8affd90baf1b6a1898977c8ccce4701c5a2ba2792e033abc6709373f25c2c4d4d95440d9d5e9464b46b7b76ca44d2ce26d939ce - languageName: node - linkType: hard - -"minipass@npm:^5.0.0": - version: 5.0.0 - resolution: "minipass@npm:5.0.0" - checksum: 10c0/a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 - languageName: node - linkType: hard - "minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" @@ -17313,13 +18636,10 @@ __metadata: languageName: node linkType: hard -"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": - version: 2.1.2 - resolution: "minizlib@npm:2.1.2" - dependencies: - minipass: "npm:^3.0.0" - yallist: "npm:^4.0.0" - checksum: 10c0/64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 +"minipass@npm:^7.1.3": + version: 7.1.3 + resolution: "minipass@npm:7.1.3" + checksum: 10c0/539da88daca16533211ea5a9ee98dc62ff5742f531f54640dd34429e621955e91cc280a91a776026264b7f9f6735947629f920944e9c1558369e8bf22eb33fbb languageName: node linkType: hard @@ -17332,12 +18652,12 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^1.0.3": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" - bin: - mkdirp: bin/cmd.js - checksum: 10c0/46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf +"minizlib@npm:^3.1.0": + version: 3.1.0 + resolution: "minizlib@npm:3.1.0" + dependencies: + minipass: "npm:^7.1.2" + checksum: 10c0/5aad75ab0090b8266069c9aabe582c021ae53eb33c6c691054a13a45db3b4f91a7fb1bd79151e6b4e9e9a86727b522527c0a06ec7d45206b745d54cd3097bcec languageName: node linkType: hard @@ -17405,46 +18725,13 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.3": +"ms@npm:2.1.3, ms@npm:^2.1.1, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 languageName: node linkType: hard -"msw@npm:^2.10.4": - version: 2.12.7 - resolution: "msw@npm:2.12.7" - dependencies: - "@inquirer/confirm": "npm:^5.0.0" - "@mswjs/interceptors": "npm:^0.40.0" - "@open-draft/deferred-promise": "npm:^2.2.0" - "@types/statuses": "npm:^2.0.6" - cookie: "npm:^1.0.2" - graphql: "npm:^16.12.0" - headers-polyfill: "npm:^4.0.2" - is-node-process: "npm:^1.2.0" - outvariant: "npm:^1.4.3" - path-to-regexp: "npm:^6.3.0" - picocolors: "npm:^1.1.1" - rettime: "npm:^0.7.0" - statuses: "npm:^2.0.2" - strict-event-emitter: "npm:^0.5.1" - tough-cookie: "npm:^6.0.0" - type-fest: "npm:^5.2.0" - until-async: "npm:^3.0.2" - yargs: "npm:^17.7.2" - peerDependencies: - typescript: ">= 4.8.x" - peerDependenciesMeta: - typescript: - optional: true - bin: - msw: cli/index.js - checksum: 10c0/e9100fe87dce5411d29392bba88ed1813acc6278991a3068c328ec671e5eb52d1e8ee451ee401c554eab08e04b78b84fcdf2c78f761287c6b43e844e91ce18dd - languageName: node - linkType: hard - "multicast-dns@npm:^7.2.5": version: 7.2.5 resolution: "multicast-dns@npm:7.2.5" @@ -17457,13 +18744,6 @@ __metadata: languageName: node linkType: hard -"mute-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "mute-stream@npm:2.0.0" - checksum: 10c0/2cf48a2087175c60c8dcdbc619908b49c07f7adcfc37d29236b0c5c612d6204f789104c98cc44d38acab7b3c96f4a3ec2cfdc4934d0738d876dbefa2a12c69f4 - languageName: node - linkType: hard - "mv@npm:~2": version: 2.1.1 resolution: "mv@npm:2.1.1" @@ -17493,6 +18773,15 @@ __metadata: languageName: node linkType: hard +"napi-postinstall@npm:^0.3.4": + version: 0.3.4 + resolution: "napi-postinstall@npm:0.3.4" + bin: + napi-postinstall: lib/cli.js + checksum: 10c0/b33d64150828bdade3a5d07368a8b30da22ee393f8dd8432f1b9e5486867be21c84ec443dd875dd3ef3c7401a079a7ab7e2aa9d3538a889abbcd96495d5104fe + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -17516,13 +18805,6 @@ __metadata: languageName: node linkType: hard -"negotiator@npm:^0.6.3, negotiator@npm:~0.6.4": - version: 0.6.4 - resolution: "negotiator@npm:0.6.4" - checksum: 10c0/3e677139c7fb7628a6f36335bf11a885a62c21d5390204590a1a214a5631fcbe5ea74ef6a610b60afe84b4d975cbe0566a23f20ee17c77c73e74b80032108dea - languageName: node - linkType: hard - "negotiator@npm:^1.0.0": version: 1.0.0 resolution: "negotiator@npm:1.0.0" @@ -17530,6 +18812,13 @@ __metadata: languageName: node linkType: hard +"negotiator@npm:~0.6.4": + version: 0.6.4 + resolution: "negotiator@npm:0.6.4" + checksum: 10c0/3e677139c7fb7628a6f36335bf11a885a62c21d5390204590a1a214a5631fcbe5ea74ef6a610b60afe84b4d975cbe0566a23f20ee17c77c73e74b80032108dea + languageName: node + linkType: hard + "neo-async@npm:^2.6.2": version: 2.6.2 resolution: "neo-async@npm:2.6.2" @@ -17583,7 +18872,7 @@ __metadata: languageName: node linkType: hard -"node-domexception@npm:1.0.0, node-domexception@npm:^1.0.0": +"node-domexception@npm:^1.0.0": version: 1.0.0 resolution: "node-domexception@npm:1.0.0" checksum: 10c0/5e5d63cda29856402df9472335af4bb13875e1927ad3be861dc5ebde38917aecbf9ae337923777af52a48c426b70148815e890a5d72760f1b4d758cc671b1a2b @@ -17616,7 +18905,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^3.2.0, node-fetch@npm:^3.3.2": +"node-fetch@npm:^3.2.0": version: 3.3.2 resolution: "node-fetch@npm:3.3.2" dependencies: @@ -17627,23 +18916,23 @@ __metadata: languageName: node linkType: hard -"node-gyp@npm:^10.0.0": - version: 10.3.1 - resolution: "node-gyp@npm:10.3.1" +"node-gyp@npm:^12.1.0": + version: 12.4.0 + resolution: "node-gyp@npm:12.4.0" dependencies: env-paths: "npm:^2.2.0" exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^13.0.0" - nopt: "npm:^7.0.0" - proc-log: "npm:^4.1.0" + nopt: "npm:^9.0.0" + proc-log: "npm:^6.0.0" semver: "npm:^7.3.5" - tar: "npm:^6.2.1" - which: "npm:^4.0.0" + tar: "npm:^7.5.4" + tinyglobby: "npm:^0.2.12" + undici: "npm:^6.25.0" + which: "npm:^6.0.0" bin: node-gyp: bin/node-gyp.js - checksum: 10c0/87c3b50e1f6f5256b5d2879a8c064eefa53ed444bad2a20870be43bc189db7cbffe22c30af056046c6d904181d73881b1726fd391d2f6f79f89b991019f195ea + checksum: 10c0/9acb7c798e124275a6f9c1f7eb64b5abd6196bb885a3945fb44ee0dccf435514e88cdfb0f228ee7ff76ef25107c1f39ff37a067bf92fd00b9aff9234db29ff9e languageName: node linkType: hard @@ -17681,25 +18970,25 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^7.0.0": - version: 7.2.1 - resolution: "nopt@npm:7.2.1" +"nopt@npm:^8.0.0": + version: 8.1.0 + resolution: "nopt@npm:8.1.0" dependencies: - abbrev: "npm:^2.0.0" + abbrev: "npm:^3.0.0" bin: nopt: bin/nopt.js - checksum: 10c0/a069c7c736767121242037a22a788863accfa932ab285a1eb569eb8cd534b09d17206f68c37f096ae785647435e0c5a5a0a67b42ec743e481a455e5ae6a6df81 + checksum: 10c0/62e9ea70c7a3eb91d162d2c706b6606c041e4e7b547cbbb48f8b3695af457dd6479904d7ace600856bf923dd8d1ed0696f06195c8c20f02ac87c1da0e1d315ef languageName: node linkType: hard -"nopt@npm:^8.0.0": - version: 8.1.0 - resolution: "nopt@npm:8.1.0" +"nopt@npm:^9.0.0": + version: 9.0.0 + resolution: "nopt@npm:9.0.0" dependencies: - abbrev: "npm:^3.0.0" + abbrev: "npm:^4.0.0" bin: nopt: bin/nopt.js - checksum: 10c0/62e9ea70c7a3eb91d162d2c706b6606c041e4e7b547cbbb48f8b3695af457dd6479904d7ace600856bf923dd8d1ed0696f06195c8c20f02ac87c1da0e1d315ef + checksum: 10c0/1822eb6f9b020ef6f7a7516d7b64a8036e09666ea55ac40416c36e4b2b343122c3cff0e2f085675f53de1d2db99a2a89a60ccea1d120bcd6a5347bf6ceb4a7fd languageName: node linkType: hard @@ -17715,55 +19004,42 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^6.0.0": - version: 6.0.2 - resolution: "normalize-package-data@npm:6.0.2" - dependencies: - hosted-git-info: "npm:^7.0.0" - semver: "npm:^7.3.5" - validate-npm-package-license: "npm:^3.0.4" - checksum: 10c0/7e32174e7f5575ede6d3d449593247183880122b4967d4ae6edb28cea5769ca025defda54fc91ec0e3c972fdb5ab11f9284606ba278826171b264cb16a9311ef - languageName: node - linkType: hard - -"normalize-path@npm:^2.1.1": - version: 2.1.1 - resolution: "normalize-path@npm:2.1.1" - dependencies: - remove-trailing-separator: "npm:^1.0.1" - checksum: 10c0/db814326ff88057437233361b4c7e9cac7b54815b051b57f2d341ce89b1d8ec8cbd43e7fa95d7652b3b69ea8fcc294b89b8530d556a84d1bdace94229e1e9a8b - languageName: node - linkType: hard - -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": +"normalize-path@npm:3.0.0, normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 languageName: node linkType: hard -"normalize-url@npm:^8.0.0, normalize-url@npm:^8.0.1": +"normalize-url@npm:^8.0.0": version: 8.0.2 resolution: "normalize-url@npm:8.0.2" checksum: 10c0/1c62eee6ce184ad4a463ff2984ce5e440a5058c9dd7c5ef80c0a7696bbb1d3638534e266afb14ef9678dfa07fb6c980ef4cde990c80eeee55900c378b7970584 languageName: node linkType: hard -"now-and-later@npm:^2.0.0": - version: 2.0.1 - resolution: "now-and-later@npm:2.0.1" +"normalize-url@npm:^8.1.1": + version: 8.1.1 + resolution: "normalize-url@npm:8.1.1" + checksum: 10c0/1beb700ce42acb2288f39453cdf8001eead55bbf046d407936a40404af420b8c1c6be97a869884ae9e659d7b1c744e40e905c875ac9290644eec2e3e6fb0b370 + languageName: node + linkType: hard + +"now-and-later@npm:^3.0.0": + version: 3.0.0 + resolution: "now-and-later@npm:3.0.0" dependencies: - once: "npm:^1.3.2" - checksum: 10c0/a3b123b6a7378f300cf45b381efb69b7d085a4151dceeca8442e7e08aa50f6e44d15af114261dca201e19be85f9e25dd61ad74aab62ad3675210bfc60f1f19f5 + once: "npm:^1.4.0" + checksum: 10c0/9ed96bae9f4bf66c01704a59aa5b6a8aa26bd65445133a08a2b867470c1705ae746f7261e4676b2ae6fc9dce0dc778055b816218bdeb1efbf610e0c95a83711b languageName: node linkType: hard -"npm-install-checks@npm:^6.0.0": - version: 6.3.0 - resolution: "npm-install-checks@npm:6.3.0" +"npm-install-checks@npm:^8.0.0": + version: 8.0.0 + resolution: "npm-install-checks@npm:8.0.0" dependencies: semver: "npm:^7.1.1" - checksum: 10c0/b046ef1de9b40f5d3a9831ce198e1770140a1c3f253dae22eb7b06045191ef79f18f1dcc15a945c919b3c161426861a28050abd321bf439190185794783b6452 + checksum: 10c0/a979cbc8fceacedf91bf59c2883f46f3c56bd421869f6664cce66aa605af14f875041730e66f3d1c543d49bdb032cbb147cdb481a17c541780d016bc2df89141 languageName: node linkType: hard @@ -17774,27 +19050,34 @@ __metadata: languageName: node linkType: hard -"npm-package-arg@npm:^11.0.0": - version: 11.0.3 - resolution: "npm-package-arg@npm:11.0.3" +"npm-normalize-package-bin@npm:^5.0.0": + version: 5.0.0 + resolution: "npm-normalize-package-bin@npm:5.0.0" + checksum: 10c0/9cd875669354ce451779495a111dc1622bedf702f7ad8b36b05b4037a2c961356361cff49c1e2e77d90b80194dffd18fdb52f16bf64e00ccffe6129003a55248 + languageName: node + linkType: hard + +"npm-package-arg@npm:^13.0.0": + version: 13.0.2 + resolution: "npm-package-arg@npm:13.0.2" dependencies: - hosted-git-info: "npm:^7.0.0" - proc-log: "npm:^4.0.0" + hosted-git-info: "npm:^9.0.0" + proc-log: "npm:^6.0.0" semver: "npm:^7.3.5" - validate-npm-package-name: "npm:^5.0.0" - checksum: 10c0/e18333485e05c3a8774f4b5701ef74f4799533e650b70a68ca8dd697666c9a8d46932cb765fc593edce299521033bd4025a40323d5240cea8a393c784c0c285a + validate-npm-package-name: "npm:^7.0.0" + checksum: 10c0/bf4ecdbfac876250f17710c6d0fac014bb345555acc80ce3b9e685d828107f3682378a9c413278c2fe4e958f4aad261677769be9a2b7c3965ab219b5bb852197 languageName: node linkType: hard -"npm-pick-manifest@npm:^9.0.0": - version: 9.1.0 - resolution: "npm-pick-manifest@npm:9.1.0" +"npm-pick-manifest@npm:^11.0.1": + version: 11.0.3 + resolution: "npm-pick-manifest@npm:11.0.3" dependencies: - npm-install-checks: "npm:^6.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - npm-package-arg: "npm:^11.0.0" + npm-install-checks: "npm:^8.0.0" + npm-normalize-package-bin: "npm:^5.0.0" + npm-package-arg: "npm:^13.0.0" semver: "npm:^7.3.5" - checksum: 10c0/8765f4199755b381323da2bff2202b4b15b59f59dba0d1be3f2f793b591321cd19e1b5a686ef48d9753a6bd4868550da632541a45dfb61809d55664222d73e44 + checksum: 10c0/214a9966de69bbb1e3c4ade8f33e99fefa1bdc7cbef480e4d2dc3fa63104e05f94bd84b56814c13b20bf838398bfc72f39691cb5d06d7c17333fe0ee33fe3e71 languageName: node linkType: hard @@ -17828,15 +19111,6 @@ __metadata: languageName: node linkType: hard -"npm-run-path@npm:^5.1.0": - version: 5.3.0 - resolution: "npm-run-path@npm:5.3.0" - dependencies: - path-key: "npm:^4.0.0" - checksum: 10c0/124df74820c40c2eb9a8612a254ea1d557ddfab1581c3e751f825e3e366d9f00b0d76a3c94ecd8398e7f3eee193018622677e95816e8491f0797b21e30b2deba - languageName: node - linkType: hard - "npm-run-path@npm:^6.0.0": version: 6.0.0 resolution: "npm-run-path@npm:6.0.0" @@ -17882,10 +19156,10 @@ __metadata: languageName: node linkType: hard -"nwsapi@npm:^2.2.16, nwsapi@npm:^2.2.2": - version: 2.2.22 - resolution: "nwsapi@npm:2.2.22" - checksum: 10c0/b6a0e5ea6754aacfdfe551c8c0f1b374eaf94d48b0a4e7eac666f879ecbc1892ef1d7c457e9b02eefad3fa1323ea1faebcba533eeab6582e24c9c503411bf879 +"nwsapi@npm:^2.2.16": + version: 2.2.24 + resolution: "nwsapi@npm:2.2.24" + checksum: 10c0/9bc04ee9c7698f1b5506778d36f7382962f71667205d441d6a50f6180ee92328e770b76be78b907817ee103241b29984d3a17ae387e4723aebe0aeaed7a7c3a1 languageName: node linkType: hard @@ -17896,6 +19170,13 @@ __metadata: languageName: node linkType: hard +"object-deep-merge@npm:^2.0.1": + version: 2.0.1 + resolution: "object-deep-merge@npm:2.0.1" + checksum: 10c0/c20580c462a3579ccc49a51c04a131d956d1d22197a92ddb2ad13c6201f54351708df47225a639660c46495f5c913c52609a6bac68feb74ddc27cddfd9a0f287 + languageName: node + linkType: hard + "object-inspect@npm:^1.13.3, object-inspect@npm:^1.13.4": version: 1.13.4 resolution: "object-inspect@npm:1.13.4" @@ -17917,7 +19198,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.0.4, object.assign@npm:^4.1.0, object.assign@npm:^4.1.4, object.assign@npm:^4.1.7": +"object.assign@npm:^4.1.0, object.assign@npm:^4.1.4, object.assign@npm:^4.1.7": version: 4.1.7 resolution: "object.assign@npm:4.1.7" dependencies: @@ -17985,6 +19266,13 @@ __metadata: languageName: node linkType: hard +"obug@npm:^2.1.1": + version: 2.1.3 + resolution: "obug@npm:2.1.3" + checksum: 10c0/cb8187fed0a5fc8445507c950e89f3c1bd43895658c398b5803f6b7804dfa0c562975ecce1e67f3d9247d521452a5bfade9e0e951cc0326b7444272f7c24d25f + languageName: node + linkType: hard + "on-finished@npm:^2.4.1, on-finished@npm:~2.4.1": version: 2.4.1 resolution: "on-finished@npm:2.4.1" @@ -18001,7 +19289,7 @@ __metadata: languageName: node linkType: hard -"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.3.2, once@npm:^1.4.0": +"once@npm:^1.3.0, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -18019,15 +19307,6 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^6.0.0": - version: 6.0.0 - resolution: "onetime@npm:6.0.0" - dependencies: - mimic-fn: "npm:^4.0.0" - checksum: 10c0/4eef7c6abfef697dd4479345a4100c382d73c149d2d56170a54a07418c50816937ad09500e1ed1e79d235989d073a9bade8557122aee24f0576ecde0f392bb6c - languageName: node - linkType: hard - "onetime@npm:^7.0.0": version: 7.0.0 resolution: "onetime@npm:7.0.0" @@ -18114,15 +19393,6 @@ __metadata: languageName: node linkType: hard -"ordered-read-streams@npm:^1.0.0": - version: 1.0.1 - resolution: "ordered-read-streams@npm:1.0.1" - dependencies: - readable-stream: "npm:^2.0.1" - checksum: 10c0/6243667adbcea69527cfebd1e483f0d06109dea578e4bbd6f185acfd1c3cc5f059b887fe600ba3084498924b9566405c0595819e02caf9ce88bc604e90b652b8 - languageName: node - linkType: hard - "os-browserify@npm:0.3.0": version: 0.3.0 resolution: "os-browserify@npm:0.3.0" @@ -18130,13 +19400,6 @@ __metadata: languageName: node linkType: hard -"outvariant@npm:^1.4.0, outvariant@npm:^1.4.3": - version: 1.4.3 - resolution: "outvariant@npm:1.4.3" - checksum: 10c0/5976ca7740349cb8c71bd3382e2a762b1aeca6f33dc984d9d896acdf3c61f78c3afcf1bfe9cc633a7b3c4b295ec94d292048f83ea2b2594fae4496656eba992c - languageName: node - linkType: hard - "own-keys@npm:^1.0.1": version: 1.0.1 resolution: "own-keys@npm:1.0.1" @@ -18155,13 +19418,6 @@ __metadata: languageName: node linkType: hard -"p-cancelable@npm:^4.0.1": - version: 4.0.1 - resolution: "p-cancelable@npm:4.0.1" - checksum: 10c0/12636623f46784ba962b6fe7a1f34d021f1d9a2cc12c43e270baa715ea872d5c8c7d9f086ed420b8b9817e91d9bbe92c14c90e5dddd4a9968c81a2a7aef7089d - languageName: node - linkType: hard - "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -18295,13 +19551,6 @@ __metadata: languageName: node linkType: hard -"package-manager-detector@npm:^1.3.0": - version: 1.6.0 - resolution: "package-manager-detector@npm:1.6.0" - checksum: 10c0/6419d0b840be64fd45bcdcb7a19f09b81b65456d5e7f7a3daac305a4c90643052122f6ac0308afe548ffee75e36148532a2002ea9d292754f1e385aa2e1ea03b - languageName: node - linkType: hard - "param-case@npm:^3.0.4": version: 3.0.4 resolution: "param-case@npm:3.0.4" @@ -18336,13 +19585,12 @@ __metadata: languageName: node linkType: hard -"parse-imports@npm:^2.1.1": - version: 2.2.1 - resolution: "parse-imports@npm:2.2.1" +"parse-imports-exports@npm:^0.2.4": + version: 0.2.4 + resolution: "parse-imports-exports@npm:0.2.4" dependencies: - es-module-lexer: "npm:^1.5.3" - slashes: "npm:^3.0.12" - checksum: 10c0/bc541ce4ef2ff77d53247de39a956e0ee7a1a4b9b175c3e0f898222fe7994595f011491154db4ed408cbaf5049ede9d0b6624125565be208e973a54420cbe069 + parse-statements: "npm:1.0.11" + checksum: 10c0/51b729037208abdf65c4a1f8e9ed06f4e7ccd907c17c668a64db54b37d95bb9e92081f8b16e4133e14102af3cb4e89870975b6ad661b4d654e9ec8f4fb5c77d6 languageName: node linkType: hard @@ -18382,6 +19630,13 @@ __metadata: languageName: node linkType: hard +"parse-statements@npm:1.0.11": + version: 1.0.11 + resolution: "parse-statements@npm:1.0.11" + checksum: 10c0/48960e085019068a5f5242e875fd9d21ec87df2e291acf5ad4e4887b40eab6929a8c8d59542acb85a6497e870c5c6a24f5ab7f980ef5f907c14cc5f7984a93f3 + languageName: node + linkType: hard + "parse5-htmlparser2-tree-adapter@npm:^7.0.0, parse5-htmlparser2-tree-adapter@npm:^7.1.0": version: 7.1.0 resolution: "parse5-htmlparser2-tree-adapter@npm:7.1.0" @@ -18401,7 +19656,7 @@ __metadata: languageName: node linkType: hard -"parse5@npm:^7.0.0, parse5@npm:^7.1.1, parse5@npm:^7.1.2, parse5@npm:^7.2.1, parse5@npm:^7.3.0": +"parse5@npm:^7.0.0, parse5@npm:^7.1.2, parse5@npm:^7.2.1, parse5@npm:^7.3.0": version: 7.3.0 resolution: "parse5@npm:7.3.0" dependencies: @@ -18410,6 +19665,15 @@ __metadata: languageName: node linkType: hard +"parse5@npm:^8.0.0, parse5@npm:^8.0.1": + version: 8.0.1 + resolution: "parse5@npm:8.0.1" + dependencies: + entities: "npm:^8.0.0" + checksum: 10c0/c3c1c5aab55f6e4be5245599790e56e64be7764a4a0edd7f98db4fe3bb380f63add752fa047dff0496446c25f4104f0c7c1967723de640bde92306a7bb67ed2f + languageName: node + linkType: hard + "parseurl@npm:^1.3.3, parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" @@ -18434,13 +19698,6 @@ __metadata: languageName: node linkType: hard -"path-dirname@npm:^1.0.0": - version: 1.0.2 - resolution: "path-dirname@npm:1.0.2" - checksum: 10c0/71e59be2bada7c91f62b976245fd421b7cb01fde3207fe53a82d8880621ad04fd8b434e628c9cf4e796259fc168a107d77cd56837725267c5b2c58cefe2c4e1b - languageName: node - linkType: hard - "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" @@ -18504,7 +19761,7 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.11.1, path-scurry@npm:^1.6.1": +"path-scurry@npm:^1.11.1": version: 1.11.1 resolution: "path-scurry@npm:1.11.1" dependencies: @@ -18514,13 +19771,13 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^2.0.0": - version: 2.0.0 - resolution: "path-scurry@npm:2.0.0" +"path-scurry@npm:^2.0.2": + version: 2.0.2 + resolution: "path-scurry@npm:2.0.2" dependencies: lru-cache: "npm:^11.0.0" minipass: "npm:^7.1.2" - checksum: 10c0/3da4adedaa8e7ef8d6dc4f35a0ff8f05a9b4d8365f2b28047752b62d4c1ad73eec21e37b1579ef2d075920157856a3b52ae8309c480a6f1a8bbe06ff8e52b33c + checksum: 10c0/b35ad37cf6557a87fd057121ce2be7695380c9138d93e87ae928609da259ea0a170fac6f3ef1eb3ece8a068e8b7f2f3adf5bb2374cf4d4a57fe484954fcc9482 languageName: node linkType: hard @@ -18540,7 +19797,7 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:^6.2.1, path-to-regexp@npm:^6.3.0": +"path-to-regexp@npm:^6.2.1": version: 6.3.0 resolution: "path-to-regexp@npm:6.3.0" checksum: 10c0/73b67f4638b41cde56254e6354e46ae3a2ebc08279583f6af3d96fe4664fc75788f74ed0d18ca44fa4a98491b69434f9eee73b97bb5314bd1b5adb700f5c18d6 @@ -18598,6 +19855,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^4.0.3": + version: 4.0.5 + resolution: "picomatch@npm:4.0.5" + checksum: 10c0/947bc6b6e1ff1e6c5aaf95b107a0839d12802f4f7b867663f67d47accba939ca1cb582cf99dfc30438efa1c4648ac5990967e783e8929c36b03e8440704ef1bd + languageName: node + linkType: hard + "pidtree@npm:^0.3.0": version: 0.3.1 resolution: "pidtree@npm:0.3.1" @@ -18607,15 +19871,6 @@ __metadata: languageName: node linkType: hard -"pidtree@npm:~0.6.0": - version: 0.6.0 - resolution: "pidtree@npm:0.6.0" - bin: - pidtree: bin/pidtree.js - checksum: 10c0/0829ec4e9209e230f74ebf4265f5ccc9ebfb488334b525cb13f86ff801dca44b362c41252cd43ae4d7653a10a5c6ab3be39d2c79064d6895e0d78dc50a5ed6e9 - languageName: node - linkType: hard - "pify@npm:^3.0.0": version: 3.0.0 resolution: "pify@npm:3.0.0" @@ -18623,7 +19878,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.4": +"pirates@npm:^4.0.7": version: 4.0.7 resolution: "pirates@npm:4.0.7" checksum: 10c0/a51f108dd811beb779d58a76864bbd49e239fa40c7984cd11596c75a121a8cc789f1c8971d8bb15f0dbf9d48b76c05bb62fcbce840f89b688c0fa64b37e8478a @@ -19587,6 +20842,18 @@ __metadata: languageName: node linkType: hard +"pretty-format@npm:30.4.1, pretty-format@npm:^30.0.0": + version: 30.4.1 + resolution: "pretty-format@npm:30.4.1" + dependencies: + "@jest/schemas": "npm:30.4.1" + ansi-styles: "npm:^5.2.0" + react-is-18: "npm:react-is@^18.3.1" + react-is-19: "npm:react-is@^19.2.5" + checksum: 10c0/c7e6633740cd2f6d382f188c00c8b4b3f2bee3cda16db6753471c6bb4b94f76531358d3a7793062a0fb00d72ebfb934e8ae1d4f5ced6bb34c8e7f60996f90076 + languageName: node + linkType: hard + "pretty-format@npm:^27.0.2": version: 27.5.1 resolution: "pretty-format@npm:27.5.1" @@ -19598,17 +20865,6 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": - version: 29.7.0 - resolution: "pretty-format@npm:29.7.0" - dependencies: - "@jest/schemas": "npm:^29.6.3" - ansi-styles: "npm:^5.0.0" - react-is: "npm:^18.0.0" - checksum: 10c0/edc5ff89f51916f036c62ed433506b55446ff739358de77207e63e88a28ca2894caac6e73dcb68166a606e51c8087d32d400473e6a9fdd2dbe743f46c9c0276f - languageName: node - linkType: hard - "pretty-ms@npm:^9.2.0": version: 9.3.0 resolution: "pretty-ms@npm:9.3.0" @@ -19663,13 +20919,6 @@ __metadata: languageName: node linkType: hard -"proc-log@npm:^4.0.0, proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": - version: 4.2.0 - resolution: "proc-log@npm:4.2.0" - checksum: 10c0/17db4757c2a5c44c1e545170e6c70a26f7de58feb985091fb1763f5081cab3d01b181fb2dd240c9f4a4255a1d9227d163d5771b7e69c9e49a561692db865efb9 - languageName: node - linkType: hard - "proc-log@npm:^5.0.0": version: 5.0.0 resolution: "proc-log@npm:5.0.0" @@ -19677,7 +20926,14 @@ __metadata: languageName: node linkType: hard -"process-nextick-args@npm:^2.0.0, process-nextick-args@npm:~2.0.0": +"proc-log@npm:^6.0.0": + version: 6.1.0 + resolution: "proc-log@npm:6.1.0" + checksum: 10c0/4f178d4062733ead9d71a9b1ab24ebcecdfe2250916a5b1555f04fe2eda972a0ec76fbaa8df1ad9c02707add6749219d118a4fc46dc56bdfe4dde4b47d80bb82 + languageName: node + linkType: hard + +"process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" checksum: 10c0/bec089239487833d46b59d80327a1605e1c5287eaad770a291add7f45fda1bb5e28b38e0e061add0a1d0ee0984788ce74fa394d345eed1c420cacf392c554367 @@ -19698,13 +20954,6 @@ __metadata: languageName: node linkType: hard -"promise-inflight@npm:^1.0.1": - version: 1.0.1 - resolution: "promise-inflight@npm:1.0.1" - checksum: 10c0/d179d148d98fbff3d815752fa9a08a87d3190551d1420f17c4467f628214db12235ae068d98cd001f024453676d8985af8f28f002345646c4ece4600a79620bc - languageName: node - linkType: hard - "promise-map-series@npm:^0.3.0": version: 0.3.0 resolution: "promise-map-series@npm:0.3.0" @@ -19722,7 +20971,7 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.4.2": +"prompts@npm:^2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -19795,7 +21044,7 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.33, psl@npm:^1.1.7": +"psl@npm:^1.1.7": version: 1.15.0 resolution: "psl@npm:1.15.0" dependencies: @@ -19804,28 +21053,7 @@ __metadata: languageName: node linkType: hard -"pump@npm:^2.0.0": - version: 2.0.1 - resolution: "pump@npm:2.0.1" - dependencies: - end-of-stream: "npm:^1.1.0" - once: "npm:^1.3.1" - checksum: 10c0/f1fe8960f44d145f8617ea4c67de05392da4557052980314c8f85081aee26953bdcab64afad58a2b1df0e8ff7203e3710e848cbe81a01027978edc6e264db355 - languageName: node - linkType: hard - -"pumpify@npm:^1.3.5": - version: 1.5.1 - resolution: "pumpify@npm:1.5.1" - dependencies: - duplexify: "npm:^3.6.0" - inherits: "npm:^2.0.3" - pump: "npm:^2.0.0" - checksum: 10c0/0bcabf9e3dbf2d0cc1f9b84ac80d3c75386111caf8963bfd98817a1e2192000ac0ccc804ca6ccd5b2b8430fdb71347b20fb2f014fe3d41adbacb1b502a841c45 - languageName: node - linkType: hard - -"punycode@npm:2.3.1, punycode@npm:^2.1.0, punycode@npm:^2.1.1, punycode@npm:^2.3.1": +"punycode@npm:2.3.1, punycode@npm:^2.1.0, punycode@npm:^2.3.1": version: 2.3.1 resolution: "punycode@npm:2.3.1" checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 @@ -19848,10 +21076,10 @@ __metadata: languageName: node linkType: hard -"pure-rand@npm:^6.0.0": - version: 6.1.0 - resolution: "pure-rand@npm:6.1.0" - checksum: 10c0/1abe217897bf74dcb3a0c9aba3555fe975023147b48db540aa2faf507aee91c03bf54f6aef0eb2bf59cc259a16d06b28eca37f0dc426d94f4692aeff02fb0e65 +"pure-rand@npm:^7.0.0": + version: 7.0.1 + resolution: "pure-rand@npm:7.0.1" + checksum: 10c0/9cade41030f5ec95f5d55a11a71404cd6f46b69becaad892097cd7f58e2c6248cd0a933349ca7d21336ab629f1da42ffe899699b671bc4651600eaf6e57f837e languageName: node linkType: hard @@ -19898,13 +21126,6 @@ __metadata: languageName: node linkType: hard -"querystringify@npm:^2.1.1": - version: 2.2.0 - resolution: "querystringify@npm:2.2.0" - checksum: 10c0/3258bc3dbdf322ff2663619afe5947c7926a6ef5fb78ad7d384602974c467fadfc8272af44f5eb8cddd0d011aae8fabf3a929a8eee4b86edcc0a21e6bd10f9aa - languageName: node - linkType: hard - "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -20055,25 +21276,36 @@ __metadata: languageName: node linkType: hard -"react-i18next@npm:15.4.1": - version: 15.4.1 - resolution: "react-i18next@npm:15.4.1" +"react-i18next@npm:17.0.8": + version: 17.0.8 + resolution: "react-i18next@npm:17.0.8" dependencies: - "@babel/runtime": "npm:^7.25.0" + "@babel/runtime": "npm:^7.29.2" html-parse-stringify: "npm:^3.0.1" + use-sync-external-store: "npm:^1.6.0" peerDependencies: - i18next: ">= 23.2.3" + i18next: ">= 26.2.0" react: ">= 16.8.0" + typescript: ^5 || ^6 peerDependenciesMeta: react-dom: optional: true react-native: optional: true - checksum: 10c0/4f421a4db8255766bdbc8cc262b03c75bed4d92e5f7cc79dee99236c3239eb86a4d100fcbc6c2c735fa0207de23c09516450c8d970d193b0f7c2a3daaa51e261 + typescript: + optional: true + checksum: 10c0/4d13d396208927ed3c80eb62db011a98dae16d93fc951bb4cb220fc5a3a5dd2f0046244fdbd197f627f595230d6fa05cc5d1c6f52b6241acd63ff818dff63acb + languageName: node + linkType: hard + +"react-is-18@npm:react-is@^18.3.1": + version: 18.3.1 + resolution: "react-is@npm:18.3.1" + checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072 languageName: node linkType: hard -"react-is@npm:19.2.7": +"react-is-19@npm:react-is@^19.2.5, react-is@npm:19.2.7": version: 19.2.7 resolution: "react-is@npm:19.2.7" checksum: 10c0/419fe54d5bd7fdf5414a5bb7bd9a1e0e36f9fae28ffb4cb73290fbe342bde15d8584a90d1db62547f6aa03018dce517b178a041abb522136cd4b4b51b4e94c83 @@ -20094,13 +21326,6 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^18.0.0": - version: 18.3.1 - resolution: "react-is@npm:18.3.1" - checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072 - languageName: node - linkType: hard - "react-json-pretty@npm:2.2.0": version: 2.2.0 resolution: "react-json-pretty@npm:2.2.0" @@ -20316,18 +21541,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": - version: 3.6.2 - resolution: "readable-stream@npm:3.6.2" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 - languageName: node - linkType: hard - -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.1, readable-stream@npm:^2.0.5, readable-stream@npm:^2.1.5, readable-stream@npm:^2.3.3, readable-stream@npm:^2.3.5, readable-stream@npm:^2.3.6, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.0.1, readable-stream@npm:~2.3.6": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -20342,6 +21556,17 @@ __metadata: languageName: node linkType: hard +"readable-stream@npm:^3.0.6, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 + languageName: node + linkType: hard + "readdirp@npm:^4.0.1": version: 4.1.2 resolution: "readdirp@npm:4.1.2" @@ -20715,28 +21940,7 @@ __metadata: languageName: node linkType: hard -"remove-bom-buffer@npm:^3.0.0": - version: 3.0.0 - resolution: "remove-bom-buffer@npm:3.0.0" - dependencies: - is-buffer: "npm:^1.1.5" - is-utf8: "npm:^0.2.1" - checksum: 10c0/5179a73424893880709fff54ba2160d6175abfb587031a4cdf16f43acb5952d219fe342a40ea45a4d2ef40cd7af19722b0ba6447a6605b42b6c0674eff320896 - languageName: node - linkType: hard - -"remove-bom-stream@npm:^1.2.0": - version: 1.2.0 - resolution: "remove-bom-stream@npm:1.2.0" - dependencies: - remove-bom-buffer: "npm:^3.0.0" - safe-buffer: "npm:^5.1.0" - through2: "npm:^2.0.3" - checksum: 10c0/c5f34d3308c7864579838a3741a08983bd47d3bac5e6f9e4f498c1eccdc6784805ce52aec1700c420eff09d05184e6c96bb6a3380cf18aadce6dd3d4138399cb - languageName: node - linkType: hard - -"remove-trailing-separator@npm:^1.0.1": +"remove-trailing-separator@npm:^1.1.0": version: 1.1.0 resolution: "remove-trailing-separator@npm:1.1.0" checksum: 10c0/3568f9f8f5af3737b4aee9e6e1e8ec4be65a92da9cb27f989e0893714d50aa95ed2ff02d40d1fa35e1b1a234dc9c2437050ef356704a3999feaca6667d9e9bfc @@ -20756,10 +21960,10 @@ __metadata: languageName: node linkType: hard -"replace-ext@npm:^1.0.0": - version: 1.0.1 - resolution: "replace-ext@npm:1.0.1" - checksum: 10c0/9a9c3d68d0d31f20533ed23e9f6990cff8320cf357eebfa56c0d7b63746ae9f2d6267f3321e80e0bffcad854f710fc9a48dbcf7615579d767db69e9cd4a43168 +"replace-ext@npm:^2.0.0": + version: 2.0.0 + resolution: "replace-ext@npm:2.0.0" + checksum: 10c0/52cb1006f83c5f07ef2c76b070c58bdeca1b67beded57d60593d1af8cd8ee731501d0433645cea8e9a4bf57a7018f47c9a3928c0463496cad1946fa85907aa47 languageName: node linkType: hard @@ -20808,6 +22012,13 @@ __metadata: languageName: node linkType: hard +"reserved-identifiers@npm:^1.0.0": + version: 1.2.0 + resolution: "reserved-identifiers@npm:1.2.0" + checksum: 10c0/b82651b12e6c608e80463c3753d275bc20fd89294d0415f04e670aeec3611ae3582ddc19e8fedd497e7d0bcbfaddab6a12823ec86e855b1e6a245e0a734eb43d + languageName: node + linkType: hard + "resolve-alpn@npm:^1.2.0": version: 1.2.1 resolution: "resolve-alpn@npm:1.2.1" @@ -20838,12 +22049,12 @@ __metadata: languageName: node linkType: hard -"resolve-options@npm:^1.1.0": - version: 1.1.0 - resolution: "resolve-options@npm:1.1.0" +"resolve-options@npm:^2.0.0": + version: 2.0.0 + resolution: "resolve-options@npm:2.0.0" dependencies: - value-or-function: "npm:^3.0.0" - checksum: 10c0/2f55cbe96ef8260771fc52a4335bb4a04e0d7b52e616c2538a0eb48fd8335a932a3bfc67356a21db965e4bc3e4be869e7925d475c8fb556adf771cc5409fbf3d + value-or-function: "npm:^4.0.0" + checksum: 10c0/108f22186cad8748f1f0263944702a9949a12074e49442827845a52048f9156290781ceab8aee3e26ad868347266746704ee59a83a8f2fe2ce35228d054e325e languageName: node linkType: hard @@ -20861,27 +22072,7 @@ __metadata: languageName: node linkType: hard -"resolve.exports@npm:^2.0.0": - version: 2.0.3 - resolution: "resolve.exports@npm:2.0.3" - checksum: 10c0/1ade1493f4642a6267d0a5e68faeac20b3d220f18c28b140343feb83694d8fed7a286852aef43689d16042c61e2ddb270be6578ad4a13990769e12065191200d - languageName: node - linkType: hard - -"resolve@npm:1.22.10": - version: 1.22.10 - resolution: "resolve@npm:1.22.10" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/8967e1f4e2cc40f79b7e080b4582b9a8c5ee36ffb46041dccb20e6461161adf69f843b43067b4a375de926a2cd669157e29a29578191def399dd5ef89a1b5203 - languageName: node - linkType: hard - -"resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.20.0, resolve@npm:^1.22.11, resolve@npm:^1.22.4": +"resolve@npm:1.22.12, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.20.0, resolve@npm:^1.22.11, resolve@npm:^1.22.4": version: 1.22.12 resolution: "resolve@npm:1.22.12" dependencies: @@ -20908,20 +22099,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.22.10#optional!builtin": - version: 1.22.10 - resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/52a4e505bbfc7925ac8f4cd91fd8c4e096b6a89728b9f46861d3b405ac9a1ccf4dcbf8befb4e89a2e11370dacd0160918163885cbc669369590f2f31f4c58939 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.12.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.11#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": +"resolve@patch:resolve@npm%3A1.22.12#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.12.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.11#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": version: 1.22.12 resolution: "resolve@patch:resolve@npm%3A1.22.12#optional!builtin::version=1.22.12&hash=c3c19d" dependencies: @@ -20957,6 +22135,15 @@ __metadata: languageName: node linkType: hard +"responselike@npm:^4.0.2": + version: 4.0.2 + resolution: "responselike@npm:4.0.2" + dependencies: + lowercase-keys: "npm:^3.0.0" + checksum: 10c0/8366407fc7f12466dd52682483a31dd6ca892481365caadea9a380196d8a6238650e064531087bebd25d7e9393f491efc2dad723fadc54db7a2b442dba8ef588 + languageName: node + linkType: hard + "restore-cursor@npm:^5.0.0": version: 5.1.0 resolution: "restore-cursor@npm:5.1.0" @@ -20981,13 +22168,6 @@ __metadata: languageName: node linkType: hard -"rettime@npm:^0.7.0": - version: 0.7.0 - resolution: "rettime@npm:0.7.0" - checksum: 10c0/1460539d49415c37e46884bf1db7a5da974b239c1bd6976e1cf076fad169067dc8f55cd2572aec504433162f3627b6d8123eea977d110476258045d620bd051b - languageName: node - linkType: hard - "reusify@npm:^1.0.4": version: 1.1.0 resolution: "reusify@npm:1.1.0" @@ -21065,7 +22245,7 @@ __metadata: languageName: node linkType: hard -"rsvp@npm:^4.8.2": +"rsvp@npm:^4.8.5": version: 4.8.5 resolution: "rsvp@npm:4.8.5" checksum: 10c0/7978f01060a48204506a8ebe15cdbd468498f5ae538b1d7ee3e7630375ba7cb2f98df2f596c12d3f4d5d5c21badc1c6ca8009f5142baded8511609a28eabd19a @@ -21118,7 +22298,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.8.2, rxjs@npm:^7.8.1": +"rxjs@npm:7.8.2": version: 7.8.2 resolution: "rxjs@npm:7.8.2" dependencies: @@ -21189,29 +22369,24 @@ __metadata: languageName: node linkType: hard -"sass-loader@npm:16.0.5": - version: 16.0.5 - resolution: "sass-loader@npm:16.0.5" - dependencies: - neo-async: "npm:^2.6.2" +"sass-loader@npm:17.0.0": + version: 17.0.0 + resolution: "sass-loader@npm:17.0.0" peerDependencies: - "@rspack/core": 0.x || 1.x - node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + "@rspack/core": 0.x || ^1.0.0 || ^2.0.0-0 sass: ^1.3.0 sass-embedded: "*" webpack: ^5.0.0 peerDependenciesMeta: "@rspack/core": optional: true - node-sass: - optional: true sass: optional: true sass-embedded: optional: true webpack: optional: true - checksum: 10c0/216422b7b9e6e3f22739dc96887d883d2415f188d5c47631fd28c80608b5fae71167b26d0c74a1e917614e4d494fa73b1190ad5ca2f587c1afee84dc1d30f003 + checksum: 10c0/fe65b1b75ac9e4c35c82ee507ad1273919646ef19b589a1366bbae5c3d4a23ff69b8b5d891103735f059d2fc5c4bb564d0e716989adfe60aede4658f2fabfad0 languageName: node linkType: hard @@ -21364,7 +22539,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^6.3.0, semver@npm:^6.3.1": +"semver@npm:^6.3.1": version: 6.3.1 resolution: "semver@npm:6.3.1" bin: @@ -21373,6 +22548,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.7.1, semver@npm:^7.7.2, semver@npm:^7.8.2": + version: 7.8.5 + resolution: "semver@npm:7.8.5" + bin: + semver: bin/semver.js + checksum: 10c0/b1f3127a5be8125a94f37188b361c212466c292c6910adce3ec106cff5dc211ccaedc4739c11bb70fda59d6fc1f040a9bca289f4e093451521a2372e5231fe0c + languageName: node + linkType: hard + "send@npm:^1.1.0, send@npm:^1.2.0": version: 1.2.1 resolution: "send@npm:1.2.1" @@ -21413,7 +22597,7 @@ __metadata: languageName: node linkType: hard -"serialize-javascript@npm:^6.0.0, serialize-javascript@npm:^6.0.1, serialize-javascript@npm:^6.0.2": +"serialize-javascript@npm:^6.0.0, serialize-javascript@npm:^6.0.1": version: 6.0.2 resolution: "serialize-javascript@npm:6.0.2" dependencies: @@ -21422,6 +22606,13 @@ __metadata: languageName: node linkType: hard +"serialize-javascript@npm:^7.0.3": + version: 7.0.7 + resolution: "serialize-javascript@npm:7.0.7" + checksum: 10c0/b8fb3de1484682e3bd7649e12e81ef119c9873537c07bf7ed8c8836fb30be6587679d7c18e445eb80e97c23c9df6390e4da65bef093f2d89fb6dfc10da991b6a + languageName: node + linkType: hard + "serve-handler@npm:^6.1.7": version: 6.1.7 resolution: "serve-handler@npm:6.1.7" @@ -21476,12 +22667,14 @@ __metadata: languageName: node linkType: hard -"ses@npm:1.12.0": - version: 1.12.0 - resolution: "ses@npm:1.12.0" +"ses@npm:2.2.0": + version: 2.2.0 + resolution: "ses@npm:2.2.0" dependencies: - "@endo/env-options": "npm:^1.1.8" - checksum: 10c0/3ce5ca1161965cc4c32b249e3a89a3d349d5cabd5451de8943dc2dbbb296f64bf111e74fb8c8a5053623afe2c4372add8ff65be28ea27e3ffb843c14b1823f05 + "@endo/cache-map": "npm:^1.1.0" + "@endo/env-options": "npm:^1.1.11" + "@endo/immutable-arraybuffer": "npm:^1.1.2" + checksum: 10c0/d412182c08d7bc0997c98d0e68ca926286130e9a6853c94dd08a8cd02df097e4c3b61d6f18ebd88bebe1f4af982608637caf89de44471701fc05ca8de74b6b8c languageName: node linkType: hard @@ -21543,7 +22736,7 @@ __metadata: languageName: node linkType: hard -"sha.js@npm:^2.3.6, sha.js@npm:^2.4.0, sha.js@npm:^2.4.8": +"sha.js@npm:^2.3.6, sha.js@npm:^2.4.0, sha.js@npm:^2.4.12, sha.js@npm:^2.4.8": version: 2.4.12 resolution: "sha.js@npm:2.4.12" dependencies: @@ -21556,11 +22749,10 @@ __metadata: languageName: node linkType: hard -"shadcn@npm:3.8.4": - version: 3.8.4 - resolution: "shadcn@npm:3.8.4" +"shadcn@npm:4.12.0": + version: 4.12.0 + resolution: "shadcn@npm:4.12.0" dependencies: - "@antfu/ni": "npm:^25.0.0" "@babel/core": "npm:^7.28.0" "@babel/parser": "npm:^7.28.0" "@babel/plugin-transform-typescript": "npm:^7.28.0" @@ -21578,10 +22770,7 @@ __metadata: fast-glob: "npm:^3.3.3" fs-extra: "npm:^11.3.1" fuzzysort: "npm:^3.1.0" - https-proxy-agent: "npm:^7.0.6" kleur: "npm:^4.1.5" - msw: "npm:^2.10.4" - node-fetch: "npm:^3.3.2" open: "npm:^11.0.0" ora: "npm:^8.2.0" postcss: "npm:^8.5.6" @@ -21592,12 +22781,13 @@ __metadata: tailwind-merge: "npm:^3.0.1" ts-morph: "npm:^26.0.0" tsconfig-paths: "npm:^4.2.0" + undici: "npm:^7.27.2" validate-npm-package-name: "npm:^7.0.1" zod: "npm:^3.24.1" zod-to-json-schema: "npm:^3.24.6" bin: shadcn: dist/index.js - checksum: 10c0/6313129df3f865dd42f39c5d07b8103236875f24933d394a74771f7295cec3eb523127fd8917da5d112c2ea09004e661ad1379627c55079fece16e3afca0fbf7 + checksum: 10c0/3bf254fe2eaf203cfe35ee070b304ac25e18be400fcc0807c3bc5f0f8cb6e982f51b5e42a18b051a9a3b95a4ffe7bdc0ee64331083127c91fd38055af955f2cf languageName: node linkType: hard @@ -21649,7 +22839,7 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.6.1, shell-quote@npm:^1.8.1, shell-quote@npm:^1.8.4": +"shell-quote@npm:1.8.4, shell-quote@npm:^1.6.1, shell-quote@npm:^1.8.4": version: 1.8.4 resolution: "shell-quote@npm:1.8.4" checksum: 10c0/86c93678bc394cb81f5ddcdc87df9c95d279ef9652775cd1cd1eed361404169a8d8cbaacaeed232ab09919e36ee1e5363863570390d78571f8c22b7f6312fb40 @@ -21704,7 +22894,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 @@ -21787,23 +22977,6 @@ __metadata: languageName: node linkType: hard -"slashes@npm:^3.0.12": - version: 3.0.12 - resolution: "slashes@npm:3.0.12" - checksum: 10c0/71ca2a1fcd1ab6814b0fdb8cf9c33a3d54321deec2aa8d173510f0086880201446021a9b9e6a18561f7c472b69a2145977c6a8fb9c53a8ff7be31778f203d175 - languageName: node - linkType: hard - -"slice-ansi@npm:^5.0.0": - version: 5.0.0 - resolution: "slice-ansi@npm:5.0.0" - dependencies: - ansi-styles: "npm:^6.0.0" - is-fullwidth-code-point: "npm:^4.0.0" - checksum: 10c0/2d4d40b2a9d5cf4e8caae3f698fe24ae31a4d778701724f578e984dcb485ec8c49f0c04dab59c401821e80fcdfe89cace9c66693b0244e40ec485d72e543914f - languageName: node - linkType: hard - "slice-ansi@npm:^7.1.0": version: 7.1.2 resolution: "slice-ansi@npm:7.1.2" @@ -21814,6 +22987,16 @@ __metadata: languageName: node linkType: hard +"slice-ansi@npm:^8.0.0": + version: 8.0.0 + resolution: "slice-ansi@npm:8.0.0" + dependencies: + ansi-styles: "npm:^6.2.3" + is-fullwidth-code-point: "npm:^5.1.0" + checksum: 10c0/0ce4aa91febb7cea4a00c2c27bb820fa53b6d2862ce0f80f7120134719f7914fc416b0ed966cf35250a3169e152916392f35917a2d7cad0fcc5d8b841010fa9a + languageName: node + linkType: hard + "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -21870,7 +23053,7 @@ __metadata: languageName: node linkType: hard -"sodium-native@npm:^4.0.10, sodium-native@npm:^4.1.1, sodium-native@npm:^4.3.3": +"sodium-native@npm:^4.0.10, sodium-native@npm:^4.3.3": version: 4.3.3 resolution: "sodium-native@npm:4.3.3" dependencies: @@ -21917,12 +23100,12 @@ __metadata: languageName: node linkType: hard -"sort-keys@npm:^4.2.0": - version: 4.2.0 - resolution: "sort-keys@npm:4.2.0" +"sort-keys@npm:^5.0.0": + version: 5.1.0 + resolution: "sort-keys@npm:5.1.0" dependencies: - is-plain-obj: "npm:^2.0.0" - checksum: 10c0/a63304c7ba55ad3640198fbbd105a1f5a78c1d2c3eb4a7f27857b0c5aeb22983b2b16297265c3c9624d0b03955993e61b92b4601107c4886adc0875d8322f0dd + is-plain-obj: "npm:^4.0.0" + checksum: 10c0/fdb7aeb02368ad91b2ea947b59f3c95d80f8c71bbcb5741ebd55852994f54a129af3b3663b280951566fe5897de056428810dbb58c61db831e588c0ac110f2b0 languageName: node linkType: hard @@ -21953,7 +23136,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": +"source-map@npm:^0.6.0, source-map@npm:~0.6.0, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 @@ -22077,15 +23260,6 @@ __metadata: languageName: node linkType: hard -"ssri@npm:^10.0.0": - version: 10.0.6 - resolution: "ssri@npm:10.0.6" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/e5a1e23a4057a86a97971465418f22ea89bd439ac36ade88812dd920e4e61873e8abd6a9b72a03a67ef50faa00a2daf1ab745c5a15b46d03e0544a0296354227 - languageName: node - linkType: hard - "ssri@npm:^12.0.0": version: 12.0.0 resolution: "ssri@npm:12.0.0" @@ -22095,14 +23269,14 @@ __metadata: languageName: node linkType: hard -"stable-hash@npm:^0.0.4": - version: 0.0.4 - resolution: "stable-hash@npm:0.0.4" - checksum: 10c0/53d010d2a1b014fb60d398c095f43912c353b7b44774e55222bb26fd428bc75b73d7bdfcae509ce927c23ca9c5aff2dc1bc82f191d30e57a879550bc2952bdb0 +"stable-hash-x@npm:^0.2.0": + version: 0.2.0 + resolution: "stable-hash-x@npm:0.2.0" + checksum: 10c0/c757df58366ee4bb266a9486b8932eab7c1ba730469eaf4b68d2dee404814e9f84089c44c9b5205f8c7d99a0ab036cce2af69139ce5ed44b635923c011a8aea8 languageName: node linkType: hard -"stack-utils@npm:^2.0.3": +"stack-utils@npm:^2.0.6": version: 2.0.6 resolution: "stack-utils@npm:2.0.6" dependencies: @@ -22193,6 +23367,15 @@ __metadata: languageName: node linkType: hard +"stream-composer@npm:^1.0.2": + version: 1.0.2 + resolution: "stream-composer@npm:1.0.2" + dependencies: + streamx: "npm:^2.13.2" + checksum: 10c0/00b7c63e67dffa1f7d7149f47072e61e3e788aa1221a6116cac0186f387650816927e41b0934e615f47fec6d8d9c5b93cc85952748ed0238975090dfabf17fa7 + languageName: node + linkType: hard + "stream-http@npm:3.2.0": version: 3.2.0 resolution: "stream-http@npm:3.2.0" @@ -22205,28 +23388,25 @@ __metadata: languageName: node linkType: hard -"stream-shift@npm:^1.0.0": - version: 1.0.3 - resolution: "stream-shift@npm:1.0.3" - checksum: 10c0/939cd1051ca750d240a0625b106a2b988c45fb5a3be0cebe9a9858cb01bc1955e8c7b9fac17a9462976bea4a7b704e317c5c2200c70f0ca715a3363b9aa4fd3b - languageName: node - linkType: hard - -"strict-event-emitter@npm:^0.5.1": - version: 0.5.1 - resolution: "strict-event-emitter@npm:0.5.1" - checksum: 10c0/f5228a6e6b6393c57f52f62e673cfe3be3294b35d6f7842fc24b172ae0a6e6c209fa83241d0e433fc267c503bc2f4ffdbe41a9990ff8ffd5ac425ec0489417f7 +"streamx@npm:^2.12.0, streamx@npm:^2.12.5, streamx@npm:^2.13.2, streamx@npm:^2.14.0": + version: 2.28.0 + resolution: "streamx@npm:2.28.0" + dependencies: + events-universal: "npm:^1.0.0" + fast-fifo: "npm:^1.3.2" + text-decoder: "npm:^1.1.0" + checksum: 10c0/1cd5647c4dbdaadf4623b48183bab1d71bdc251e24c8f3baddf9fb9fa75096a7d446aba2c58a4f71964eeb5753f514b59e97bfdf94a60ce2c1b33594410b0342 languageName: node linkType: hard -"string-argv@npm:~0.3.2": +"string-argv@npm:^0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" checksum: 10c0/75c02a83759ad1722e040b86823909d9a2fc75d15dd71ec4b537c3560746e33b5f5a07f7332d1e3f88319909f82190843aa2f0a0d8c8d591ec08e93d5b8dec82 languageName: node linkType: hard -"string-length@npm:^4.0.1": +"string-length@npm:^4.0.2": version: 4.0.2 resolution: "string-length@npm:4.0.2" dependencies: @@ -22269,6 +23449,16 @@ __metadata: languageName: node linkType: hard +"string-width@npm:^8.2.0": + version: 8.2.1 + resolution: "string-width@npm:8.2.1" + dependencies: + get-east-asian-width: "npm:^1.5.0" + strip-ansi: "npm:^7.1.2" + checksum: 10c0/d467b4eaf4c40a01bb438a2620e77badd2456ffd5131c9973abe4f3acf7c802d5b21f3b6a00a5e33a7fc28ca8f9c103226e01bac61e9f259659c6f46d78e353a + languageName: node + linkType: hard + "string.prototype.includes@npm:^2.0.1": version: 2.0.1 resolution: "string.prototype.includes@npm:2.0.1" @@ -22429,6 +23619,15 @@ __metadata: languageName: node linkType: hard +"strip-ansi@npm:^7.1.2": + version: 7.2.0 + resolution: "strip-ansi@npm:7.2.0" + dependencies: + ansi-regex: "npm:^6.2.2" + checksum: 10c0/544d13b7582f8254811ea97db202f519e189e59d35740c46095897e254e4f1aa9fe1524a83ad6bc5ad67d4dd6c0281d2e0219ed62b880a6238a16a17d375f221 + languageName: node + linkType: hard + "strip-bom-string@npm:^1.0.0": version: 1.0.0 resolution: "strip-bom-string@npm:1.0.0" @@ -22457,13 +23656,6 @@ __metadata: languageName: node linkType: hard -"strip-final-newline@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-final-newline@npm:3.0.0" - checksum: 10c0/a771a17901427bac6293fd416db7577e2bc1c34a19d38351e9d5478c3c415f523f391003b42ed475f27e33a78233035df183525395f731d3bfb8cdcbd4da08ce - languageName: node - linkType: hard - "strip-final-newline@npm:^4.0.0": version: 4.0.0 resolution: "strip-final-newline@npm:4.0.0" @@ -22564,6 +23756,13 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:10.2.2": + version: 10.2.2 + resolution: "supports-color@npm:10.2.2" + checksum: 10c0/fb28dd7e0cdf80afb3f2a41df5e068d60c8b4f97f7140de2eaed5b42e075d82a0e980b20a2c0efd2b6d73cfacb55555285d8cc719fa0472220715aefeaa1da7c + languageName: node + linkType: hard + "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -22647,7 +23846,7 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.11.13": +"synckit@npm:^0.11.13, synckit@npm:^0.11.8": version: 0.11.13 resolution: "synckit@npm:0.11.13" dependencies: @@ -22656,16 +23855,6 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.9.1": - version: 0.9.3 - resolution: "synckit@npm:0.9.3" - dependencies: - "@pkgr/core": "npm:^0.1.0" - tslib: "npm:^2.6.2" - checksum: 10c0/3f2ecd7e04d5ca846ccb005017bb4be15982602b90d0ae3facf92f73837a81657b0a666d81713b23cfe25c28f26aaaabb385c59856c39c3710dba9f389cd8321 - languageName: node - linkType: hard - "tagged-tag@npm:^1.0.0": version: 1.0.0 resolution: "tagged-tag@npm:1.0.0" @@ -22694,20 +23883,6 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.11, tar@npm:^6.2.1": - version: 6.2.1 - resolution: "tar@npm:6.2.1" - dependencies: - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - minipass: "npm:^5.0.0" - minizlib: "npm:^2.1.1" - mkdirp: "npm:^1.0.3" - yallist: "npm:^4.0.0" - checksum: 10c0/a5eca3eb50bc11552d453488344e6507156b9193efd7635e98e867fab275d527af53d8866e2370cd09dfe74378a18111622ace35af6a608e5223a7d27fe99537 - languageName: node - linkType: hard - "tar@npm:^7.4.3": version: 7.4.3 resolution: "tar@npm:7.4.3" @@ -22722,6 +23897,28 @@ __metadata: languageName: node linkType: hard +"tar@npm:^7.5.4": + version: 7.5.19 + resolution: "tar@npm:7.5.19" + dependencies: + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.1.0" + yallist: "npm:^5.0.0" + checksum: 10c0/7022e8cb04a8ceccc0689f2c731743fa2aab2e3c3f559f7dbc37b65ef7d5913049b427284eded2ec0765c5db5ff72dd7939fe2ae15785ff422cef2116c95d798 + languageName: node + linkType: hard + +"teex@npm:^1.0.1": + version: 1.0.1 + resolution: "teex@npm:1.0.1" + dependencies: + streamx: "npm:^2.12.5" + checksum: 10c0/8df9166c037ba694b49d32a49858e314c60e513d55ac5e084dbf1ddbb827c5fa43cc389a81e87684419c21283308e9d68bb068798189c767ec4c252f890b8a77 + languageName: node + linkType: hard + "terser-webpack-plugin@npm:5.6.1, terser-webpack-plugin@npm:^5.3.9, terser-webpack-plugin@npm:^5.5.0": version: 5.6.1 resolution: "terser-webpack-plugin@npm:5.6.1" @@ -22786,6 +23983,15 @@ __metadata: languageName: node linkType: hard +"text-decoder@npm:^1.1.0": + version: 1.2.7 + resolution: "text-decoder@npm:1.2.7" + dependencies: + b4a: "npm:^1.6.4" + checksum: 10c0/929938ed154fbadb660a7f3d1aca30b7e53649a731af7583168fcfba0c158046325d35d945926e2a512bb62d1a49a7818151c987ea38b48853f01e1615722fc5 + languageName: node + linkType: hard + "thingies@npm:^2.5.0": version: 2.5.0 resolution: "thingies@npm:2.5.0" @@ -22809,17 +24015,7 @@ __metadata: languageName: node linkType: hard -"through2-filter@npm:^3.0.0": - version: 3.0.0 - resolution: "through2-filter@npm:3.0.0" - dependencies: - through2: "npm:~2.0.0" - xtend: "npm:~4.0.0" - checksum: 10c0/741d9144dbbafca3a4a75fc55a0c062641ac464071118cef2213f35f0a961e3331795c802d5bef915060d07cebd29e6c7079e656845145de4db63c74054b4156 - languageName: node - linkType: hard - -"through2@npm:^2.0.0, through2@npm:^2.0.1, through2@npm:^2.0.3, through2@npm:~2.0.0": +"through2@npm:^2.0.1": version: 2.0.5 resolution: "through2@npm:2.0.5" dependencies: @@ -22829,15 +24025,6 @@ __metadata: languageName: node linkType: hard -"through2@npm:~4.0.2": - version: 4.0.2 - resolution: "through2@npm:4.0.2" - dependencies: - readable-stream: "npm:3" - checksum: 10c0/3741564ae99990a4a79097fe7a4152c22348adc4faf2df9199a07a66c81ed2011da39f631e479fdc56483996a9d34a037ad64e76d79f18c782ab178ea9b6778c - languageName: node - linkType: hard - "thunky@npm:^1.0.2": version: 1.1.0 resolution: "thunky@npm:1.1.0" @@ -22873,14 +24060,14 @@ __metadata: languageName: node linkType: hard -"tinyexec@npm:^1.0.1": - version: 1.0.2 - resolution: "tinyexec@npm:1.0.2" - checksum: 10c0/1261a8e34c9b539a9aae3b7f0bb5372045ff28ee1eba035a2a059e532198fe1a182ec61ac60fa0b4a4129f0c4c4b1d2d57355b5cb9aa2d17ac9454ecace502ee +"tinyexec@npm:^1.2.4": + version: 1.2.4 + resolution: "tinyexec@npm:1.2.4" + checksum: 10c0/153b8db6b080194b558ff145b9cffc36b80a6e07babd644dcfbe49c807eee668c876049d28bdee90b96304476f883352f2dad91b3f86bc23832532f4363e66ff languageName: node linkType: hard -"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.15": +"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15": version: 0.2.17 resolution: "tinyglobby@npm:0.2.17" dependencies: @@ -22940,16 +24127,6 @@ __metadata: languageName: node linkType: hard -"to-absolute-glob@npm:^2.0.0": - version: 2.0.2 - resolution: "to-absolute-glob@npm:2.0.2" - dependencies: - is-absolute: "npm:^1.0.0" - is-negated-glob: "npm:^1.0.0" - checksum: 10c0/7c5384222d6bd8f68d105bcc618794dfc3433de74eea195da172f27e107e8b2e1e1991e4adaf837f65e04623e4b03d90e19fd48aaeecfc89b6f642da2510c4d5 - languageName: node - linkType: hard - "to-buffer@npm:^1.2.0": version: 1.2.1 resolution: "to-buffer@npm:1.2.1" @@ -22970,12 +24147,22 @@ __metadata: languageName: node linkType: hard -"to-through@npm:^2.0.0": - version: 2.0.0 - resolution: "to-through@npm:2.0.0" +"to-through@npm:^3.0.0": + version: 3.0.0 + resolution: "to-through@npm:3.0.0" + dependencies: + streamx: "npm:^2.12.5" + checksum: 10c0/9b1a6eb85ceff159db21678b7d9aec1d8b99a63dae01ce95b074df1f37f9d92e3ed7d5284f394917a079dda37d53f8eeef8fc74ef506b97cc35629925f29b464 + languageName: node + linkType: hard + +"to-valid-identifier@npm:^1.0.0": + version: 1.0.0 + resolution: "to-valid-identifier@npm:1.0.0" dependencies: - through2: "npm:^2.0.3" - checksum: 10c0/f8a7b0b38c51bcc018c38e6867588ac72120bd62232250b49a0fc209bd53ed66461ff85dc50b398c8e3686aa3e61165bce1dce4e89930f2f973b0fd3f64e4d2c + "@sindresorhus/base62": "npm:^1.0.0" + reserved-identifiers: "npm:^1.0.0" + checksum: 10c0/569b49f43b5aaaa20677e67f0f1cdcff344855149934cfb80c793c7ac7c30e191b224bc81cab40fb57641af9ca73795c78053c164a2addc617671e2d22c13a4a languageName: node linkType: hard @@ -23021,19 +24208,7 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^4.1.2": - version: 4.1.4 - resolution: "tough-cookie@npm:4.1.4" - dependencies: - psl: "npm:^1.1.33" - punycode: "npm:^2.1.1" - universalify: "npm:^0.2.0" - url-parse: "npm:^1.5.3" - checksum: 10c0/aca7ff96054f367d53d1e813e62ceb7dd2eda25d7752058a74d64b7266fd07be75908f3753a32ccf866a2f997604b414cfb1916d6e7f69bc64d9d9939b0d6c45 - languageName: node - linkType: hard - -"tough-cookie@npm:^5.0.0": +"tough-cookie@npm:^5.1.1": version: 5.1.2 resolution: "tough-cookie@npm:5.1.2" dependencies: @@ -23042,21 +24217,12 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^6.0.0": - version: 6.0.0 - resolution: "tough-cookie@npm:6.0.0" +"tough-cookie@npm:^6.0.1": + version: 6.0.1 + resolution: "tough-cookie@npm:6.0.1" dependencies: tldts: "npm:^7.0.5" - checksum: 10c0/7b17a461e9c2ac0d0bea13ab57b93b4346d0b8c00db174c963af1e46e4ea8d04148d2a55f2358fc857db0c0c65208a98e319d0c60693e32e0c559a9d9cf20cb5 - languageName: node - linkType: hard - -"tr46@npm:^3.0.0": - version: 3.0.0 - resolution: "tr46@npm:3.0.0" - dependencies: - punycode: "npm:^2.1.1" - checksum: 10c0/cdc47cad3a9d0b6cb293e39ccb1066695ae6fdd39b9e4f351b010835a1f8b4f3a6dc3a55e896b421371187f22b48d7dac1b693de4f6551bdef7b6ab6735dfe3b + checksum: 10c0/ec70bd6b1215efe4ed31a158f0be3e4c9088fcbd8620edc23a5860d4f3d85c757b77e274baaa700f7b25e409f4181552ed189603c2b2e1a9f88104da3a61a37d languageName: node linkType: hard @@ -23069,6 +24235,15 @@ __metadata: languageName: node linkType: hard +"tr46@npm:^6.0.0": + version: 6.0.0 + resolution: "tr46@npm:6.0.0" + dependencies: + punycode: "npm:^2.3.1" + checksum: 10c0/83130df2f649228aa91c17754b66248030a3af34911d713b5ea417066fa338aa4bc8668d06bd98aa21a2210f43fc0a3db8b9099e7747fb5830e40e39a6a1058e + languageName: node + linkType: hard + "tr46@npm:~0.0.3": version: 0.0.3 resolution: "tr46@npm:0.0.3" @@ -23085,7 +24260,7 @@ __metadata: languageName: node linkType: hard -"tree-kill@npm:^1.2.2": +"tree-kill@npm:1.2.2": version: 1.2.2 resolution: "tree-kill@npm:1.2.2" bin: @@ -23193,7 +24368,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.8.1, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.4.1, tslib@npm:^2.6.0, tslib@npm:^2.6.2, tslib@npm:^2.8.1": +"tslib@npm:2.8.1, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.4.1, tslib@npm:^2.6.0, tslib@npm:^2.8.1": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 @@ -23260,10 +24435,10 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:4.30.0": - version: 4.30.0 - resolution: "type-fest@npm:4.30.0" - checksum: 10c0/9441fbbc971f92a53d7dfdb0db3f9c71a5a33ac3e021ca605cba8ad0b5c0a1e191cc778b4980c534b098ccb4e3322809100baf763be125510c993c9b8361f60e +"type-fest@npm:4.41.0": + version: 4.41.0 + resolution: "type-fest@npm:4.41.0" + checksum: 10c0/f5ca697797ed5e88d33ac8f1fec21921839871f808dc59345c9cf67345bfb958ce41bd821165dbf3ae591cedec2bf6fe8882098dfdd8dc54320b859711a2c1e4 languageName: node linkType: hard @@ -23288,19 +24463,12 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^4.26.1": - version: 4.41.0 - resolution: "type-fest@npm:4.41.0" - checksum: 10c0/f5ca697797ed5e88d33ac8f1fec21921839871f808dc59345c9cf67345bfb958ce41bd821165dbf3ae591cedec2bf6fe8882098dfdd8dc54320b859711a2c1e4 - languageName: node - linkType: hard - -"type-fest@npm:^5.2.0": - version: 5.4.1 - resolution: "type-fest@npm:5.4.1" +"type-fest@npm:^5.6.0": + version: 5.8.0 + resolution: "type-fest@npm:5.8.0" dependencies: tagged-tag: "npm:^1.0.0" - checksum: 10c0/500386d690e634499e6fb765a1e33909a75fea0258acdd56a2d1c9565d6810e222f6d95bd80daa5498377c7ea976af46f518185b5dbd67ff8454562544808aa1 + checksum: 10c0/c8aae118a763d550a9552a511dff6b71840a23dab4edf693cf1c4df22596942794e6f6723389bd9036a90182249d915158bacf0815a1ae87f05f901b1d5f574e languageName: node linkType: hard @@ -23387,70 +24555,43 @@ __metadata: languageName: node linkType: hard -"typedarray@npm:^0.0.6": - version: 0.0.6 - resolution: "typedarray@npm:0.0.6" - checksum: 10c0/6005cb31df50eef8b1f3c780eb71a17925f3038a100d82f9406ac2ad1de5eb59f8e6decbdc145b3a1f8e5836e17b0c0002fb698b9fe2516b8f9f9ff602d36412 - languageName: node - linkType: hard - -"typescript@npm:5.7.3": - version: 5.7.3 - resolution: "typescript@npm:5.7.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa - languageName: node - linkType: hard - -"typescript@npm:5.8.3": - version: 5.8.3 - resolution: "typescript@npm:5.8.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/5f8bb01196e542e64d44db3d16ee0e4063ce4f3e3966df6005f2588e86d91c03e1fb131c2581baf0fb65ee79669eea6e161cd448178986587e9f6844446dbb48 - languageName: node - linkType: hard - -"typescript@npm:^4.2.4": - version: 4.9.5 - resolution: "typescript@npm:4.9.5" +"typescript@npm:6.0.3": + version: 6.0.3 + resolution: "typescript@npm:6.0.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/5f6cad2e728a8a063521328e612d7876e12f0d8a8390d3b3aaa452a6a65e24e9ac8ea22beb72a924fd96ea0a49ea63bb4e251fb922b12eedfb7f7a26475e5c56 + checksum: 10c0/4a25ff5045b984370f48f196b3a0120779b1b343d40b9a68d114ea5e5fff099809b2bb777576991a63a5cd59cf7bffd96ff6fe10afcefbcb8bd6fb96ad4b6606 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.7.3#optional!builtin": - version: 5.7.3 - resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5" +"typescript@npm:^5.0.4": + version: 5.9.3 + resolution: "typescript@npm:5.9.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4 + checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.8.3#optional!builtin": - version: 5.8.3 - resolution: "typescript@patch:typescript@npm%3A5.8.3#optional!builtin::version=5.8.3&hash=5786d5" +"typescript@patch:typescript@npm%3A6.0.3#optional!builtin": + version: 6.0.3 + resolution: "typescript@patch:typescript@npm%3A6.0.3#optional!builtin::version=6.0.3&hash=5786d5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/39117e346ff8ebd87ae1510b3a77d5d92dae5a89bde588c747d25da5c146603a99c8ee588c7ef80faaf123d89ed46f6dbd918d534d641083177d5fac38b8a1cb + checksum: 10c0/2f25c74e65663c248fa1ade2b8459d9ce5372ff9dad07067310f132966ebec1d93f6c42f0baf77a6b6a7a91460463f708e6887013aaade22111037457c6b25df languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^4.2.4#optional!builtin": - version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin::version=4.9.5&hash=289587" +"typescript@patch:typescript@npm%3A^5.0.4#optional!builtin": + version: 5.9.3 + resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/e3333f887c6829dfe0ab6c1dbe0dd1e3e2aeb56c66460cb85c5440c566f900c833d370ca34eb47558c0c69e78ced4bfe09b8f4f98b6de7afed9b84b8d1dd06a1 + checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430 languageName: node linkType: hard @@ -23480,13 +24621,6 @@ __metadata: languageName: node linkType: hard -"unc-path-regex@npm:^0.1.2": - version: 0.1.2 - resolution: "unc-path-regex@npm:0.1.2" - checksum: 10c0/bf9c781c4e2f38e6613ea17a51072e4b416840fbe6eeb244597ce9b028fac2fb6cfd3dde1f14111b02c245e665dc461aab8168ecc30b14364d02caa37f812996 - languageName: node - linkType: hard - "underscore.string@npm:~3.3.4": version: 3.3.6 resolution: "underscore.string@npm:3.3.6" @@ -23497,17 +24631,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10c0/bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 - languageName: node - linkType: hard - -"undici-types@npm:~6.21.0": - version: 6.21.0 - resolution: "undici-types@npm:6.21.0" - checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04 +"undici-types@npm:^7.21.0": + version: 7.28.0 + resolution: "undici-types@npm:7.28.0" + checksum: 10c0/e1230791cfbaf7fc88a4ebb5282423886a2fb325572234437a3e9c9f7dff970bebe12d5672d6d23a3584119d6d43f8222d06531ed749d8ddeb3551f004fca55d languageName: node linkType: hard @@ -23518,19 +24645,24 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.25.4": - version: 5.29.0 - resolution: "undici@npm:5.29.0" - dependencies: - "@fastify/busboy": "npm:^2.0.0" - checksum: 10c0/e4e4d631ca54ee0ad82d2e90e7798fa00a106e27e6c880687e445cc2f13b4bc87c5eba2a88c266c3eecffb18f26e227b778412da74a23acc374fca7caccec49b +"undici-types@npm:~8.3.0": + version: 8.3.0 + resolution: "undici-types@npm:8.3.0" + checksum: 10c0/c8aa7e2fbebfce519654dafadc0ece59be888d2ccaf180fb4495da875e7b536d2456345c384069c7e6f3e9c9ab7435f074957da306f142343eee86ff8048855a + languageName: node + linkType: hard + +"undici@npm:^6.23.0, undici@npm:^6.25.0": + version: 6.27.0 + resolution: "undici@npm:6.27.0" + checksum: 10c0/f88c3dae3957dbf9d93cb481440aced317bd3c4941b5914fea5efba516d51138988cdb5c76006f0bb1337e41d56c3443351055d492e73af2428521c37ba2a76f languageName: node linkType: hard -"undici@npm:^7.12.0": - version: 7.15.0 - resolution: "undici@npm:7.15.0" - checksum: 10c0/2c526bf157771c11e3ce297b2173cbde67b057db33263d3923529f40f57159a5ed8dab5134766091ed8aba529ddf023becb5e04292e23924f14d9b6fa79dcd4e +"undici@npm:^7.19.0, undici@npm:^7.25.0, undici@npm:^7.27.2": + version: 7.28.0 + resolution: "undici@npm:7.28.0" + checksum: 10c0/fe781983a26098795e99bb1f64906cbb7d0bcaa029a26baade007b53ea67f2631d189b8f9671a31f4c8d0cb3773b7559608628ba54452fef51fec90e7c78bb0d languageName: node linkType: hard @@ -23608,15 +24740,6 @@ __metadata: languageName: node linkType: hard -"unique-filename@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-filename@npm:3.0.0" - dependencies: - unique-slug: "npm:^4.0.0" - checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f - languageName: node - linkType: hard - "unique-filename@npm:^4.0.0": version: 4.0.0 resolution: "unique-filename@npm:4.0.0" @@ -23626,15 +24749,6 @@ __metadata: languageName: node linkType: hard -"unique-slug@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-slug@npm:4.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 - languageName: node - linkType: hard - "unique-slug@npm:^5.0.0": version: 5.0.0 resolution: "unique-slug@npm:5.0.0" @@ -23644,16 +24758,6 @@ __metadata: languageName: node linkType: hard -"unique-stream@npm:^2.0.2": - version: 2.3.1 - resolution: "unique-stream@npm:2.3.1" - dependencies: - json-stable-stringify-without-jsonify: "npm:^1.0.1" - through2-filter: "npm:^3.0.0" - checksum: 10c0/4827c5f249d1d760076d64e087d18618104ce5511112c85150b0dd76cea5ddd5a5fd143559597d07b519c2a19abd83f5cdaac3a30204d66cff63e986dd4cd18c - languageName: node - linkType: hard - "unique-string@npm:^3.0.0": version: 3.0.0 resolution: "unique-string@npm:3.0.0" @@ -23727,13 +24831,6 @@ __metadata: languageName: node linkType: hard -"universalify@npm:^0.2.0": - version: 0.2.0 - resolution: "universalify@npm:0.2.0" - checksum: 10c0/cedbe4d4ca3967edf24c0800cfc161c5a15e240dac28e3ce575c689abc11f2c81ccc6532c8752af3b40f9120fb5e454abecd359e164f4f6aa44c29cd37e194fe - languageName: node - linkType: hard - "universalify@npm:^2.0.0": version: 2.0.1 resolution: "universalify@npm:2.0.1" @@ -23748,22 +24845,79 @@ __metadata: languageName: node linkType: hard -"unplugin@npm:1.0.1": - version: 1.0.1 - resolution: "unplugin@npm:1.0.1" - dependencies: - acorn: "npm:^8.8.1" - chokidar: "npm:^3.5.3" - webpack-sources: "npm:^3.2.3" - webpack-virtual-modules: "npm:^0.5.0" - checksum: 10c0/7d59b5a28abc1cdbd6356a10f273d1266f59c3be083ab0e659a37d02d047d5df1b435e0f40f5ec97517e8fc910d314592f0d197ccceb75ef47c71c1898ec7a05 - languageName: node - linkType: hard - -"until-async@npm:^3.0.2": - version: 3.0.2 - resolution: "until-async@npm:3.0.2" - checksum: 10c0/61c8b03895dbe18fe3d90316d0a1894e0c131ea4b1673f6ce78eed993d0bb81bbf4b7adf8477e9ff7725782a76767eed9d077561cfc9f89b4a1ebe61f7c9828e +"unrs-resolver@npm:^1.7.11": + version: 1.12.2 + resolution: "unrs-resolver@npm:1.12.2" + dependencies: + "@unrs/resolver-binding-android-arm-eabi": "npm:1.12.2" + "@unrs/resolver-binding-android-arm64": "npm:1.12.2" + "@unrs/resolver-binding-darwin-arm64": "npm:1.12.2" + "@unrs/resolver-binding-darwin-x64": "npm:1.12.2" + "@unrs/resolver-binding-freebsd-x64": "npm:1.12.2" + "@unrs/resolver-binding-linux-arm-gnueabihf": "npm:1.12.2" + "@unrs/resolver-binding-linux-arm-musleabihf": "npm:1.12.2" + "@unrs/resolver-binding-linux-arm64-gnu": "npm:1.12.2" + "@unrs/resolver-binding-linux-arm64-musl": "npm:1.12.2" + "@unrs/resolver-binding-linux-loong64-gnu": "npm:1.12.2" + "@unrs/resolver-binding-linux-loong64-musl": "npm:1.12.2" + "@unrs/resolver-binding-linux-ppc64-gnu": "npm:1.12.2" + "@unrs/resolver-binding-linux-riscv64-gnu": "npm:1.12.2" + "@unrs/resolver-binding-linux-riscv64-musl": "npm:1.12.2" + "@unrs/resolver-binding-linux-s390x-gnu": "npm:1.12.2" + "@unrs/resolver-binding-linux-x64-gnu": "npm:1.12.2" + "@unrs/resolver-binding-linux-x64-musl": "npm:1.12.2" + "@unrs/resolver-binding-openharmony-arm64": "npm:1.12.2" + "@unrs/resolver-binding-wasm32-wasi": "npm:1.12.2" + "@unrs/resolver-binding-win32-arm64-msvc": "npm:1.12.2" + "@unrs/resolver-binding-win32-ia32-msvc": "npm:1.12.2" + "@unrs/resolver-binding-win32-x64-msvc": "npm:1.12.2" + napi-postinstall: "npm:^0.3.4" + dependenciesMeta: + "@unrs/resolver-binding-android-arm-eabi": + optional: true + "@unrs/resolver-binding-android-arm64": + optional: true + "@unrs/resolver-binding-darwin-arm64": + optional: true + "@unrs/resolver-binding-darwin-x64": + optional: true + "@unrs/resolver-binding-freebsd-x64": + optional: true + "@unrs/resolver-binding-linux-arm-gnueabihf": + optional: true + "@unrs/resolver-binding-linux-arm-musleabihf": + optional: true + "@unrs/resolver-binding-linux-arm64-gnu": + optional: true + "@unrs/resolver-binding-linux-arm64-musl": + optional: true + "@unrs/resolver-binding-linux-loong64-gnu": + optional: true + "@unrs/resolver-binding-linux-loong64-musl": + optional: true + "@unrs/resolver-binding-linux-ppc64-gnu": + optional: true + "@unrs/resolver-binding-linux-riscv64-gnu": + optional: true + "@unrs/resolver-binding-linux-riscv64-musl": + optional: true + "@unrs/resolver-binding-linux-s390x-gnu": + optional: true + "@unrs/resolver-binding-linux-x64-gnu": + optional: true + "@unrs/resolver-binding-linux-x64-musl": + optional: true + "@unrs/resolver-binding-openharmony-arm64": + optional: true + "@unrs/resolver-binding-wasm32-wasi": + optional: true + "@unrs/resolver-binding-win32-arm64-msvc": + optional: true + "@unrs/resolver-binding-win32-ia32-msvc": + optional: true + "@unrs/resolver-binding-win32-x64-msvc": + optional: true + checksum: 10c0/ddc27f6d920eabdafeac0077ebff9fd799c895cea025751dc17b360bf9be7c93c471fafebf65f205eec476f90d7daa36aef889d47362b2dd4705d68852bcfea4 languageName: node linkType: hard @@ -23812,7 +24966,7 @@ __metadata: languageName: node linkType: hard -"urijs@npm:^1.19.1": +"urijs@npm:^1.19.1, urijs@npm:^1.19.11": version: 1.19.11 resolution: "urijs@npm:1.19.11" checksum: 10c0/96e15eea5b41a99361d506e4d8fcc64dc43f334bd5fd34e08261467b6954b97a6b45929a8d6c79e2dc76aadfd6ca950e0f4bd7f3c0757a08978429634d07eda1 @@ -23836,16 +24990,6 @@ __metadata: languageName: node linkType: hard -"url-parse@npm:^1.5.3": - version: 1.5.10 - resolution: "url-parse@npm:1.5.10" - dependencies: - querystringify: "npm:^2.1.1" - requires-port: "npm:^1.0.0" - checksum: 10c0/bd5aa9389f896974beb851c112f63b466505a04b4807cea2e5a3b7092f6fbb75316f0491ea84e44f66fed55f1b440df5195d7e3a8203f64fcefa19d182f5be87 - languageName: node - linkType: hard - "url@npm:0.11.4": version: 0.11.4 resolution: "url@npm:0.11.4" @@ -23896,6 +25040,15 @@ __metadata: languageName: node linkType: hard +"use-sync-external-store@npm:^1.6.0": + version: 1.6.0 + resolution: "use-sync-external-store@npm:1.6.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/35e1179f872a53227bdf8a827f7911da4c37c0f4091c29b76b1e32473d1670ebe7bcd880b808b7549ba9a5605c233350f800ffab963ee4a4ee346ee983b6019b + languageName: node + linkType: hard + "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -23946,15 +25099,6 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 10c0/1607dd32ac7fc22f2d8f77051e6a64845c9bce5cd3dd8aa0070c074ec73e666a1f63c7b4e0f4bf2bc8b9d59dc85a15e17807446d9d2b17c8485fbc2147b27f9b - languageName: node - linkType: hard - "v8-to-istanbul@npm:^9.0.1": version: 9.3.0 resolution: "v8-to-istanbul@npm:9.3.0" @@ -23966,7 +25110,7 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": +"validate-npm-package-license@npm:^3.0.1": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" dependencies: @@ -23976,14 +25120,7 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-name@npm:^5.0.0": - version: 5.0.1 - resolution: "validate-npm-package-name@npm:5.0.1" - checksum: 10c0/903e738f7387404bb72f7ac34e45d7010c877abd2803dc2d614612527927a40a6d024420033132e667b1bade94544b8a1f65c9431a4eb30d0ce0d80093cd1f74 - languageName: node - linkType: hard - -"validate-npm-package-name@npm:^7.0.1": +"validate-npm-package-name@npm:^7.0.0, validate-npm-package-name@npm:^7.0.1": version: 7.0.2 resolution: "validate-npm-package-name@npm:7.0.2" checksum: 10c0/adf32e943148e13e8df13d06b855493908e6ae7a847610e8543c6291cbf42f40e653249a5b2275e2e615e3224c574ade5a9064a9e2d1ab629386284ea99e8f39 @@ -23997,10 +25134,10 @@ __metadata: languageName: node linkType: hard -"value-or-function@npm:^3.0.0": - version: 3.0.0 - resolution: "value-or-function@npm:3.0.0" - checksum: 10c0/78a75b44543bb70ea3eee1804bbb101558f422335e3b62ed8864deeb85295efab1b109f607c3806b13c2fc48630d93f6c564b2796377a01a6302d355323ecebe +"value-or-function@npm:^4.0.0": + version: 4.0.0 + resolution: "value-or-function@npm:4.0.0" + checksum: 10c0/1ac6f3ce4c2d811f9fb99a50a69df1d3960376cd1d8fa89106f746a251cb7a0bccb62199972c00beecb5f4911b7a65465b6624d198108ca90dc95cfbf1643230 languageName: node linkType: hard @@ -24041,83 +25178,68 @@ __metadata: languageName: node linkType: hard -"vinyl-fs@npm:^3.0.2, vinyl-fs@npm:^3.0.3": - version: 3.0.3 - resolution: "vinyl-fs@npm:3.0.3" - dependencies: - fs-mkdirp-stream: "npm:^1.0.0" - glob-stream: "npm:^6.1.0" - graceful-fs: "npm:^4.0.0" - is-valid-glob: "npm:^1.0.0" - lazystream: "npm:^1.0.0" - lead: "npm:^1.0.0" - object.assign: "npm:^4.0.4" - pumpify: "npm:^1.3.5" - readable-stream: "npm:^2.3.3" - remove-bom-buffer: "npm:^3.0.0" - remove-bom-stream: "npm:^1.2.0" - resolve-options: "npm:^1.1.0" - through2: "npm:^2.0.0" - to-through: "npm:^2.0.0" - value-or-function: "npm:^3.0.0" - vinyl: "npm:^2.0.0" - vinyl-sourcemap: "npm:^1.1.0" - checksum: 10c0/c7e52624b8a32fd5164210d0ce45050ddfcd535ac0b172c59138a402ca730bd1083ee78e43dc71d8ee21475869e9c080ff212e98926a2b980eb3aa644a561777 - languageName: node - linkType: hard - -"vinyl-sourcemap@npm:^1.1.0": - version: 1.1.0 - resolution: "vinyl-sourcemap@npm:1.1.0" +"vinyl-contents@npm:^2.0.0": + version: 2.0.0 + resolution: "vinyl-contents@npm:2.0.0" dependencies: - append-buffer: "npm:^1.0.2" - convert-source-map: "npm:^1.5.0" - graceful-fs: "npm:^4.1.6" - normalize-path: "npm:^2.1.1" - now-and-later: "npm:^2.0.0" - remove-bom-buffer: "npm:^3.0.0" - vinyl: "npm:^2.0.0" - checksum: 10c0/5945250fbc04ed8be348f27adfcf842d310f2e4eea88c4821b48768d12bc8407c332c26b0eeabc63f5808843a2859d902020572bdc42e625a9d049a298d8cf68 + bl: "npm:^5.0.0" + vinyl: "npm:^3.0.0" + checksum: 10c0/b50ddf02c48fa5f89fc14bce470a375cfe74ffd6f8081836ee22f3b731e37bf1ef56761eea73377037325c79784ddc5b90000f8bddd418b87b75ea3f6320f16b languageName: node linkType: hard -"vinyl@npm:^2.0.0, vinyl@npm:~2.2.1": - version: 2.2.1 - resolution: "vinyl@npm:2.2.1" +"vinyl-fs@npm:^4.0.0, vinyl-fs@npm:^4.0.2": + version: 4.0.2 + resolution: "vinyl-fs@npm:4.0.2" dependencies: - clone: "npm:^2.1.1" - clone-buffer: "npm:^1.0.0" - clone-stats: "npm:^1.0.0" - cloneable-readable: "npm:^1.0.0" - remove-trailing-separator: "npm:^1.0.1" - replace-ext: "npm:^1.0.0" - checksum: 10c0/e7073fe5a3e10bbd5a3abe7ccf3351ed1b784178576b09642c08b0ef4056265476610aabd29eabfaaf456ada45f05f4112a35687d502f33aab33b025fc6ec38f + fs-mkdirp-stream: "npm:^2.0.1" + glob-stream: "npm:^8.0.3" + graceful-fs: "npm:^4.2.11" + iconv-lite: "npm:^0.6.3" + is-valid-glob: "npm:^1.0.0" + lead: "npm:^4.0.0" + normalize-path: "npm:3.0.0" + resolve-options: "npm:^2.0.0" + stream-composer: "npm:^1.0.2" + streamx: "npm:^2.14.0" + to-through: "npm:^3.0.0" + value-or-function: "npm:^4.0.0" + vinyl: "npm:^3.0.1" + vinyl-sourcemap: "npm:^2.0.0" + checksum: 10c0/8aeffc5beb9a7663113b5914b801e8c5b0b9ce27d20ec2f9b0dfd58068b0ff1e682ed8d9fe863e56422a997bff37990f9b460d6f84768e168d536a237765b9b7 languageName: node linkType: hard -"void-elements@npm:3.1.0": - version: 3.1.0 - resolution: "void-elements@npm:3.1.0" - checksum: 10c0/0b8686f9f9aa44012e9bd5eabf287ae0cde409b9a2854c5a2335cb83920c957668ac5876e3f0d158dd424744ac411a7270e64128556b451ed3bec875ef18534d +"vinyl-sourcemap@npm:^2.0.0": + version: 2.0.0 + resolution: "vinyl-sourcemap@npm:2.0.0" + dependencies: + convert-source-map: "npm:^2.0.0" + graceful-fs: "npm:^4.2.10" + now-and-later: "npm:^3.0.0" + streamx: "npm:^2.12.5" + vinyl: "npm:^3.0.0" + vinyl-contents: "npm:^2.0.0" + checksum: 10c0/073f3f7dac1fcbf75a5ef22dac1ad18a6a299a761ff1b897455177403141935a1a909fec4540434e5b6344f9d25b962efe49fce5e82fd9e3219d4865e7688e9a languageName: node linkType: hard -"vue-template-compiler@npm:^2.6.11": - version: 2.7.16 - resolution: "vue-template-compiler@npm:2.7.16" +"vinyl@npm:^3.0.0, vinyl@npm:^3.0.1": + version: 3.0.1 + resolution: "vinyl@npm:3.0.1" dependencies: - de-indent: "npm:^1.0.2" - he: "npm:^1.2.0" - checksum: 10c0/66667ffd5095b707f169c902c4f1a011e9d5ab99fc228e4dac14eb5ca7f107ed99bff261b21578a4b391d2f3d320a8050e754404443472acad13ddaa4bd7bae2 + clone: "npm:^2.1.2" + remove-trailing-separator: "npm:^1.1.0" + replace-ext: "npm:^2.0.0" + teex: "npm:^1.0.1" + checksum: 10c0/f1668e4c341948869d00a25082d96a3535050e7b7a174974820ee154065432c4b1a3dd1927bd8de96ffb470147e1ed8fc4a5458e010fe464698d4f987fca04ca languageName: node linkType: hard -"w3c-xmlserializer@npm:^4.0.0": - version: 4.0.0 - resolution: "w3c-xmlserializer@npm:4.0.0" - dependencies: - xml-name-validator: "npm:^4.0.0" - checksum: 10c0/02cc66d6efc590bd630086cd88252444120f5feec5c4043932b0d0f74f8b060512f79dc77eb093a7ad04b4f02f39da79ce4af47ceb600f2bf9eacdc83204b1a8 +"void-elements@npm:3.1.0": + version: 3.1.0 + resolution: "void-elements@npm:3.1.0" + checksum: 10c0/0b8686f9f9aa44012e9bd5eabf287ae0cde409b9a2854c5a2335cb83920c957668ac5876e3f0d158dd424744ac411a7270e64128556b451ed3bec875ef18534d languageName: node linkType: hard @@ -24176,13 +25298,6 @@ __metadata: languageName: node linkType: hard -"web-streams-polyfill@npm:4.0.0-beta.3": - version: 4.0.0-beta.3 - resolution: "web-streams-polyfill@npm:4.0.0-beta.3" - checksum: 10c0/a9596779db2766990117ed3a158e0b0e9f69b887a6d6ba0779940259e95f99dc3922e534acc3e5a117b5f5905300f527d6fbf8a9f0957faf1d8e585ce3452e8e - languageName: node - linkType: hard - "web-streams-polyfill@npm:^3.0.3": version: 3.3.3 resolution: "web-streams-polyfill@npm:3.3.3" @@ -24218,6 +25333,13 @@ __metadata: languageName: node linkType: hard +"webidl-conversions@npm:^8.0.1": + version: 8.0.1 + resolution: "webidl-conversions@npm:8.0.1" + checksum: 10c0/3f6f327ca5fa0c065ed8ed0ef3b72f33623376e68f958e9b7bd0df49fdb0b908139ac2338d19fb45bd0e05595bda96cb6d1622222a8b413daa38a17aacc4dd46 + languageName: node + linkType: hard + "webpack-bundle-analyzer@npm:^4.10.2": version: 4.10.2 resolution: "webpack-bundle-analyzer@npm:4.10.2" @@ -24240,33 +25362,39 @@ __metadata: languageName: node linkType: hard -"webpack-cli@npm:6.0.1": - version: 6.0.1 - resolution: "webpack-cli@npm:6.0.1" +"webpack-cli@npm:7.1.0": + version: 7.1.0 + resolution: "webpack-cli@npm:7.1.0" dependencies: - "@discoveryjs/json-ext": "npm:^0.6.1" - "@webpack-cli/configtest": "npm:^3.0.1" - "@webpack-cli/info": "npm:^3.0.1" - "@webpack-cli/serve": "npm:^3.0.1" - colorette: "npm:^2.0.14" - commander: "npm:^12.1.0" - cross-spawn: "npm:^7.0.3" - envinfo: "npm:^7.14.0" - fastest-levenshtein: "npm:^1.0.12" - import-local: "npm:^3.0.2" + "@discoveryjs/json-ext": "npm:^1.1.0" + commander: "npm:^14.0.3" + cross-spawn: "npm:^7.0.6" + envinfo: "npm:^7.21.0" + import-local: "npm:^3.2.0" interpret: "npm:^3.1.1" rechoir: "npm:^0.8.0" webpack-merge: "npm:^6.0.1" peerDependencies: - webpack: ^5.82.0 + js-yaml: ^4.0.0 || ^5.0.0 + json5: ^2.2.3 + toml: ^3.0.0 || ^4.0.0 + webpack: ^5.101.0 + webpack-bundle-analyzer: ^4.0.0 || ^5.0.0 + webpack-dev-server: ^5.0.0 peerDependenciesMeta: + js-yaml: + optional: true + json5: + optional: true + toml: + optional: true webpack-bundle-analyzer: optional: true webpack-dev-server: optional: true bin: - webpack-cli: ./bin/cli.js - checksum: 10c0/2aaca78e277427f03f528602abd707d224696048fb46286ea636c7975592409c4381ca94d68bbbb3900f195ca97f256e619583e8feb34a80da531461323bf3e2 + webpack-cli: bin/cli.js + checksum: 10c0/3a6bf763334a965957b4e40fa76739088e08f006078f25b12151f84950559f62a772acd37faf5bf29b1847907e088050e1f7e7c682f51689f83fbfa951d12786 languageName: node linkType: hard @@ -24356,20 +25484,13 @@ __metadata: languageName: node linkType: hard -"webpack-sources@npm:^3.2.3, webpack-sources@npm:^3.5.0": +"webpack-sources@npm:^3.5.0": version: 3.5.0 resolution: "webpack-sources@npm:3.5.0" checksum: 10c0/f186eb66ffe245479e7f78c1c202d79584d5b65cc2bc4a6175ff952cdc8840872b1a95e6305078b1286324a19527213935e7d10b53192a9f74c0e0e148e55cb0 languageName: node linkType: hard -"webpack-virtual-modules@npm:^0.5.0": - version: 0.5.0 - resolution: "webpack-virtual-modules@npm:0.5.0" - checksum: 10c0/0742e069cd49d91ccd0b59431b3666903d321582c1b1062fa6bdae005c3538af55ff8787ea5eafbf72662f3496d3a879e2c705d55ca0af8283548a925be18484 - languageName: node - linkType: hard - "webpack@npm:5.107.2, webpack@npm:^5.88.1, webpack@npm:^5.95.0": version: 5.107.2 resolution: "webpack@npm:5.107.2" @@ -24444,15 +25565,6 @@ __metadata: languageName: node linkType: hard -"whatwg-encoding@npm:^2.0.0": - version: 2.0.0 - resolution: "whatwg-encoding@npm:2.0.0" - dependencies: - iconv-lite: "npm:0.6.3" - checksum: 10c0/91b90a49f312dc751496fd23a7e68981e62f33afe938b97281ad766235c4872fc4e66319f925c5e9001502b3040dd25a33b02a9c693b73a4cbbfdc4ad10c3e3e - languageName: node - linkType: hard - "whatwg-encoding@npm:^3.1.1": version: 3.1.1 resolution: "whatwg-encoding@npm:3.1.1" @@ -24462,13 +25574,6 @@ __metadata: languageName: node linkType: hard -"whatwg-mimetype@npm:^3.0.0": - version: 3.0.0 - resolution: "whatwg-mimetype@npm:3.0.0" - checksum: 10c0/323895a1cda29a5fb0b9ca82831d2c316309fede0365047c4c323073e3239067a304a09a1f4b123b9532641ab604203f33a1403b5ca6a62ef405bcd7a204080f - languageName: node - linkType: hard - "whatwg-mimetype@npm:^4.0.0": version: 4.0.0 resolution: "whatwg-mimetype@npm:4.0.0" @@ -24476,17 +25581,14 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^11.0.0": - version: 11.0.0 - resolution: "whatwg-url@npm:11.0.0" - dependencies: - tr46: "npm:^3.0.0" - webidl-conversions: "npm:^7.0.0" - checksum: 10c0/f7ec264976d7c725e0696fcaf9ebe056e14422eacbf92fdbb4462034609cba7d0c85ffa1aab05e9309d42969bcf04632ba5ed3f3882c516d7b093053315bf4c1 +"whatwg-mimetype@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-mimetype@npm:5.0.0" + checksum: 10c0/eead164fe73a00dd82f817af6fc0bd22e9c273e1d55bf4bc6bdf2da7ad8127fca82ef00ea6a37892f5f5641f8e34128e09508f92126086baba126b9e0d57feb4 languageName: node linkType: hard -"whatwg-url@npm:^14.0.0, whatwg-url@npm:^14.1.0": +"whatwg-url@npm:^14.0.0, whatwg-url@npm:^14.1.1": version: 14.2.0 resolution: "whatwg-url@npm:14.2.0" dependencies: @@ -24496,6 +25598,17 @@ __metadata: languageName: node linkType: hard +"whatwg-url@npm:^16.0.0, whatwg-url@npm:^16.0.1": + version: 16.0.1 + resolution: "whatwg-url@npm:16.0.1" + dependencies: + "@exodus/bytes": "npm:^1.11.0" + tr46: "npm:^6.0.0" + webidl-conversions: "npm:^8.0.1" + checksum: 10c0/e75565566abf3a2cdbd9f06c965dbcccee6ec4e9f0d3728ad5e08ceb9944279848bcaa211d35a29cb6d2df1e467dd05cfb59fbddf8a0adcd7d0bce9ffb703fd2 + languageName: node + linkType: hard + "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -24611,6 +25724,17 @@ __metadata: languageName: node linkType: hard +"which@npm:^6.0.0": + version: 6.0.1 + resolution: "which@npm:6.0.1" + dependencies: + isexe: "npm:^4.0.0" + bin: + node-which: bin/which.js + checksum: 10c0/7e710e54ea36d2d6183bee2f9caa27a3b47b9baf8dee55a199b736fcf85eab3b9df7556fca3d02b50af7f3dfba5ea3a45644189836df06267df457e354da66d5 + languageName: node + linkType: hard + "widest-line@npm:^4.0.1": version: 4.0.1 resolution: "widest-line@npm:4.0.1" @@ -24645,14 +25769,14 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^6.2.0": - version: 6.2.0 - resolution: "wrap-ansi@npm:6.2.0" +"wrap-ansi@npm:^10.0.0": + version: 10.0.0 + resolution: "wrap-ansi@npm:10.0.0" dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/baad244e6e33335ea24e86e51868fe6823626e3a3c88d9a6674642afff1d34d9a154c917e74af8d845fd25d170c4ea9cf69a47133c3f3656e1252b3d462d9f6c + ansi-styles: "npm:^6.2.3" + string-width: "npm:^8.2.0" + strip-ansi: "npm:^7.1.2" + checksum: 10c0/6b163457630fe6d1c72aeed283a7410b2cc7487312df8b0ce96df3fbd64a2a7c948856ea97c25148c848627587c5c7945be474d8e723ab6011bb0756a53a9e89 languageName: node linkType: hard @@ -24697,17 +25821,7 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^4.0.2": - version: 4.0.2 - resolution: "write-file-atomic@npm:4.0.2" - dependencies: - imurmurhash: "npm:^0.1.4" - signal-exit: "npm:^3.0.7" - checksum: 10c0/a2c282c95ef5d8e1c27b335ae897b5eca00e85590d92a3fd69a437919b7b93ff36a69ea04145da55829d2164e724bc62202cdb5f4b208b425aba0807889375c7 - languageName: node - linkType: hard - -"write-file-atomic@npm:^5.0.0": +"write-file-atomic@npm:^5.0.0, write-file-atomic@npm:^5.0.1": version: 5.0.1 resolution: "write-file-atomic@npm:5.0.1" dependencies: @@ -24732,7 +25846,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.11.0, ws@npm:^8.18.0": +"ws@npm:^8.18.0": version: 8.18.3 resolution: "ws@npm:8.18.3" peerDependencies: @@ -24784,13 +25898,6 @@ __metadata: languageName: node linkType: hard -"xml-name-validator@npm:^4.0.0": - version: 4.0.0 - resolution: "xml-name-validator@npm:4.0.0" - checksum: 10c0/c1bfa219d64e56fee265b2bd31b2fcecefc063ee802da1e73bad1f21d7afd89b943c9e2c97af2942f60b1ad46f915a4c81e00039c7d398b53cf410e29d3c30bd - languageName: node - linkType: hard - "xml-name-validator@npm:^5.0.0": version: 5.0.0 resolution: "xml-name-validator@npm:5.0.0" @@ -24805,7 +25912,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:^4.0.2, xtend@npm:~4.0.0, xtend@npm:~4.0.1": +"xtend@npm:^4.0.2, xtend@npm:~4.0.1": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: 10c0/366ae4783eec6100f8a02dff02ac907bf29f9a00b82ac0264b4d8b832ead18306797e283cf19de776538babfdcb2101375ec5646b59f08c52128ac4ab812ed0e @@ -24840,12 +25947,12 @@ __metadata: languageName: node linkType: hard -"yaml@npm:~2.6.1": - version: 2.6.1 - resolution: "yaml@npm:2.6.1" +"yaml@npm:^2.9.0": + version: 2.9.0 + resolution: "yaml@npm:2.9.0" bin: yaml: bin.mjs - checksum: 10c0/aebf07f61c72b38c74d2b60c3a3ccf89ee4da45bcd94b2bfb7899ba07a5257625a7c9f717c65a6fc511563d48001e01deb1d9e55f0133f3e2edf86039c8c1be7 + checksum: 10c0/f340718df45e97a9551b9bf9dac61c80050bc464513b710debfb5067c380c8472e3b67809cffacb4ab5ffb5e66ef9310816c88b05f371cec60abfedd8c88e0a2 languageName: node linkType: hard @@ -24856,7 +25963,43 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.3.1, yargs@npm:^17.7.2": +"yargs-parser@npm:^22.0.0": + version: 22.0.0 + resolution: "yargs-parser@npm:22.0.0" + checksum: 10c0/cb7ef81759c4271cb1d96b9351dbbc9a9ce35d3e1122d2b739bf6c432603824fa02c67cc12dcef6ea80283379d63495686e8f41cc7b06c6576e792aba4d33e1c + languageName: node + linkType: hard + +"yargs@npm:17.7.3": + version: 17.7.3 + resolution: "yargs@npm:17.7.3" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10c0/7a28572f7e785a57886e34fdbddb9b28756dec552e1453d5f6e7cdd00ad8721a4e8c4321d33683f5e61cacb36ad43258adbb48396b71ec4ed14abee0fc0d0c1f + languageName: node + linkType: hard + +"yargs@npm:18.0.0": + version: 18.0.0 + resolution: "yargs@npm:18.0.0" + dependencies: + cliui: "npm:^9.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + string-width: "npm:^7.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^22.0.0" + checksum: 10c0/bf290e4723876ea9c638c786a5c42ac28e03c9ca2325e1424bf43b94e5876456292d3ed905b853ebbba6daf43ed29e772ac2a6b3c5fb1b16533245d6211778f3 + languageName: node + linkType: hard + +"yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: @@ -24885,13 +26028,6 @@ __metadata: languageName: node linkType: hard -"yoctocolors-cjs@npm:^2.1.3": - version: 2.1.3 - resolution: "yoctocolors-cjs@npm:2.1.3" - checksum: 10c0/584168ef98eb5d913473a4858dce128803c4a6cd87c0f09e954fa01126a59a33ab9e513b633ad9ab953786ed16efdd8c8700097a51635aafaeed3fef7712fa79 - languageName: node - linkType: hard - "yoctocolors@npm:^2.1.1": version: 2.1.2 resolution: "yoctocolors@npm:2.1.2" @@ -24927,6 +26063,15 @@ __metadata: languageName: node linkType: hard +"zod-validation-error@npm:^3.5.0 || ^4.0.0": + version: 4.0.2 + resolution: "zod-validation-error@npm:4.0.2" + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + checksum: 10c0/0ccfec48c46de1be440b719cd02044d4abb89ed0e14c13e637cd55bf29102f67ccdba373f25def0fc7130e5f15025be4d557a7edcc95d5a3811599aade689e1b + languageName: node + linkType: hard + "zod@npm:^3.24.1": version: 3.25.76 resolution: "zod@npm:3.25.76" @@ -24941,6 +26086,13 @@ __metadata: languageName: node linkType: hard +"zod@npm:^3.25.0 || ^4.0.0": + version: 4.4.3 + resolution: "zod@npm:4.4.3" + checksum: 10c0/7ea31b558e88f9faf44f31dd185e2e1cbf51fed3081787fb96cc2534749b50c0acfc6da7f0922a7353ed092dd358c7d50c28ea96c94d04af64191bd33152eca3 + languageName: node + linkType: hard + "zwitch@npm:^2.0.0": version: 2.0.4 resolution: "zwitch@npm:2.0.4" From 4b01d26f3dd5d5e521c274923e0f25d2b772700b Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Mon, 6 Jul 2026 21:04:29 -0400 Subject: [PATCH 2/3] chore(deps): take safe major bumps, defer jest/babel 8 stack + bignumber 11 Dependabot's grouped "major" PR bundled ~43 major bumps; several require migrations that don't belong in a version-currency bump. This keeps the bumps that build + test green and reverts the ones causing failures. Reverted to current versions (deferred to dedicated migrations): - jest, babel-jest, @types/jest, jest-environment-jsdom, jsdom, @types/jsdom, and the Babel 8 set (@babel/core, @babel/eslint-parser, @babel/preset-env, @babel/preset-react, @babel/preset-typescript) -- jest 30 / babel-jest 30 mis-transform @stellar/design-system's Icon ESM namespace re-export (Icon.* -> undefined), causing ~200 suite failures; babel-jest 29 also requires @babel/core ^7, so Babel stays on 7. - bignumber.js (x3 workspaces) -- v11 throws on malformed numeric strings instead of yielding a non-finite value, regressing usdValueOf() balance handling (a real runtime regression). Supporting fixes required by the kept bumps: - @actions/core v3 is ESM-only: load it via dynamic import in the chrome-extension-upload action and rebuild the ncc bundle. - TypeScript 6: add ignoreDeprecations "6.0"; set explicit rootDir and add node types for @stellar/freighter-api; declare *.scss/*.css. - ESLint 10: add @eslint/js dependency; disable the newly-recommended no-useless-assignment / preserve-caught-error rules (pre-existing violations, tracked for a follow-up). - lavamoat: deny eslint-import-resolver-typescript>unrs-resolver's postinstall (native binary ships via its optional dependency). - pin docs @stellar/freighter-api off the moving "latest" tag; add a @stellar/freighter-api -> workspace:* resolution (required once typescript-wallet-sdk-km 3 depends on freighter-api 6.0.1, which collides with the local workspace under Yarn hardened mode). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../chrome-extension-upload/dist/index.js | 70979 ++++++++++++---- .../actions/chrome-extension-upload/index.js | 18 +- @shared/api/package.json | 2 +- @shared/helpers/package.json | 2 +- @stellar/freighter-api/tsconfig.json | 3 +- docs/package.json | 2 +- eslint.config.js | 6 + extension/package.json | 6 +- extension/src/custom.d.ts | 6 + package.json | 21 +- tsconfig.json | 1 + yarn.lock | 3431 +- 12 files changed, 54402 insertions(+), 20075 deletions(-) diff --git a/.github/actions/chrome-extension-upload/dist/index.js b/.github/actions/chrome-extension-upload/dist/index.js index 514f9db4bd..349090c3d0 100644 --- a/.github/actions/chrome-extension-upload/dist/index.js +++ b/.github/actions/chrome-extension-upload/dist/index.js @@ -1,12 +1,12 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = { - /***/ 7459: /***/ ( + /***/ 1725: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { - const got = __nccwpck_require__(3061); + const got = __nccwpck_require__(2955); /* Forked from https://github.com/fregante/chrome-webstore-upload @@ -106,19780 +106,55405 @@ /***/ }, - /***/ 7351: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { + /***/ 2203: /***/ (module) => { "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; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.issue = exports.issueCommand = void 0; - const os = __importStar(__nccwpck_require__(2037)); - const utils_1 = __nccwpck_require__(5278); /** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value + * @typedef {Object} HttpRequest + * @property {Record} headers - Request headers + * @property {string} [method] - HTTP method + * @property {string} [url] - Request URL */ - 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 utils_1 - .toCommandValue(s) - .replace(/%/g, "%25") - .replace(/\r/g, "%0D") - .replace(/\n/g, "%0A"); - } - function escapeProperty(s) { - return utils_1 - .toCommandValue(s) - .replace(/%/g, "%25") - .replace(/\r/g, "%0D") - .replace(/\n/g, "%0A") - .replace(/:/g, "%3A") - .replace(/,/g, "%2C"); - } - //# sourceMappingURL=command.js.map - /***/ - }, + /** + * @typedef {Object} HttpResponse + * @property {Record} headers - Response headers + * @property {number} [status] - HTTP status code + */ - /***/ 2186: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + /** + * Set of default cacheable status codes per RFC 7231 section 6.1. + * @type {Set} + */ + const statusCodeCacheableByDefault = new Set([ + 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501, + ]); - 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.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__(7351); - const file_command_1 = __nccwpck_require__(717); - const utils_1 = __nccwpck_require__(5278); - const os = __importStar(__nccwpck_require__(2037)); - const path = __importStar(__nccwpck_require__(1017)); - const oidc_utils_1 = __nccwpck_require__(8041); /** - * The code to exit an action + * Set of HTTP status codes that the cache implementation understands. + * Note: This implementation does not understand partial responses (206). + * @type {Set} */ - 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 || (exports.ExitCode = {}))); - //----------------------------------------------------------------------- - // Variables - //----------------------------------------------------------------------- + const understoodStatuses = new Set([ + 200, 203, 204, 300, 301, 302, 303, 307, 308, 404, 405, 410, 414, 501, + ]); + /** - * 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 + * Set of HTTP error status codes. + * @type {Set} */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) { - return file_command_1.issueFileCommand( - "ENV", - file_command_1.prepareKeyValueMessage(name, val) - ); - } - command_1.issueCommand("set-env", { name }, convertedVal); - } - exports.exportVariable = exportVariable; + const errorStatusCodes = new Set([500, 502, 503, 504]); + /** - * Registers a secret which will get masked from logs - * @param secret value of the secret + * Object representing hop-by-hop headers that should be removed. + * @type {Record} */ - function setSecret(secret) { - command_1.issueCommand("add-mask", {}, secret); - } - exports.setSecret = setSecret; + const hopByHopHeaders = { + date: true, // included, because we add Age update Date + connection: true, + "keep-alive": true, + "proxy-authenticate": true, + "proxy-authorization": true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + }; + /** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath + * Headers that are excluded from revalidation update. + * @type {Record} */ - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) { - file_command_1.issueFileCommand("PATH", inputPath); - } else { - command_1.issueCommand("add-path", {}, inputPath); - } - process.env[ - "PATH" - ] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; + const excludedFromRevalidationUpdate = { + // Since the old body is reused, it doesn't make sense to change properties of the body + "content-length": true, + "content-encoding": true, + "transfer-encoding": true, + "content-range": true, + }; + + /** + * Converts a string to a number or returns zero if the conversion fails. + * @param {string} s - The string to convert. + * @returns {number} The parsed number or 0. + */ + function toNumberOrZero(s) { + const n = parseInt(s, 10); + return isFinite(n) ? n : 0; } - 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 + * Determines if the given response is an error response. + * Implements RFC 5861 behavior. + * @param {HttpResponse|undefined} response - The HTTP response object. + * @returns {boolean} true if the response is an error or undefined, false otherwise. */ - 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}`); - } - if (options && options.trimWhitespace === false) { - return val; + function isErrorResponse(response) { + // consider undefined response as faulty + if (!response) { + return true; } - return val.trim(); + return errorStatusCodes.has(response.status); } - 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[] - * + * Parses a Cache-Control header string into an object. + * @param {string} [header] - The Cache-Control header value. + * @returns {Record} An object representing Cache-Control directives. */ - function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split("\n") - .filter((x) => x !== ""); - if (options && options.trimWhitespace === false) { - return inputs; + function parseCacheControl(header) { + /** @type {Record} */ + const cc = {}; + if (!header) return cc; + + // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), + // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale + const parts = header.trim().split(/,/); + for (const part of parts) { + const [k, v] = part.split(/=/, 2); + cc[k.trim()] = + v === undefined ? true : v.trim().replace(/^"|"$/g, ""); } - return inputs.map((input) => input.trim()); + + return cc; } - 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 + * Formats a Cache-Control directives object into a header string. + * @param {Record} cc - The Cache-Control directives. + * @returns {string|undefined} A formatted Cache-Control header string or undefined if empty. */ - 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 file_command_1.issueFileCommand( - "OUTPUT", - file_command_1.prepareKeyValueMessage(name, value) - ); + function formatCacheControl(cc) { + let parts = []; + for (const k in cc) { + const v = cc[k]; + parts.push(v === true ? k : k + "=" + v); } - process.stdout.write(os.EOL); - command_1.issueCommand( - "set-output", - { name }, - 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) { - 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) { - 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 = {}) { - command_1.issueCommand( - "error", - 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 = {}) { - command_1.issueCommand( - "warning", - 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 = {}) { - command_1.issueCommand( - "notice", - 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) { - command_1.issue("group", name); - } - exports.startGroup = startGroup; - /** - * End an output group. - */ - function endGroup() { - 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 file_command_1.issueFileCommand( - "STATE", - file_command_1.prepareKeyValueMessage(name, value) - ); + if (!parts.length) { + return undefined; } - command_1.issueCommand( - "save-state", - { name }, - 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); - }); + return parts.join(", "); } - exports.getIDToken = getIDToken; - /** - * Summary exports - */ - var summary_1 = __nccwpck_require__(1327); - Object.defineProperty(exports, "summary", { - enumerable: true, - get: function () { - return summary_1.summary; - }, - }); - /** - * @deprecated use core.summary - */ - var summary_2 = __nccwpck_require__(1327); - Object.defineProperty(exports, "markdownSummary", { - enumerable: true, - get: function () { - return summary_2.markdownSummary; - }, - }); - /** - * Path exports - */ - var path_utils_1 = __nccwpck_require__(2981); - 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; - }, - }); - //# sourceMappingURL=core.js.map - - /***/ - }, - - /***/ 717: /***/ 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; - 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; - }; - 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 fs = __importStar(__nccwpck_require__(7147)); - const os = __importStar(__nccwpck_require__(2037)); - const uuid_1 = __nccwpck_require__(8974); - const utils_1 = __nccwpck_require__(5278); - 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 (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync( - filePath, - `${utils_1.toCommandValue(message)}${os.EOL}`, + module.exports = class CachePolicy { + /** + * Creates a new CachePolicy instance. + * @param {HttpRequest} req - Incoming client request. + * @param {HttpResponse} res - Received server response. + * @param {Object} [options={}] - Configuration options. + * @param {boolean} [options.shared=true] - Is the cache shared (a public proxy)? `false` for personal browser caches. + * @param {number} [options.cacheHeuristic=0.1] - Fallback heuristic (age fraction) for cache duration. + * @param {number} [options.immutableMinTimeToLive=86400000] - Minimum TTL for immutable responses in milliseconds. + * @param {boolean} [options.ignoreCargoCult=false] - Detect nonsense cache headers, and override them. + * @param {any} [options._fromObject] - Internal parameter for deserialization. Do not use. + */ + constructor( + req, + res, { - encoding: "utf8", + shared, + cacheHeuristic, + immutableMinTimeToLive, + ignoreCargoCult, + _fromObject, + } = {}, + ) { + if (_fromObject) { + this._fromObject(_fromObject); + return; } - ); - } - exports.issueFileCommand = issueFileCommand; - function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = 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}"` - ); - } - if (convertedValue.includes(delimiter)) { - throw new Error( - `Unexpected input: value should not contain the delimiter "${delimiter}"` - ); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; - } - exports.prepareKeyValueMessage = prepareKeyValueMessage; - //# sourceMappingURL=file-command.js.map - - /***/ - }, - /***/ 8041: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + if (!res || !res.headers) { + throw Error("Response headers missing"); + } + this._assertRequestHasHeaders(req); - var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); + /** @type {number} Timestamp when the response was received */ + this._responseTime = this.now(); + /** @type {boolean} Indicates if the cache is shared */ + this._isShared = shared !== false; + /** @type {boolean} Indicates if legacy cargo cult directives should be ignored */ + this._ignoreCargoCult = !!ignoreCargoCult; + /** @type {number} Heuristic cache fraction */ + this._cacheHeuristic = + undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE + /** @type {number} Minimum TTL for immutable responses in ms */ + this._immutableMinTtl = + undefined !== immutableMinTimeToLive + ? immutableMinTimeToLive + : 24 * 3600 * 1000; + + /** @type {number} HTTP status code */ + this._status = "status" in res ? res.status : 200; + /** @type {Record} Response headers */ + this._resHeaders = res.headers; + /** @type {Record} Parsed Cache-Control directives from response */ + this._rescc = parseCacheControl(res.headers["cache-control"]); + /** @type {string} HTTP method (e.g., GET, POST) */ + this._method = "method" in req ? req.method : "GET"; + /** @type {string} Request URL */ + this._url = req.url; + /** @type {string} Host header from the request */ + this._host = req.headers.host; + /** @type {boolean} Whether the request does not include an Authorization header */ + this._noAuthorization = !req.headers.authorization; + /** @type {Record|null} Request headers used for Vary matching */ + this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used + /** @type {Record} Parsed Cache-Control directives from request */ + this._reqcc = parseCacheControl(req.headers["cache-control"]); + + // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching, + // so there's no point stricly adhering to the blindly copy&pasted directives. + if ( + this._ignoreCargoCult && + "pre-check" in this._rescc && + "post-check" in this._rescc + ) { + delete this._rescc["pre-check"]; + delete this._rescc["post-check"]; + delete this._rescc["no-cache"]; + delete this._rescc["no-store"]; + delete this._rescc["must-revalidate"]; + this._resHeaders = Object.assign({}, this._resHeaders, { + "cache-control": formatCacheControl(this._rescc), + }); + delete this._resHeaders.expires; + delete this._resHeaders.pragma; } - 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__(6255); - const auth_1 = __nccwpck_require__(5526); - const core_1 = __nccwpck_require__(2186); - 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 + + // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive + // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1). + if ( + res.headers["cache-control"] == null && + /no-cache/.test(res.headers.pragma) + ) { + this._rescc["no-cache"] = true; + } + } + + /** + * You can monkey-patch it for testing. + * @returns {number} Current time in milliseconds. + */ + now() { + return Date.now(); + } + + /** + * Determines if the response is storable in a cache. + * @returns {boolean} `false` if can never be cached. + */ + storable() { + // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it. + return !!( + !this._reqcc["no-store"] && + // A cache MUST NOT store a response to any request, unless: + // The request method is understood by the cache and defined as being cacheable, and + ("GET" === this._method || + "HEAD" === this._method || + ("POST" === this._method && this._hasExplicitExpiration())) && + // the response status code is understood by the cache, and + understoodStatuses.has(this._status) && + // the "no-store" cache directive does not appear in request or response header fields, and + !this._rescc["no-store"] && + // the "private" response directive does not appear in the response, if the cache is shared, and + (!this._isShared || !this._rescc.private) && + // the Authorization header field does not appear in the request, if the cache is shared, + (!this._isShared || + this._noAuthorization || + this._allowsStoringAuthenticated()) && + // the response either: + // contains an Expires header field, or + (this._resHeaders.expires || + // contains a max-age response directive, or + // contains a s-maxage response directive and the cache is shared, or + // contains a public response directive. + this._rescc["max-age"] || + (this._isShared && this._rescc["s-maxage"]) || + this._rescc.public || + // has a status code that is defined as cacheable by default + statusCodeCacheableByDefault.has(this._status)) ); } - 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; + + /** + * @returns {boolean} true if expiration is explicitly defined. + */ + _hasExplicitExpiration() { + // 4.2.1 Calculating Freshness Lifetime + return !!( + (this._isShared && this._rescc["s-maxage"]) || + this._rescc["max-age"] || + this._resHeaders.expires + ); } - 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" - ); + + /** + * @param {HttpRequest} req - a request + * @throws {Error} if the headers are missing. + */ + _assertRequestHasHeaders(req) { + if (!req || !req.headers) { + throw Error("Request headers missing"); } - return runtimeUrl; } - 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.result.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; - }); + + /** + * Checks if the request matches the cache and can be satisfied from the cache immediately, + * without having to make a request to the server. + * + * This doesn't support `stale-while-revalidate`. See `evaluateRequest()` for a more complete solution. + * + * @param {HttpRequest} req - The new incoming HTTP request. + * @returns {boolean} `true`` if the cached response used to construct this cache policy satisfies the request without revalidation. + */ + satisfiesWithoutRevalidation(req) { + const result = this.evaluateRequest(req); + return !result.revalidation; } - 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}`; - } - core_1.debug(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); - return id_token; - } catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); + + /** + * @param {{headers: Record, synchronous: boolean}|undefined} revalidation - Revalidation information, if any. + * @returns {{response: {headers: Record}, revalidation: {headers: Record, synchronous: boolean}|undefined}} An object with a cached response headers and revalidation info. + */ + _evaluateRequestHitResult(revalidation) { + return { + response: { + headers: this.responseHeaders(), + }, + revalidation, + }; } - } - exports.OidcClient = OidcClient; - //# sourceMappingURL=oidc-utils.js.map - /***/ - }, + /** + * @param {HttpRequest} request - new incoming + * @param {boolean} synchronous - whether revalidation must be synchronous (not s-w-r). + * @returns {{headers: Record, synchronous: boolean}} An object with revalidation headers and a synchronous flag. + */ + _evaluateRequestRevalidation(request, synchronous) { + return { + synchronous, + headers: this.revalidationHeaders(request), + }; + } - /***/ 2981: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + /** + * @param {HttpRequest} request - new incoming + * @returns {{response: undefined, revalidation: {headers: Record, synchronous: boolean}}} An object indicating no cached response and revalidation details. + */ + _evaluateRequestMissResult(request) { + return { + response: undefined, + revalidation: this._evaluateRequestRevalidation(request, true), + }; + } - 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]; - }, - }); + /** + * Checks if the given request matches this cache entry, and how the cache can be used to satisfy it. Returns an object with: + * + * ``` + * { + * // If defined, you must send a request to the server. + * revalidation: { + * headers: {}, // HTTP headers to use when sending the revalidation response + * // If true, you MUST wait for a response from the server before using the cache + * // If false, this is stale-while-revalidate. The cache is stale, but you can use it while you update it asynchronously. + * synchronous: bool, + * }, + * // If defined, you can use this cached response. + * response: { + * headers: {}, // Updated cached HTTP headers you must use when responding to the client + * }, + * } + * ``` + * @param {HttpRequest} req - new incoming HTTP request + * @returns {{response: {headers: Record}|undefined, revalidation: {headers: Record, synchronous: boolean}|undefined}} An object containing keys: + * - revalidation: { headers: Record, synchronous: boolean } Set if you should send this to the origin server + * - response: { headers: Record } Set if you can respond to the client with these cached headers + */ + evaluateRequest(req) { + this._assertRequestHasHeaders(req); + + // In all circumstances, a cache MUST NOT ignore the must-revalidate directive + if (this._rescc["must-revalidate"]) { + return this._evaluateRequestMissResult(req); + } + + if (!this._requestMatches(req, false)) { + return this._evaluateRequestMissResult(req); + } + + // When presented with a request, a cache MUST NOT reuse a stored response, unless: + // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive, + // unless the stored response is successfully validated (Section 4.3), and + const requestCC = parseCacheControl(req.headers["cache-control"]); + + if (requestCC["no-cache"] || /no-cache/.test(req.headers.pragma)) { + return this._evaluateRequestMissResult(req); + } + + if ( + requestCC["max-age"] && + this.age() > toNumberOrZero(requestCC["max-age"]) + ) { + return this._evaluateRequestMissResult(req); + } + + if ( + requestCC["min-fresh"] && + this.maxAge() - this.age() < toNumberOrZero(requestCC["min-fresh"]) + ) { + return this._evaluateRequestMissResult(req); + } + + // the stored response is either: + // fresh, or allowed to be served stale + if (this.stale()) { + // If a value is present, then the client is willing to accept a response that has + // exceeded its freshness lifetime by no more than the specified number of seconds + const allowsStaleWithoutRevalidation = + "max-stale" in requestCC && + (true === requestCC["max-stale"] || + requestCC["max-stale"] > this.age() - this.maxAge()); + + if (allowsStaleWithoutRevalidation) { + return this._evaluateRequestHitResult(undefined); } - : 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, - }); + + if (this.useStaleWhileRevalidate()) { + return this._evaluateRequestHitResult( + this._evaluateRequestRevalidation(req, false), + ); } - : 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; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - const path = __importStar(__nccwpck_require__(1017)); - /** - * 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 - /***/ - }, + return this._evaluateRequestMissResult(req); + } - /***/ 1327: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + return this._evaluateRequestHitResult(undefined); + } - 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__(2037); - const fs_1 = __nccwpck_require__(7147); - 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 = ""; + /** + * @param {HttpRequest} req - check if this is for the same cache entry + * @param {boolean} allowHeadMethod - allow a HEAD method to match. + * @returns {boolean} `true` if the request matches. + */ + _requestMatches(req, allowHeadMethod) { + // The presented effective request URI and that of the stored response match, and + return !!( + (!this._url || this._url === req.url) && + this._host === req.headers.host && + // the request method associated with the stored response allows it to be used for the presented request, and + (!req.method || + this._method === req.method || + (allowHeadMethod && "HEAD" === req.method)) && + // selecting header fields nominated by the stored response (if any) match those presented, and + this._varyMatches(req) + ); } + /** - * 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 + * Determines whether storing authenticated responses is allowed. + * @returns {boolean} `true` if allowed. */ - 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; - }); + _allowsStoringAuthenticated() { + // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage. + return !!( + this._rescc["must-revalidate"] || + this._rescc.public || + this._rescc["s-maxage"] + ); } + /** - * 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 + * Checks whether the Vary header in the response matches the new request. + * @param {HttpRequest} req - incoming HTTP request + * @returns {boolean} `true` if the vary headers match. */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(""); - if (!content) { - return `<${tag}${htmlAttrs}>`; + _varyMatches(req) { + if (!this._resHeaders.vary) { + return true; } - return `<${tag}${htmlAttrs}>${content}`; + + // A Vary header field-value of "*" always fails to match + if (this._resHeaders.vary === "*") { + return false; + } + + const fields = this._resHeaders.vary + .trim() + .toLowerCase() + .split(/\s*,\s*/); + for (const name of fields) { + if (req.headers[name] !== this._reqHeaders[name]) return false; + } + return true; } + /** - * 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 + * Creates a copy of the given headers without any hop-by-hop headers. + * @param {Record} inHeaders - old headers from the cached response + * @returns {Record} A new headers object without hop-by-hop headers. */ - 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(); - }); + _copyWithoutHopByHopHeaders(inHeaders) { + /** @type {Record} */ + const headers = {}; + for (const name in inHeaders) { + if (hopByHopHeaders[name]) continue; + headers[name] = inHeaders[name]; + } + // 9.1. Connection + if (inHeaders.connection) { + const tokens = inHeaders.connection.trim().split(/\s*,\s*/); + for (const name of tokens) { + delete headers[name]; + } + } + if (headers.warning) { + const warnings = headers.warning.split(/,/).filter((warning) => { + return !/^\s*1[0-9][0-9]/.test(warning); + }); + if (!warnings.length) { + delete headers.warning; + } else { + headers.warning = warnings.join(",").trim(); + } + } + return headers; } + /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance + * Returns the response headers adjusted for serving the cached response. + * Removes hop-by-hop headers and updates the Age and Date headers. + * @returns {Record} The adjusted response headers. */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); + responseHeaders() { + const headers = this._copyWithoutHopByHopHeaders(this._resHeaders); + const age = this.age(); + + // A cache SHOULD generate 113 warning if it heuristically chose a freshness + // lifetime greater than 24 hours and the response's age is greater than 24 hours. + if ( + age > 3600 * 24 && + !this._hasExplicitExpiration() && + this.maxAge() > 3600 * 24 + ) { + headers.warning = + (headers.warning ? `${headers.warning}, ` : "") + + '113 - "rfc7234 5.5.4"'; + } + headers.age = `${Math.round(age)}`; + headers.date = new Date(this.now()).toUTCString(); + return headers; } + /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer + * Returns the Date header value from the response or the current time if invalid. + * @returns {number} Timestamp (in milliseconds) representing the Date header or response time. */ - stringify() { - return this._buffer; + date() { + const serverDate = Date.parse(this._resHeaders.date); + if (isFinite(serverDate)) { + return serverDate; + } + return this._responseTime; } + /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty + * Value of the Age header, in seconds, updated for the current time. + * May be fractional. + * @returns {number} The age in seconds. */ - isEmptyBuffer() { - return this._buffer.length === 0; + age() { + let age = this._ageValue(); + + const residentTime = (this.now() - this._responseTime) / 1000; + return age + residentTime; } + /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance + * @returns {number} The Age header value as a number. */ - emptyBuffer() { - this._buffer = ""; - return this; + _ageValue() { + return toNumberOrZero(this._resHeaders.age); } + /** - * Adds raw text to the summary buffer + * Possibly outdated value of applicable max-age (or heuristic equivalent) in seconds. + * This counts since response's `Date`. * - * @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) + * For an up-to-date value, see `timeToLive()`. * - * @returns {Summary} summary instance + * Returns the maximum age (freshness lifetime) of the response in seconds. + * @returns {number} The max-age value in seconds. */ - 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(); + maxAge() { + if (!this.storable() || this._rescc["no-cache"]) { + return 0; + } + + // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default + // so this implementation requires explicit opt-in via public header + if ( + this._isShared && + this._resHeaders["set-cookie"] && + !this._rescc.public && + !this._rescc.immutable + ) { + return 0; + } + + if (this._resHeaders.vary === "*") { + return 0; + } + + if (this._isShared) { + if (this._rescc["proxy-revalidate"]) { + return 0; + } + // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field. + if (this._rescc["s-maxage"]) { + return toNumberOrZero(this._rescc["s-maxage"]); + } + } + + // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field. + if (this._rescc["max-age"]) { + return toNumberOrZero(this._rescc["max-age"]); + } + + const defaultMinTtl = this._rescc.immutable + ? this._immutableMinTtl + : 0; + + const serverDate = this.date(); + if (this._resHeaders.expires) { + const expires = Date.parse(this._resHeaders.expires); + // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). + if (Number.isNaN(expires) || expires < serverDate) { + return 0; + } + return Math.max(defaultMinTtl, (expires - serverDate) / 1000); + } + + if (this._resHeaders["last-modified"]) { + const lastModified = Date.parse(this._resHeaders["last-modified"]); + if (isFinite(lastModified) && serverDate > lastModified) { + return Math.max( + defaultMinTtl, + ((serverDate - lastModified) / 1000) * this._cacheHeuristic, + ); + } + } + + return defaultMinTtl; } + /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows + * Remaining time this cache entry may be useful for, in *milliseconds*. + * You can use this as an expiration time for your cache storage. * - * @returns {Summary} summary instance + * Prefer this method over `maxAge()`, because it includes other factors like `age` and `stale-while-revalidate`. + * @returns {number} Time-to-live in milliseconds. */ - 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(); + timeToLive() { + const age = this.maxAge() - this.age(); + const staleIfErrorAge = + age + toNumberOrZero(this._rescc["stale-if-error"]); + const staleWhileRevalidateAge = + age + toNumberOrZero(this._rescc["stale-while-revalidate"]); + return Math.round( + Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1000, + ); } + /** - * 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 + * If true, this cache entry is past its expiration date. + * Note that stale cache may be useful sometimes, see `evaluateRequest()`. + * @returns {boolean} `false` doesn't mean it's fresh nor usable */ - addDetails(label, content) { - const element = this.wrap( - "details", - this.wrap("summary", label) + content - ); - return this.addRaw(element).addEOL(); + stale() { + return this.maxAge() <= this.age(); } + /** - * 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 + * @returns {boolean} `true` if `stale-if-error` condition allows use of a stale response. */ - 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) + _useStaleIfError() { + return ( + this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > + this.age() ); - 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 + + /** See `evaluateRequest()` for a more complete solution + * @returns {boolean} `true` if `stale-while-revalidate` is currently allowed. */ - 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(); + useStaleWhileRevalidate() { + const swr = toNumberOrZero(this._rescc["stale-while-revalidate"]); + return swr > 0 && this.maxAge() + swr > this.age(); } + /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance + * Creates a `CachePolicy` instance from a serialized object. + * @param {Object} obj - The serialized object. + * @returns {CachePolicy} A new CachePolicy instance. */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); + static fromObject(obj) { + return new this(undefined, undefined, { _fromObject: obj }); } + /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance + * @param {any} obj - The serialized object. + * @throws {Error} If already initialized or if the object is invalid. */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); + _fromObject(obj) { + if (this._responseTime) throw Error("Reinitialized"); + if (!obj || obj.v !== 1) throw Error("Invalid serialization"); + + this._responseTime = obj.t; + this._isShared = obj.sh; + this._cacheHeuristic = obj.ch; + this._immutableMinTtl = + obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000; + this._ignoreCargoCult = !!obj.icc; + this._status = obj.st; + this._resHeaders = obj.resh; + this._rescc = obj.rescc; + this._method = obj.m; + this._url = obj.u; + this._host = obj.h; + this._noAuthorization = obj.a; + this._reqHeaders = obj.reqh; + this._reqcc = obj.reqcc; } + /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance + * Serializes the `CachePolicy` instance into a JSON-serializable object. + * @returns {Object} The serialized object. */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); + toObject() { + return { + v: 1, + t: this._responseTime, + sh: this._isShared, + ch: this._cacheHeuristic, + imm: this._immutableMinTtl, + icc: this._ignoreCargoCult, + st: this._status, + resh: this._resHeaders, + rescc: this._rescc, + m: this._method, + u: this._url, + h: this._host, + a: this._noAuthorization, + reqh: this._reqHeaders, + reqcc: this._reqcc, + }; } + /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink + * Headers for sending to the origin server to revalidate stale response. + * Allows server to return 304 to allow reuse of the previous response. * - * @returns {Summary} summary instance + * Hop by hop headers are always stripped. + * Revalidation headers may be added or removed, depending on request. + * @param {HttpRequest} incomingReq - The incoming HTTP request. + * @returns {Record} The headers for the revalidation request. */ - 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 - - /***/ - }, + revalidationHeaders(incomingReq) { + this._assertRequestHasHeaders(incomingReq); + const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); - /***/ 5278: /***/ (__unused_webpack_module, exports) => { - "use strict"; + // This implementation does not understand range requests + delete headers["if-range"]; - // 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 {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn, - }; - } - exports.toCommandProperties = toCommandProperties; - //# sourceMappingURL=utils.js.map + if (!this._requestMatches(incomingReq, true) || !this.storable()) { + // revalidation allowed via HEAD + // not for the same resource, or wasn't allowed to be cached anyway + delete headers["if-none-match"]; + delete headers["if-modified-since"]; + return headers; + } - /***/ - }, + /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */ + if (this._resHeaders.etag) { + headers["if-none-match"] = headers["if-none-match"] + ? `${headers["if-none-match"]}, ${this._resHeaders.etag}` + : this._resHeaders.etag; + } - /***/ 8974: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request. + const forbidsWeakValidators = + headers["accept-ranges"] || + headers["if-match"] || + headers["if-unmodified-since"] || + (this._method && this._method != "GET"); - Object.defineProperty(exports, "__esModule", { - value: true, - }); - Object.defineProperty(exports, "v1", { - enumerable: true, - get: function () { - return _v.default; - }, - }); - Object.defineProperty(exports, "v3", { - enumerable: true, - get: function () { - return _v2.default; - }, - }); - Object.defineProperty(exports, "v4", { - enumerable: true, - get: function () { - return _v3.default; - }, - }); - Object.defineProperty(exports, "v5", { - enumerable: true, - get: function () { - return _v4.default; - }, - }); - Object.defineProperty(exports, "NIL", { - enumerable: true, - get: function () { - return _nil.default; - }, - }); - Object.defineProperty(exports, "version", { - enumerable: true, - get: function () { - return _version.default; - }, - }); - Object.defineProperty(exports, "validate", { - enumerable: true, - get: function () { - return _validate.default; - }, - }); - Object.defineProperty(exports, "stringify", { - enumerable: true, - get: function () { - return _stringify.default; - }, - }); - Object.defineProperty(exports, "parse", { - enumerable: true, - get: function () { - return _parse.default; - }, - }); + /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server. + Note: This implementation does not understand partial responses (206) */ + if (forbidsWeakValidators) { + delete headers["if-modified-since"]; - var _v = _interopRequireDefault(__nccwpck_require__(1595)); + if (headers["if-none-match"]) { + const etags = headers["if-none-match"] + .split(/,/) + .filter((etag) => { + return !/^\s*W\//.test(etag); + }); + if (!etags.length) { + delete headers["if-none-match"]; + } else { + headers["if-none-match"] = etags.join(",").trim(); + } + } + } else if ( + this._resHeaders["last-modified"] && + !headers["if-modified-since"] + ) { + headers["if-modified-since"] = this._resHeaders["last-modified"]; + } - var _v2 = _interopRequireDefault(__nccwpck_require__(6993)); + return headers; + } - var _v3 = _interopRequireDefault(__nccwpck_require__(1472)); + /** + * Creates new CachePolicy with information combined from the previews response, + * and the new revalidation response. + * + * Returns {policy, modified} where modified is a boolean indicating + * whether the response body has been modified, and old cached body can't be used. + * + * @param {HttpRequest} request - The latest HTTP request asking for the cached entry. + * @param {HttpResponse} response - The latest revalidation HTTP response from the origin server. + * @returns {{policy: CachePolicy, modified: boolean, matches: boolean}} The updated policy and modification status. + * @throws {Error} If the response headers are missing. + */ + revalidatedPolicy(request, response) { + this._assertRequestHasHeaders(request); - var _v4 = _interopRequireDefault(__nccwpck_require__(6217)); + if (this._useStaleIfError() && isErrorResponse(response)) { + return { + policy: this, + modified: false, + matches: true, + }; + } - var _nil = _interopRequireDefault(__nccwpck_require__(2381)); + if (!response || !response.headers) { + throw Error("Response headers missing"); + } - var _version = _interopRequireDefault(__nccwpck_require__(427)); + // These aren't going to be supported exactly, since one CachePolicy object + // doesn't know about all the other cached objects. + let matches = false; + if (response.status !== undefined && response.status != 304) { + matches = false; + } else if ( + response.headers.etag && + !/^\s*W\//.test(response.headers.etag) + ) { + // "All of the stored responses with the same strong validator are selected. + // If none of the stored responses contain the same strong validator, + // then the cache MUST NOT use the new response to update any stored responses." + matches = + this._resHeaders.etag && + this._resHeaders.etag.replace(/^\s*W\//, "") === + response.headers.etag; + } else if (this._resHeaders.etag && response.headers.etag) { + // "If the new response contains a weak validator and that validator corresponds + // to one of the cache's stored responses, + // then the most recent of those matching stored responses is selected for update." + matches = + this._resHeaders.etag.replace(/^\s*W\//, "") === + response.headers.etag.replace(/^\s*W\//, ""); + } else if (this._resHeaders["last-modified"]) { + matches = + this._resHeaders["last-modified"] === + response.headers["last-modified"]; + } else { + // If the new response does not include any form of validator (such as in the case where + // a client generates an If-Modified-Since request from a source other than the Last-Modified + // response header field), and there is only one stored response, and that stored response also + // lacks a validator, then that stored response is selected for update. + if ( + !this._resHeaders.etag && + !this._resHeaders["last-modified"] && + !response.headers.etag && + !response.headers["last-modified"] + ) { + matches = true; + } + } - var _validate = _interopRequireDefault(__nccwpck_require__(2609)); + const optionsCopy = { + shared: this._isShared, + cacheHeuristic: this._cacheHeuristic, + immutableMinTimeToLive: this._immutableMinTtl, + ignoreCargoCult: this._ignoreCargoCult, + }; - var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); + if (!matches) { + return { + policy: new this.constructor(request, response, optionsCopy), + // Client receiving 304 without body, even if it's invalid/mismatched has no option + // but to reuse a cached body. We don't have a good way to tell clients to do + // error recovery in such case. + modified: response.status != 304, + matches: false, + }; + } - var _parse = _interopRequireDefault(__nccwpck_require__(6385)); + // use other header fields provided in the 304 (Not Modified) response to replace all instances + // of the corresponding header fields in the stored response. + const headers = {}; + for (const k in this._resHeaders) { + headers[k] = + k in response.headers && !excludedFromRevalidationUpdate[k] + ? response.headers[k] + : this._resHeaders[k]; + } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + const newResponse = Object.assign({}, response, { + status: this._status, + method: this._method, + headers, + }); + return { + policy: new this.constructor(request, newResponse, optionsCopy), + modified: false, + matches: true, + }; + } + }; /***/ }, - /***/ 5842: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ + /***/ 685: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, ) => { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; - - var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // See https://github.com/facebook/jest/issues/2549 + // eslint-disable-next-line node/prefer-global/url + const { URL } = __nccwpck_require__(7016); + const EventEmitter = __nccwpck_require__(4434); + const tls = __nccwpck_require__(4756); + const http2 = __nccwpck_require__(5675); + const QuickLRU = __nccwpck_require__(5475); + const delayAsyncDestroy = __nccwpck_require__(811); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + const kCurrentStreamCount = Symbol("currentStreamCount"); + const kRequest = Symbol("request"); + const kOriginSet = Symbol("cachedOriginSet"); + const kGracefullyClosing = Symbol("gracefullyClosing"); + const kLength = Symbol("length"); - function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } + const nameKeys = [ + // Not an Agent option actually + "createConnection", - return _crypto.default.createHash("md5").update(bytes).digest(); - } + // `http2.connect()` options + "maxDeflateDynamicTableSize", + "maxSettings", + "maxSessionMemory", + "maxHeaderListPairs", + "maxOutstandingPings", + "maxReservedRemoteStreams", + "maxSendHeaderBlockLength", + "paddingStrategy", + "peerMaxConcurrentStreams", + "settings", - var _default = md5; - exports["default"] = _default; + // `tls.connect()` source options + "family", + "localAddress", + "rejectUnauthorized", - /***/ - }, + // `tls.connect()` secure context options + "pskCallback", + "minDHSize", - /***/ 2381: /***/ (__unused_webpack_module, exports) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; - var _default = "00000000-0000-0000-0000-000000000000"; - exports["default"] = _default; - - /***/ - }, - - /***/ 6385: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + // `tls.connect()` destination options + // - `servername` is automatically validated, skip it + // - `host` and `port` just describe the destination server, + "path", + "socket", - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + // `tls.createSecureContext()` options + "ca", + "cert", + "sigalgs", + "ciphers", + "clientCertEngine", + "crl", + "dhparam", + "ecdhCurve", + "honorCipherOrder", + "key", + "privateKeyEngine", + "privateKeyIdentifier", + "maxVersion", + "minVersion", + "pfx", + "secureOptions", + "secureProtocol", + "sessionIdContext", + "ticketKeys", + ]; - var _validate = _interopRequireDefault(__nccwpck_require__(2609)); + const getSortedIndex = (array, value, compare) => { + let low = 0; + let high = array.length; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + while (low < high) { + const mid = (low + high) >>> 1; - function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError("Invalid UUID"); + if (compare(array[mid], value)) { + low = mid + 1; + } else { + high = mid; + } } - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + return low; + }; - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = (v >>> 16) & 0xff; - arr[2] = (v >>> 8) & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ + const compareSessions = (a, b) => + a.remoteSettings.maxConcurrentStreams > + b.remoteSettings.maxConcurrentStreams; - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ + // See https://tools.ietf.org/html/rfc8336 + const closeCoveredSessions = (where, session) => { + // Clients SHOULD NOT emit new requests on any connection whose Origin + // Set is a proper subset of another connection's Origin Set, and they + // SHOULD close it once all outstanding requests are satisfied. + for (let index = 0; index < where.length; index++) { + const coveredSession = where[index]; - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ + if ( + // Unfortunately `.every()` returns true for an empty array + coveredSession[kOriginSet].length > 0 && + // The set is a proper subset when its length is less than the other set. + coveredSession[kOriginSet].length < session[kOriginSet].length && + // And the other set includes all elements of the subset. + coveredSession[kOriginSet].every((origin) => + session[kOriginSet].includes(origin), + ) && + // Makes sure that the session can handle all requests from the covered session. + coveredSession[kCurrentStreamCount] + + session[kCurrentStreamCount] <= + session.remoteSettings.maxConcurrentStreams + ) { + // This allows pending requests to finish and prevents making new requests. + gracefullyClose(coveredSession); + } + } + }; - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + // This is basically inverted `closeCoveredSessions(...)`. + const closeSessionIfCovered = (where, coveredSession) => { + for (let index = 0; index < where.length; index++) { + const session = where[index]; - arr[10] = - ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff; - arr[11] = (v / 0x100000000) & 0xff; - arr[12] = (v >>> 24) & 0xff; - arr[13] = (v >>> 16) & 0xff; - arr[14] = (v >>> 8) & 0xff; - arr[15] = v & 0xff; - return arr; - } + if ( + coveredSession[kOriginSet].length > 0 && + coveredSession[kOriginSet].length < session[kOriginSet].length && + coveredSession[kOriginSet].every((origin) => + session[kOriginSet].includes(origin), + ) && + coveredSession[kCurrentStreamCount] + + session[kCurrentStreamCount] <= + session.remoteSettings.maxConcurrentStreams + ) { + gracefullyClose(coveredSession); - var _default = parse; - exports["default"] = _default; + return true; + } + } - /***/ - }, + return false; + }; - /***/ 6230: /***/ (__unused_webpack_module, exports) => { - "use strict"; + const gracefullyClose = (session) => { + session[kGracefullyClosing] = true; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; - var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; - exports["default"] = _default; + if (session[kCurrentStreamCount] === 0) { + session.close(); + } + }; - /***/ - }, + class Agent extends EventEmitter { + constructor({ + timeout = 0, + maxSessions = Number.POSITIVE_INFINITY, + maxEmptySessions = 10, + maxCachedTlsSessions = 100, + } = {}) { + super(); - /***/ 9784: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + // SESSIONS[NORMALIZED_OPTIONS] = []; + this.sessions = {}; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = rng; + // The queue for creating new sessions. It looks like this: + // QUEUE[NORMALIZED_OPTIONS][NORMALIZED_ORIGIN] = ENTRY_FUNCTION + // + // It's faster when there are many origins. If there's only one, then QUEUE[`${options}:${origin}`] is faster. + // I guess object creation / deletion is causing the slowdown. + // + // The entry function has `listeners`, `completed` and `destroyed` properties. + // `listeners` is an array of objects containing `resolve` and `reject` functions. + // `completed` is a boolean. It's set to true after ENTRY_FUNCTION is executed. + // `destroyed` is a boolean. If it's set to true, the session will be destroyed if hasn't connected yet. + this.queue = {}; - var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // Each session will use this timeout value. + this.timeout = timeout; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + // Max sessions in total + this.maxSessions = maxSessions; - const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + // Max empty sessions in total + this.maxEmptySessions = maxEmptySessions; - let poolPtr = rnds8Pool.length; + this._emptySessionCount = 0; + this._sessionCount = 0; - function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); + // We don't support push streams by default. + this.settings = { + enablePush: false, + initialWindowSize: 1024 * 1024 * 32, // 32MB, see https://github.com/nodejs/node/issues/38426 + }; - poolPtr = 0; + // Reusing TLS sessions increases performance. + this.tlsSessionCache = new QuickLRU({ + maxSize: maxCachedTlsSessions, + }); } - return rnds8Pool.slice(poolPtr, (poolPtr += 16)); - } - - /***/ - }, + get protocol() { + return "https:"; + } - /***/ 8844: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + normalizeOptions(options) { + let normalized = ""; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + for (let index = 0; index < nameKeys.length; index++) { + const key = nameKeys[index]; - var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + normalized += ":"; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + if (options && options[key] !== undefined) { + normalized += options[key]; + } + } - function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); + return normalized; } - return _crypto.default.createHash("sha1").update(bytes).digest(); - } + _processQueue() { + if (this._sessionCount >= this.maxSessions) { + this.closeEmptySessions(this.maxSessions - this._sessionCount + 1); + return; + } - var _default = sha1; - exports["default"] = _default; + // eslint-disable-next-line guard-for-in + for (const normalizedOptions in this.queue) { + // eslint-disable-next-line guard-for-in + for (const normalizedOrigin in this.queue[normalizedOptions]) { + const item = this.queue[normalizedOptions][normalizedOrigin]; - /***/ - }, + // The entry function can be run only once. + if (!item.completed) { + item.completed = true; - /***/ 1458: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + item(); + } + } + } + } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + _isBetterSession(thisStreamCount, thatStreamCount) { + return thisStreamCount > thatStreamCount; + } - var _validate = _interopRequireDefault(__nccwpck_require__(2609)); + _accept(session, listeners, normalizedOrigin, options) { + let index = 0; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + while ( + index < listeners.length && + session[kCurrentStreamCount] < + session.remoteSettings.maxConcurrentStreams + ) { + // We assume `resolve(...)` calls `request(...)` *directly*, + // otherwise the session will get overloaded. + listeners[index].resolve(session); - /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - const byteToHex = []; - - for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); - } - - function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = ( - byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - "-" + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - "-" + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - "-" + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - "-" + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]] - ).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError("Stringified UUID is invalid"); - } - - return uuid; - } - - var _default = stringify; - exports["default"] = _default; + index++; + } - /***/ - }, + listeners.splice(0, index); - /***/ 1595: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + if (listeners.length > 0) { + this.getSession(normalizedOrigin, options, listeners); + listeners.length = 0; + } + } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + getSession(origin, options, listeners) { + return new Promise((resolve, reject) => { + if (Array.isArray(listeners) && listeners.length > 0) { + listeners = [...listeners]; - var _rng = _interopRequireDefault(__nccwpck_require__(9784)); + // Resolve the current promise ASAP, we're just moving the listeners. + // They will be executed at a different time. + resolve(); + } else { + listeners = [{ resolve, reject }]; + } - var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); + try { + // Parse origin + if (typeof origin === "string") { + origin = new URL(origin); + } else if (!(origin instanceof URL)) { + throw new TypeError( + "The `origin` argument needs to be a string or an URL object", + ); + } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + if (options) { + // Validate servername + const { servername } = options; + const { hostname } = origin; + if (servername && hostname !== servername) { + throw new Error( + `Origin ${hostname} differs from servername ${servername}`, + ); + } + } + } catch (error) { + for (let index = 0; index < listeners.length; index++) { + listeners[index].reject(error); + } - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - let _nodeId; - - let _clockseq; // Previous uuid creation time - - let _lastMSecs = 0; - let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - - function v1(options, buf, offset) { - let i = (buf && offset) || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = - options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], - seedBytes[2], - seedBytes[3], - seedBytes[4], - seedBytes[5], - ]; - } + return; + } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = - ((seedBytes[6] << 8) | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + const normalizedOptions = this.normalizeOptions(options); + const normalizedOrigin = origin.origin; - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock + if (normalizedOptions in this.sessions) { + const sessions = this.sessions[normalizedOptions]; - let nsecs = - options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + let maxConcurrentStreams = -1; + let currentStreamsCount = -1; + let optimalSession; - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + // We could just do this.sessions[normalizedOptions].find(...) but that isn't optimal. + // Additionally, we are looking for session which has biggest current pending streams count. + // + // |------------| |------------| |------------| |------------| + // | Session: A | | Session: B | | Session: C | | Session: D | + // | Pending: 5 |-| Pending: 8 |-| Pending: 9 |-| Pending: 4 | + // | Max: 10 | | Max: 10 | | Max: 9 | | Max: 5 | + // |------------| |------------| |------------| |------------| + // ^ + // | + // pick this one -- + // + for (let index = 0; index < sessions.length; index++) { + const session = sessions[index]; - if (dt < 0 && options.clockseq === undefined) { - clockseq = (clockseq + 1) & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval + const sessionMaxConcurrentStreams = + session.remoteSettings.maxConcurrentStreams; - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested + if (sessionMaxConcurrentStreams < maxConcurrentStreams) { + break; + } - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } + if (!session[kOriginSet].includes(normalizedOrigin)) { + continue; + } - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + const sessionCurrentStreamsCount = session[kCurrentStreamCount]; - msecs += 12219292800000; // `time_low` + if ( + sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || + session[kGracefullyClosing] || + // Unfortunately the `close` event isn't called immediately, + // so `session.destroyed` is `true`, but `session.closed` is `false`. + session.destroyed + ) { + continue; + } - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = (tl >>> 24) & 0xff; - b[i++] = (tl >>> 16) & 0xff; - b[i++] = (tl >>> 8) & 0xff; - b[i++] = tl & 0xff; // `time_mid` + // We only need set this once. + if (!optimalSession) { + maxConcurrentStreams = sessionMaxConcurrentStreams; + } - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - b[i++] = (tmh >>> 8) & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` + // Either get the session which has biggest current stream count or the lowest. + if ( + this._isBetterSession( + sessionCurrentStreamsCount, + currentStreamsCount, + ) + ) { + optimalSession = session; + currentStreamsCount = sessionCurrentStreamsCount; + } + } - b[i++] = ((tmh >>> 24) & 0xf) | 0x10; // include version + if (optimalSession) { + this._accept( + optimalSession, + listeners, + normalizedOrigin, + options, + ); + return; + } + } - b[i++] = (tmh >>> 16) & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + if (normalizedOptions in this.queue) { + if (normalizedOrigin in this.queue[normalizedOptions]) { + // There's already an item in the queue, just attach ourselves to it. + this.queue[normalizedOptions][normalizedOrigin].listeners.push( + ...listeners, + ); + return; + } + } else { + this.queue[normalizedOptions] = { + [kLength]: 0, + }; + } - b[i++] = (clockseq >>> 8) | 0x80; // `clock_seq_low` + // The entry must be removed from the queue IMMEDIATELY when: + // 1. the session connects successfully, + // 2. an error occurs. + const removeFromQueue = () => { + // Our entry can be replaced. We cannot remove the new one. + if ( + normalizedOptions in this.queue && + this.queue[normalizedOptions][normalizedOrigin] === entry + ) { + delete this.queue[normalizedOptions][normalizedOrigin]; - b[i++] = clockseq & 0xff; // `node` + if (--this.queue[normalizedOptions][kLength] === 0) { + delete this.queue[normalizedOptions]; + } + } + }; - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } + // The main logic is here + const entry = async () => { + this._sessionCount++; - return buf || (0, _stringify.default)(b); - } + const name = `${normalizedOrigin}:${normalizedOptions}`; + let receivedSettings = false; + let socket; - var _default = v1; - exports["default"] = _default; + try { + const computedOptions = { ...options }; - /***/ - }, + if (computedOptions.settings === undefined) { + computedOptions.settings = this.settings; + } - /***/ 6993: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + if (computedOptions.session === undefined) { + computedOptions.session = this.tlsSessionCache.get(name); + } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + const createConnection = + computedOptions.createConnection || this.createConnection; - var _v = _interopRequireDefault(__nccwpck_require__(5920)); + // A hacky workaround to enable async `createConnection` + socket = await createConnection.call( + this, + origin, + computedOptions, + ); + computedOptions.createConnection = () => socket; - var _md = _interopRequireDefault(__nccwpck_require__(5842)); + const session = http2.connect(origin, computedOptions); + session[kCurrentStreamCount] = 0; + session[kGracefullyClosing] = false; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + // Node.js return https://false:443 instead of https://1.1.1.1:443 + const getOriginSet = () => { + const { socket } = session; - const v3 = (0, _v.default)("v3", 0x30, _md.default); - var _default = v3; - exports["default"] = _default; + let originSet; + if (socket.servername === false) { + socket.servername = socket.remoteAddress; + originSet = session.originSet; + socket.servername = false; + } else { + originSet = session.originSet; + } - /***/ - }, + return originSet; + }; - /***/ 5920: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + const isFree = () => + session[kCurrentStreamCount] < + session.remoteSettings.maxConcurrentStreams; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = _default; - exports.URL = exports.DNS = void 0; + session.socket.once("session", (tlsSession) => { + this.tlsSessionCache.set(name, tlsSession); + }); - var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); + session.once("error", (error) => { + // Listeners are empty when the session successfully connected. + for (let index = 0; index < listeners.length; index++) { + listeners[index].reject(error); + } - var _parse = _interopRequireDefault(__nccwpck_require__(6385)); + // The connection got broken, purge the cache. + this.tlsSessionCache.delete(name); + }); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + session.setTimeout(this.timeout, () => { + // Terminates all streams owned by this session. + session.destroy(); + }); - function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape + session.once("close", () => { + this._sessionCount--; - const bytes = []; + if (receivedSettings) { + // Assumes session `close` is emitted after request `close` + this._emptySessionCount--; - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } + // This cannot be moved to the stream logic, + // because there may be a session that hadn't made a single request. + const where = this.sessions[normalizedOptions]; - return bytes; - } + if (where.length === 1) { + delete this.sessions[normalizedOptions]; + } else { + where.splice(where.indexOf(session), 1); + } + } else { + // Broken connection + removeFromQueue(); - const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; - exports.DNS = DNS; - const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - exports.URL = URL; + const error = new Error( + "Session closed without receiving a SETTINGS frame", + ); + error.code = "HTTP2WRAPPER_NOSETTINGS"; - function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === "string") { - value = stringToBytes(value); - } + for (let index = 0; index < listeners.length; index++) { + listeners[index].reject(error); + } + } - if (typeof namespace === "string") { - namespace = (0, _parse.default)(namespace); - } + // There may be another session awaiting. + this._processQueue(); + }); - if (namespace.length !== 16) { - throw TypeError( - "Namespace must be array-like (16 iterable integer values, 0-255)" - ); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` + // Iterates over the queue and processes listeners. + const processListeners = () => { + const queue = this.queue[normalizedOptions]; + if (!queue) { + return; + } - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; + const originSet = session[kOriginSet]; - if (buf) { - offset = offset || 0; + for (let index = 0; index < originSet.length; index++) { + const origin = originSet[index]; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } + if (origin in queue) { + const { listeners, completed } = queue[origin]; - return buf; - } + let index = 0; - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) + // Prevents session overloading. + while (index < listeners.length && isFree()) { + // We assume `resolve(...)` calls `request(...)` *directly*, + // otherwise the session will get overloaded. + listeners[index].resolve(session); - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support + index++; + } - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; - } + queue[origin].listeners.splice(0, index); - /***/ - }, + if (queue[origin].listeners.length === 0 && !completed) { + delete queue[origin]; - /***/ 1472: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + if (--queue[kLength] === 0) { + delete this.queue[normalizedOptions]; + break; + } + } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + // We're no longer free, no point in continuing. + if (!isFree()) { + break; + } + } + } + }; - var _rng = _interopRequireDefault(__nccwpck_require__(9784)); + // The Origin Set cannot shrink. No need to check if it suddenly became covered by another one. + session.on("origin", () => { + session[kOriginSet] = getOriginSet() || []; + session[kGracefullyClosing] = false; + closeSessionIfCovered( + this.sessions[normalizedOptions], + session, + ); - var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); + if (session[kGracefullyClosing] || !isFree()) { + return; + } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + processListeners(); - function v4(options, buf, offset) { - options = options || {}; + if (!isFree()) { + return; + } - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + // Close covered sessions (if possible). + closeCoveredSessions( + this.sessions[normalizedOptions], + session, + ); + }); - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; // Copy bytes to buffer, if provided + session.once("remoteSettings", () => { + // The Agent could have been destroyed already. + if (entry.destroyed) { + const error = new Error("Agent has been destroyed"); - if (buf) { - offset = offset || 0; + for (let index = 0; index < listeners.length; index++) { + listeners[index].reject(error); + } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } + session.destroy(); + return; + } - return buf; - } + // See https://github.com/nodejs/node/issues/38426 + if (session.setLocalWindowSize) { + session.setLocalWindowSize(1024 * 1024 * 4); // 4 MB + } - return (0, _stringify.default)(rnds); - } + session[kOriginSet] = getOriginSet() || []; - var _default = v4; - exports["default"] = _default; + if (session.socket.encrypted) { + const mainOrigin = session[kOriginSet][0]; + if (mainOrigin !== normalizedOrigin) { + const error = new Error( + `Requested origin ${normalizedOrigin} does not match server ${mainOrigin}`, + ); - /***/ - }, + for (let index = 0; index < listeners.length; index++) { + listeners[index].reject(error); + } - /***/ 6217: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + session.destroy(); + return; + } + } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + removeFromQueue(); - var _v = _interopRequireDefault(__nccwpck_require__(5920)); + { + const where = this.sessions; - var _sha = _interopRequireDefault(__nccwpck_require__(8844)); + if (normalizedOptions in where) { + const sessions = where[normalizedOptions]; + sessions.splice( + getSortedIndex(sessions, session, compareSessions), + 0, + session, + ); + } else { + where[normalizedOptions] = [session]; + } + } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + receivedSettings = true; + this._emptySessionCount++; - const v5 = (0, _v.default)("v5", 0x50, _sha.default); - var _default = v5; - exports["default"] = _default; + this.emit("session", session); + this._accept(session, listeners, normalizedOrigin, options); - /***/ - }, + if ( + session[kCurrentStreamCount] === 0 && + this._emptySessionCount > this.maxEmptySessions + ) { + this.closeEmptySessions( + this._emptySessionCount - this.maxEmptySessions, + ); + } - /***/ 2609: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + // `session.remoteSettings.maxConcurrentStreams` might get increased + session.on("remoteSettings", () => { + if (!isFree()) { + return; + } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + processListeners(); - var _regex = _interopRequireDefault(__nccwpck_require__(6230)); + if (!isFree()) { + return; + } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + // In case the Origin Set changes + closeCoveredSessions( + this.sessions[normalizedOptions], + session, + ); + }); + }); - function validate(uuid) { - return typeof uuid === "string" && _regex.default.test(uuid); - } + // Shim `session.request()` in order to catch all streams + session[kRequest] = session.request; + session.request = (headers, streamOptions) => { + if (session[kGracefullyClosing]) { + throw new Error( + "The session is gracefully closing. No new streams are allowed.", + ); + } - var _default = validate; - exports["default"] = _default; + const stream = session[kRequest](headers, streamOptions); - /***/ - }, + // The process won't exit until the session is closed or all requests are gone. + session.ref(); - /***/ 427: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + if (session[kCurrentStreamCount]++ === 0) { + this._emptySessionCount--; + } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + stream.once("close", () => { + if (--session[kCurrentStreamCount] === 0) { + this._emptySessionCount++; + session.unref(); + + if ( + this._emptySessionCount > this.maxEmptySessions || + session[kGracefullyClosing] + ) { + session.close(); + return; + } + } - var _validate = _interopRequireDefault(__nccwpck_require__(2609)); + if (session.destroyed || session.closed) { + return; + } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + if ( + isFree() && + !closeSessionIfCovered( + this.sessions[normalizedOptions], + session, + ) + ) { + closeCoveredSessions( + this.sessions[normalizedOptions], + session, + ); + processListeners(); + + if (session[kCurrentStreamCount] === 0) { + this._processQueue(); + } + } + }); + + return stream; + }; + } catch (error) { + removeFromQueue(); + this._sessionCount--; + + for (let index = 0; index < listeners.length; index++) { + listeners[index].reject(error); + } + } + }; + + entry.listeners = listeners; + entry.completed = false; + entry.destroyed = false; - function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError("Invalid UUID"); + this.queue[normalizedOptions][normalizedOrigin] = entry; + this.queue[normalizedOptions][kLength]++; + this._processQueue(); + }); } - return parseInt(uuid.substr(14, 1), 16); - } + request(origin, options, headers, streamOptions) { + return new Promise((resolve, reject) => { + this.getSession(origin, options, [ + { + reject, + resolve: (session) => { + try { + const stream = session.request(headers, streamOptions); - var _default = version; - exports["default"] = _default; + // Do not throw before `request(...)` has been awaited + delayAsyncDestroy(stream); - /***/ - }, + resolve(stream); + } catch (error) { + reject(error); + } + }, + }, + ]); + }); + } - /***/ 5526: /***/ function (__unused_webpack_module, exports) { - "use strict"; + async createConnection(origin, options) { + return Agent.connect(origin, options); + } - 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); + static connect(origin, options) { + options.ALPNProtocols = ["h2"]; + + const port = origin.port || 443; + const host = origin.hostname; + + if (typeof options.servername === "undefined") { + options.servername = host; + } + + const socket = tls.connect(port, host, options); + + if (options.socket) { + socket._peername = { + family: undefined, + address: undefined, + port, + }; + } + + return socket; + } + + closeEmptySessions(maxCount = Number.POSITIVE_INFINITY) { + let closedCount = 0; + + const { sessions } = this; + + // eslint-disable-next-line guard-for-in + for (const key in sessions) { + const thisSessions = sessions[key]; + + for (let index = 0; index < thisSessions.length; index++) { + const session = thisSessions[index]; + + if (session[kCurrentStreamCount] === 0) { + closedCount++; + session.close(); + + if (closedCount >= maxCount) { + return closedCount; + } } } - 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"); } - 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; + + return closedCount; } - // 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"); + + destroy(reason) { + const { sessions, queue } = this; + + // eslint-disable-next-line guard-for-in + for (const key in sessions) { + const thisSessions = sessions[key]; + + for (let index = 0; index < thisSessions.length; index++) { + thisSessions[index].destroy(reason); + } } - 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"); + + // eslint-disable-next-line guard-for-in + for (const normalizedOptions in queue) { + const entries = queue[normalizedOptions]; + + // eslint-disable-next-line guard-for-in + for (const normalizedOrigin in entries) { + entries[normalizedOrigin].destroyed = true; + } } - options.headers["Authorization"] = `Basic ${Buffer.from( - `PAT:${this.token}` - ).toString("base64")}`; + + // New requests should NOT attach to destroyed sessions + this.queue = {}; + this.tlsSessionCache.clear(); } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; + + get emptySessionCount() { + return this._emptySessionCount; } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); + + get pendingSessionCount() { + return this._sessionCount - this._emptySessionCount; + } + + get sessionCount() { + return this._sessionCount; } } - exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - //# sourceMappingURL=auth.js.map + + Agent.kCurrentStreamCount = kCurrentStreamCount; + Agent.kGracefullyClosing = kGracefullyClosing; + + module.exports = { + Agent, + globalAgent: new Agent(), + }; /***/ }, - /***/ 6255: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { + /***/ 9213: /***/ ( + module, + __unused_webpack_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; - 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; + // See https://github.com/facebook/jest/issues/2549 + // eslint-disable-next-line node/prefer-global/url + const { URL, urlToHttpOptions } = __nccwpck_require__(7016); + const http = __nccwpck_require__(8611); + const https = __nccwpck_require__(5692); + const resolveALPN = __nccwpck_require__(8824); + const QuickLRU = __nccwpck_require__(5475); + const { Agent, globalAgent } = __nccwpck_require__(685); + const Http2ClientRequest = __nccwpck_require__(7605); + const calculateServerName = __nccwpck_require__(2850); + const delayAsyncDestroy = __nccwpck_require__(811); + + const cache = new QuickLRU({ maxSize: 100 }); + const queue = new Map(); + + const installSocket = (agent, socket, options) => { + socket._httpMessage = { shouldKeepAlive: true }; + + const onFree = () => { + agent.emit("free", socket, options); }; - 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); - } + + socket.on("free", onFree); + + const onClose = () => { + agent.removeSocket(socket, options); + }; + + socket.on("close", onClose); + + const onTimeout = () => { + const { freeSockets } = agent; + + for (const sockets of Object.values(freeSockets)) { + if (sockets.includes(socket)) { + socket.destroy(); + return; } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + } + }; + + socket.on("timeout", onTimeout); + + const onRemove = () => { + agent.removeSocket(socket, options); + socket.off("close", onClose); + socket.off("free", onFree); + socket.off("timeout", onTimeout); + socket.off("agentRemove", onRemove); + }; + + socket.on("agentRemove", onRemove); + + agent.emit("free", socket, options); + }; + + const createResolveProtocol = ( + cache, + queue = new Map(), + connect = undefined, + ) => { + return async (options) => { + const name = `${options.host}:${options.port}:${options.ALPNProtocols.sort()}`; + + if (!cache.has(name)) { + if (queue.has(name)) { + const result = await queue.get(name); + return { alpnProtocol: result.alpnProtocol }; } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); + + const { path } = options; + options.path = options.socketPath; + + const resultPromise = resolveALPN(options, connect); + queue.set(name, resultPromise); + + try { + const result = await resultPromise; + + cache.set(name, result.alpnProtocol); + queue.delete(name); + + options.path = path; + + return result; + } catch (error) { + queue.delete(name); + + options.path = path; + + throw error; } - step( - (generator = generator.apply(thisArg, _arguments || [])).next() - ); - }); + } + + return { alpnProtocol: cache.get(name) }; }; - 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__(3685)); - const https = __importStar(__nccwpck_require__(5687)); - const pm = __importStar(__nccwpck_require__(9835)); - const tunnel = __importStar(__nccwpck_require__(4294)); - 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 || (exports.HttpCodes = {}))); - var Headers; - (function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; - })((Headers = exports.Headers || (exports.Headers = {}))); - var MediaTypes; - (function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; - })((MediaTypes = exports.MediaTypes || (exports.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); + }; + + const defaultResolveProtocol = createResolveProtocol(cache, queue); + + module.exports = async (input, options, callback) => { + if (typeof input === "string") { + input = urlToHttpOptions(new URL(input)); + } else if (input instanceof URL) { + input = urlToHttpOptions(input); + } else { + input = { ...input }; } - } - exports.HttpClientError = HttpClientError; - class HttpClientResponse { - constructor(message) { - this.message = message; + + if (typeof options === "function" || options === undefined) { + // (options, callback) + callback = options; + options = input; + } else { + // (input, options, callback) + options = Object.assign(input, options); } - 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()); - }); - }) - ); - }); + + options.ALPNProtocols = options.ALPNProtocols || ["h2", "http/1.1"]; + + if ( + !Array.isArray(options.ALPNProtocols) || + options.ALPNProtocols.length === 0 + ) { + throw new Error( + "The `ALPNProtocols` option must be an Array with at least one entry", + ); } - } - 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; - } - 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; + + options.protocol = options.protocol || "https:"; + const isHttps = options.protocol === "https:"; + + options.host = options.hostname || options.host || "localhost"; + options.session = options.tlsSession; + options.servername = + options.servername || + calculateServerName( + (options.headers && options.headers.host) || options.host, + ); + options.port = options.port || (isHttps ? 443 : 80); + options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent; + + const resolveProtocol = + options.resolveProtocol || defaultResolveProtocol; + + // Note: We don't support `h2session` here + + let { agent } = options; + if ( + agent !== undefined && + agent !== false && + agent.constructor.name !== "Object" + ) { + throw new Error( + "The `options.agent` can be only an object `http`, `https` or `http2` properties", + ); + } + + if (isHttps) { + options.resolveSocket = true; + + let { socket, alpnProtocol, timeout } = + await resolveProtocol(options); + + if (timeout) { + if (socket) { + socket.destroy(); } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; + + const error = new Error( + `Timed out resolving ALPN: ${options.timeout} ms`, + ); + error.code = "ETIMEDOUT"; + error.ms = options.timeout; + + throw error; + } + + // We can't accept custom `createConnection` because the API is different for HTTP/2 + if (socket && options.createConnection) { + socket.destroy(); + socket = undefined; + } + + delete options.resolveSocket; + + const isHttp2 = alpnProtocol === "h2"; + + if (agent) { + agent = isHttp2 ? agent.http2 : agent.https; + options.agent = agent; + } + + if (agent === undefined) { + agent = isHttp2 ? globalAgent : https.globalAgent; + } + + if (socket) { + if (agent === false) { + socket.destroy(); + } else { + const defaultCreateConnection = (isHttp2 ? Agent : https.Agent) + .prototype.createConnection; + + if (agent.createConnection === defaultCreateConnection) { + if (isHttp2) { + options._reuseSocket = socket; + } else { + installSocket(agent, socket, options); + } + } else { + socket.destroy(); + } } } + + if (isHttp2) { + return delayAsyncDestroy(new Http2ClientRequest(options, callback)); + } + } else if (agent) { + options.agent = agent.http; } - 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 || {} - ); - }); + + // If we're sending HTTP/1.1, handle any explicitly set H2 headers in the options: + if (options.headers) { + options.headers = { ...options.headers }; + + // :authority is equivalent to the HTTP/1.1 host header + if (options.headers[":authority"]) { + if (!options.headers.host) { + options.headers.host = options.headers[":authority"]; + } + + delete options.headers[":authority"]; + } + + // Remove other HTTP/2 headers as they have their counterparts in the options + delete options.headers[":method"]; + delete options.headers[":scheme"]; + delete options.headers[":path"]; } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "DELETE", - requestUrl, - null, - additionalHeaders || {} - ); + + return delayAsyncDestroy(http.request(options, callback)); + }; + + module.exports.protocolCache = cache; + module.exports.resolveProtocol = defaultResolveProtocol; + module.exports.createResolveProtocol = createResolveProtocol; + + /***/ + }, + + /***/ 7605: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + // See https://github.com/facebook/jest/issues/2549 + // eslint-disable-next-line node/prefer-global/url + const { URL, urlToHttpOptions } = __nccwpck_require__(7016); + const http2 = __nccwpck_require__(5675); + const { Writable } = __nccwpck_require__(4584); + const { Agent, globalAgent } = __nccwpck_require__(685); + const IncomingMessage = __nccwpck_require__(2156); + const proxyEvents = __nccwpck_require__(118); + const { + ERR_INVALID_ARG_TYPE, + ERR_INVALID_PROTOCOL, + ERR_HTTP_HEADERS_SENT, + } = __nccwpck_require__(9731); + const validateHeaderName = __nccwpck_require__(1212); + const validateHeaderValue = __nccwpck_require__(6462); + const proxySocketHandler = __nccwpck_require__(7083); + + const { + HTTP2_HEADER_STATUS, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_AUTHORITY, + HTTP2_METHOD_CONNECT, + } = http2.constants; + + const kHeaders = Symbol("headers"); + const kOrigin = Symbol("origin"); + const kSession = Symbol("session"); + const kOptions = Symbol("options"); + const kFlushedHeaders = Symbol("flushedHeaders"); + const kJobs = Symbol("jobs"); + const kPendingAgentPromise = Symbol("pendingAgentPromise"); + + class ClientRequest extends Writable { + constructor(input, options, callback) { + super({ + autoDestroy: false, + emitClose: false, }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "POST", - requestUrl, - data, - additionalHeaders || {} + + if (typeof input === "string") { + input = urlToHttpOptions(new URL(input)); + } else if (input instanceof URL) { + input = urlToHttpOptions(input); + } else { + input = { ...input }; + } + + if (typeof options === "function" || options === undefined) { + // (options, callback) + callback = options; + options = input; + } else { + // (input, options, callback) + options = Object.assign(input, options); + } + + if (options.h2session) { + this[kSession] = options.h2session; + + if (this[kSession].destroyed) { + throw new Error("The session has been closed already"); + } + + this.protocol = this[kSession].socket.encrypted + ? "https:" + : "http:"; + } else if (options.agent === false) { + this.agent = new Agent({ maxEmptySessions: 0 }); + } else if ( + typeof options.agent === "undefined" || + options.agent === null + ) { + this.agent = globalAgent; + } else if (typeof options.agent.request === "function") { + this.agent = options.agent; + } else { + throw new ERR_INVALID_ARG_TYPE( + "options.agent", + ["http2wrapper.Agent-like Object", "undefined", "false"], + options.agent, ); - }); + } + + if (this.agent) { + this.protocol = this.agent.protocol; + } + + if (options.protocol && options.protocol !== this.protocol) { + throw new ERR_INVALID_PROTOCOL(options.protocol, this.protocol); + } + + if (!options.port) { + options.port = + options.defaultPort || + (this.agent && this.agent.defaultPort) || + 443; + } + + options.host = options.hostname || options.host || "localhost"; + + // Unused + delete options.hostname; + + const { timeout } = options; + options.timeout = undefined; + + this[kHeaders] = Object.create(null); + this[kJobs] = []; + + this[kPendingAgentPromise] = undefined; + + this.socket = null; + this.connection = null; + + this.method = options.method || "GET"; + + if ( + !( + this.method === "CONNECT" && + (options.path === "/" || options.path === undefined) + ) + ) { + this.path = options.path; + } + + this.res = null; + this.aborted = false; + this.reusedSocket = false; + + const { headers } = options; + if (headers) { + // eslint-disable-next-line guard-for-in + for (const header in headers) { + this.setHeader(header, headers[header]); + } + } + + if (options.auth && !("authorization" in this[kHeaders])) { + this[kHeaders].authorization = + "Basic " + Buffer.from(options.auth).toString("base64"); + } + + options.session = options.tlsSession; + options.path = options.socketPath; + + this[kOptions] = options; + + // Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field. + this[kOrigin] = new URL( + `${this.protocol}//${options.servername || options.host}:${options.port}`, + ); + + // A socket is being reused + const reuseSocket = options._reuseSocket; + if (reuseSocket) { + options.createConnection = (...args) => { + if (reuseSocket.destroyed) { + return this.agent.createConnection(...args); + } + + return reuseSocket; + }; + + // eslint-disable-next-line promise/prefer-await-to-then + this.agent + .getSession(this[kOrigin], this[kOptions]) + .catch(() => {}); + } + + if (timeout) { + this.setTimeout(timeout); + } + + if (callback) { + this.once("response", callback); + } + + this[kFlushedHeaders] = false; } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "PATCH", - requestUrl, - data, - additionalHeaders || {} - ); - }); + + get method() { + return this[kHeaders][HTTP2_HEADER_METHOD]; } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "PUT", - requestUrl, - data, - additionalHeaders || {} - ); - }); + + set method(value) { + if (value) { + this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase(); + } } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "HEAD", - requestUrl, - null, - additionalHeaders || {} - ); - }); + + get path() { + const header = + this.method === "CONNECT" + ? HTTP2_HEADER_AUTHORITY + : HTTP2_HEADER_PATH; + + return this[kHeaders][header]; } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); + + set path(value) { + if (value) { + const header = + this.method === "CONNECT" + ? HTTP2_HEADER_AUTHORITY + : HTTP2_HEADER_PATH; + + this[kHeaders][header] = value; + } } - /** - * 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); - }); + + get host() { + return this[kOrigin].hostname; } - 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); - }); + + set host(_value) { + // Do nothing as this is read only. } - 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); - }); + + get _mustNotHaveABody() { + return ( + this.method === "GET" || + this.method === "HEAD" || + this.method === "DELETE" + ); } - 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 + + _write(chunk, encoding, callback) { + // https://github.com/nodejs/node/blob/654df09ae0c5e17d1b52a900a545f0664d8c7627/lib/internal/http2/util.js#L148-L156 + if (this._mustNotHaveABody) { + callback( + new Error( + "The GET, HEAD and DELETE methods must NOT have a body", + ), ); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + /* istanbul ignore next: Node.js 12 throws directly */ + return; + } + + this.flushHeaders(); + + const callWrite = () => + this._request.write(chunk, encoding, callback); + if (this._request) { + callWrite(); + } else { + this[kJobs].push(callWrite); + } } - /** - * 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."); + + _final(callback) { + this.flushHeaders(); + + const callEnd = () => { + // For GET, HEAD and DELETE and CONNECT + if (this._mustNotHaveABody || this.method === "CONNECT") { + callback(); + return; } - 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; - }); + + this._request.end(callback); + }; + + if (this._request) { + callEnd(); + } else { + this[kJobs].push(callEnd); + } } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); + + abort() { + if (this.res && this.res.complete) { + return; } - this._disposed = true; + + if (!this.aborted) { + process.nextTick(() => this.emit("abort")); + } + + this.aborted = true; + + this.destroy(); } - /** - * 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); - } - } - this.requestRawWithCallback(info, data, callbackForResult); + + async _destroy(error, callback) { + if (this.res) { + this.res._dump(); + } + + if (this._request) { + this._request.destroy(); + } else { + process.nextTick(() => { + this.emit("close"); }); - }); + } + + try { + await this[kPendingAgentPromise]; + } catch (internalError) { + if (this.aborted) { + error = internalError; + } + } + + callback(error); } - /** - * 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 = {}; + + async flushHeaders() { + if (this[kFlushedHeaders] || this.destroyed) { + return; + } + + this[kFlushedHeaders] = true; + + const isConnectMethod = this.method === HTTP2_METHOD_CONNECT; + + // The real magic is here + const onStream = (stream) => { + this._request = stream; + + if (this.destroyed) { + stream.destroy(); + return; } - info.options.headers["Content-Length"] = Buffer.byteLength( - data, - "utf8" + + // Forwards `timeout`, `continue`, `close` and `error` events to this instance. + if (!isConnectMethod) { + // TODO: Should we proxy `close` here? + proxyEvents(stream, this, ["timeout", "continue"]); + } + + stream.once("error", (error) => { + this.destroy(error); + }); + + stream.once("aborted", () => { + const { res } = this; + if (res) { + res.aborted = true; + res.emit("aborted"); + res.destroy(); + } else { + this.destroy(new Error("The server aborted the HTTP/2 stream")); + } + }); + + const onResponse = (headers, flags, rawHeaders) => { + // If we were to emit raw request stream, it would be as fast as the native approach. + // Note that wrapping the raw stream in a Proxy instance won't improve the performance (already tested it). + const response = new IncomingMessage( + this.socket, + stream.readableHighWaterMark, + ); + this.res = response; + + // Undocumented, but it is used by `cacheable-request` + response.url = `${this[kOrigin].origin}${this.path}`; + + response.req = this; + response.statusCode = headers[HTTP2_HEADER_STATUS]; + response.headers = headers; + response.rawHeaders = rawHeaders; + + response.once("end", () => { + response.complete = true; + + // Has no effect, just be consistent with the Node.js behavior + response.socket = null; + response.connection = null; + }); + + if (isConnectMethod) { + response.upgrade = true; + + // The HTTP1 API says the socket is detached here, + // but we can't do that so we pass the original HTTP2 request. + if (this.emit("connect", response, stream, Buffer.alloc(0))) { + this.emit("close"); + } else { + // No listeners attached, destroy the original request. + stream.destroy(); + } + } else { + // Forwards data + stream.on("data", (chunk) => { + if (!response._dumped && !response.push(chunk)) { + stream.pause(); + } + }); + + stream.once("end", () => { + if (!this.aborted) { + response.push(null); + } + }); + + if (!this.emit("response", response)) { + // No listeners attached, dump the response. + response._dump(); + } + } + }; + + // This event tells we are ready to listen for the data. + stream.once("response", onResponse); + + // Emits `information` event + stream.once("headers", (headers) => + this.emit("information", { + statusCode: headers[HTTP2_HEADER_STATUS], + }), ); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); + + stream.once("trailers", (trailers, flags, rawTrailers) => { + const { res } = this; + + // https://github.com/nodejs/node/issues/41251 + if (res === null) { + onResponse(trailers, flags, rawTrailers); + return; + } + + // Assigns trailers to the response object. + res.trailers = trailers; + res.rawTrailers = rawTrailers; + }); + + stream.once("close", () => { + const { aborted, res } = this; + if (res) { + if (aborted) { + res.aborted = true; + res.emit("aborted"); + res.destroy(); + } + + const finish = () => { + res.emit("close"); + + this.destroy(); + this.emit("close"); + }; + + if (res.readable) { + res.once("end", finish); + } else { + finish(); + } + + return; + } + + if (!this.destroyed) { + this.destroy( + new Error("The HTTP/2 stream has been early terminated"), + ); + this.emit("close"); + return; + } + + this.destroy(); + this.emit("close"); + }); + + this.socket = new Proxy(stream, proxySocketHandler); + + for (const job of this[kJobs]) { + job(); } + + this[kJobs].length = 0; + + this.emit("socket", this.socket); + }; + + if (!(HTTP2_HEADER_AUTHORITY in this[kHeaders]) && !isConnectMethod) { + this[kHeaders][HTTP2_HEADER_AUTHORITY] = this[kOrigin].host; } - 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(); + + // Makes a HTTP2 request + if (this[kSession]) { + try { + onStream(this[kSession].request(this[kHeaders])); + } catch (error) { + this.destroy(error); } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on("error", function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function () { - req.end(); - }); - data.pipe(req); } else { - req.end(); + this.reusedSocket = true; + + try { + const promise = this.agent.request( + this[kOrigin], + this[kOptions], + this[kHeaders], + ); + this[kPendingAgentPromise] = promise; + + onStream(await promise); + + this[kPendingAgentPromise] = false; + } catch (error) { + this[kPendingAgentPromise] = false; + + this.destroy(error); + } } } - /** - * 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); + + get connection() { + return this.socket; } - _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; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; + + set connection(value) { + this.socket = value; } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign( - {}, - lowercaseKeys(this.requestOptions.headers), - lowercaseKeys(headers || {}) - ); - } - return lowercaseKeys(headers || {}); + + getHeaderNames() { + return Object.keys(this[kHeaders]); } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + + hasHeader(name) { + if (typeof name !== "string") { + throw new ERR_INVALID_ARG_TYPE("name", "string", name); } - return additionalHeaders[header] || clientHeader || _default; + + return Boolean(this[kHeaders][name.toLowerCase()]); } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; + + getHeader(name) { + if (typeof name !== "string") { + throw new ERR_INVALID_ARG_TYPE("name", "string", name); } - if (this._keepAlive && !useProxy) { - agent = this._agent; + + return this[kHeaders][name.toLowerCase()]; + } + + get headersSent() { + return this[kFlushedHeaders]; + } + + removeHeader(name) { + if (typeof name !== "string") { + throw new ERR_INVALID_ARG_TYPE("name", "string", name); } - // if agent is already assigned use that agent. - if (agent) { - return agent; + + if (this.headersSent) { + throw new ERR_HTTP_HEADERS_SENT("remove"); } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = - this.requestOptions.maxSockets || http.globalAgent.maxSockets; + + delete this[kHeaders][name.toLowerCase()]; + } + + setHeader(name, value) { + if (this.headersSent) { + throw new ERR_HTTP_HEADERS_SENT("set"); } - // 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; + + validateHeaderName(name); + validateHeaderValue(name, value); + + const lowercased = name.toLowerCase(); + + if (lowercased === "connection") { + if (value.toLowerCase() === "keep-alive") { + return; } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl - ? new https.Agent(options) - : new http.Agent(options); - this._agent = agent; + + throw new Error(`Invalid 'connection' header: ${value}`); } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; + + if (lowercased === "host" && this.method === "CONNECT") { + this[kHeaders][HTTP2_HEADER_AUTHORITY] = value; + } else { + this[kHeaders][lowercased] = value; } - 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, - }); + } + + setNoDelay() { + // HTTP2 sockets cannot be malformed, do nothing. + } + + setSocketKeepAlive() { + // HTTP2 sockets cannot be malformed, do nothing. + } + + setTimeout(ms, callback) { + const applyTimeout = () => this._request.setTimeout(ms, callback); + + if (this._request) { + applyTimeout(); + } else { + this[kJobs].push(applyTimeout); } - return agent; + + return this; } - _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)); - }); + + get maxHeadersCount() { + if (!this.destroyed && this._request) { + return this._request.session.localSettings.maxHeaderListSize; + } + + return undefined; } - _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); - } - }) - ); - }); + + set maxHeadersCount(_value) { + // Updating HTTP2 settings would affect all requests, do nothing. } } - exports.HttpClient = HttpClient; - const lowercaseKeys = (obj) => - Object.keys(obj).reduce( - (c, k) => ((c[k.toLowerCase()] = obj[k]), c), - {} - ); - //# sourceMappingURL=index.js.map + + module.exports = ClientRequest; /***/ }, - /***/ 9835: /***/ (__unused_webpack_module, exports) => { + /***/ 2156: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { "use strict"; - 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; + const { Readable } = __nccwpck_require__(4584); + + class IncomingMessage extends Readable { + constructor(socket, highWaterMark) { + super({ + emitClose: false, + autoDestroy: true, + highWaterMark, + }); + + this.statusCode = null; + this.statusMessage = ""; + this.httpVersion = "2.0"; + this.httpVersionMajor = 2; + this.httpVersionMinor = 0; + this.headers = {}; + this.trailers = {}; + this.req = null; + + this.aborted = false; + this.complete = false; + this.upgrade = null; + + this.rawHeaders = []; + this.rawTrailers = []; + + this.socket = socket; + + this._dumped = false; } - 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) { - return new URL(proxyVar); - } else { - return undefined; + + get connection() { + return this.socket; } - } - exports.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; + + set connection(value) { + this.socket = value; } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = - process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; + + _destroy(error, callback) { + if (!this.readableEnded) { + this.aborted = true; + } + + // See https://github.com/nodejs/node/issues/35303 + callback(); + + this.req._request.destroy(error); } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; + + setTimeout(ms, callback) { + this.req.setTimeout(ms, callback); + return this; } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + + _dump() { + if (!this._dumped) { + this._dumped = true; + + this.removeAllListeners("data"); + this.resume(); + } } - // 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; + + _read() { + if (this.req) { + this.req._request.resume(); } } - 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]") - ); } - //# sourceMappingURL=proxy.js.map + + module.exports = IncomingMessage; /***/ }, - /***/ 7678: /***/ (module, exports) => { + /***/ 4956: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { "use strict"; - /// - /// - /// - Object.defineProperty(exports, "__esModule", { value: true }); - const typedArrayTypeNames = [ - "Int8Array", - "Uint8Array", - "Uint8ClampedArray", - "Int16Array", - "Uint16Array", - "Int32Array", - "Uint32Array", - "Float32Array", - "Float64Array", - "BigInt64Array", - "BigUint64Array", - ]; - function isTypedArrayName(name) { - return typedArrayTypeNames.includes(name); - } - const objectTypeNames = [ - "Function", - "Generator", - "AsyncGenerator", - "GeneratorFunction", - "AsyncGeneratorFunction", - "AsyncFunction", - "Observable", - "Array", - "Buffer", - "Blob", - "Object", - "RegExp", - "Date", - "Error", - "Map", - "Set", - "WeakMap", - "WeakSet", - "ArrayBuffer", - "SharedArrayBuffer", - "DataView", - "Promise", - "URL", - "FormData", - "URLSearchParams", - "HTMLElement", - ...typedArrayTypeNames, - ]; - function isObjectTypeName(name) { - return objectTypeNames.includes(name); - } - const primitiveTypeNames = [ - "null", - "undefined", - "string", - "number", - "bigint", - "boolean", - "symbol", - ]; - function isPrimitiveTypeName(name) { - return primitiveTypeNames.includes(name); - } - // eslint-disable-next-line @typescript-eslint/ban-types - function isOfType(type) { - return (value) => typeof value === type; - } - const { toString } = Object.prototype; - const getObjectType = (value) => { - const objectTypeName = toString.call(value).slice(8, -1); - if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) { - return "HTMLElement"; - } - if (isObjectTypeName(objectTypeName)) { - return objectTypeName; - } - return undefined; + const http2 = __nccwpck_require__(5675); + const { Agent, globalAgent } = __nccwpck_require__(685); + const ClientRequest = __nccwpck_require__(7605); + const IncomingMessage = __nccwpck_require__(2156); + const auto = __nccwpck_require__(9213); + const { HttpOverHttp2, HttpsOverHttp2 } = __nccwpck_require__(9126); + const Http2OverHttp2 = __nccwpck_require__(3747); + const { Http2OverHttp, Http2OverHttps } = __nccwpck_require__(278); + const validateHeaderName = __nccwpck_require__(1212); + const validateHeaderValue = __nccwpck_require__(6462); + + const request = (url, options, callback) => + new ClientRequest(url, options, callback); + + const get = (url, options, callback) => { + // eslint-disable-next-line unicorn/prevent-abbreviations + const req = new ClientRequest(url, options, callback); + req.end(); + + return req; }; - const isObjectOfType = (type) => (value) => getObjectType(value) === type; - function is(value) { - if (value === null) { - return "null"; - } - switch (typeof value) { - case "undefined": - return "undefined"; - case "string": - return "string"; - case "number": - return "number"; - case "boolean": - return "boolean"; - case "function": - return "Function"; - case "bigint": - return "bigint"; - case "symbol": - return "symbol"; - default: - } - if (is.observable(value)) { - return "Observable"; - } - if (is.array(value)) { - return "Array"; - } - if (is.buffer(value)) { - return "Buffer"; + + module.exports = { + ...http2, + ClientRequest, + IncomingMessage, + Agent, + globalAgent, + request, + get, + auto, + proxies: { + HttpOverHttp2, + HttpsOverHttp2, + Http2OverHttp2, + Http2OverHttp, + Http2OverHttps, + }, + validateHeaderName, + validateHeaderValue, + }; + + /***/ + }, + + /***/ 2037: /***/ (module) => { + "use strict"; + + module.exports = (self) => { + const { username, password } = self.proxyOptions.url; + + if (username || password) { + const data = `${username}:${password}`; + const authorization = `Basic ${Buffer.from(data).toString("base64")}`; + + return { + "proxy-authorization": authorization, + authorization, + }; } - const tagType = getObjectType(value); - if (tagType) { - return tagType; + + return {}; + }; + + /***/ + }, + + /***/ 9126: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const tls = __nccwpck_require__(4756); + const http = __nccwpck_require__(8611); + const https = __nccwpck_require__(5692); + const JSStreamSocket = __nccwpck_require__(5056); + const { globalAgent } = __nccwpck_require__(685); + const UnexpectedStatusCodeError = __nccwpck_require__(5930); + const initialize = __nccwpck_require__(4833); + const getAuthorizationHeaders = __nccwpck_require__(2037); + + const createConnection = (self, options, callback) => { + (async () => { + try { + const { proxyOptions } = self; + const { url, headers, raw } = proxyOptions; + + const stream = await globalAgent.request(url, proxyOptions, { + ...getAuthorizationHeaders(self), + ...headers, + ":method": "CONNECT", + ":authority": `${options.host}:${options.port}`, + }); + + stream.once("error", callback); + stream.once("response", (headers) => { + const statusCode = headers[":status"]; + + if (statusCode !== 200) { + callback(new UnexpectedStatusCodeError(statusCode, "")); + return; + } + + const encrypted = self instanceof https.Agent; + + if (raw && encrypted) { + options.socket = stream; + const secureStream = tls.connect(options); + + secureStream.once("close", () => { + stream.destroy(); + }); + + callback(null, secureStream); + return; + } + + const socket = new JSStreamSocket(stream); + socket.encrypted = false; + socket._handle.getpeername = (out) => { + out.family = undefined; + out.address = undefined; + out.port = undefined; + }; + + callback(null, socket); + }); + } catch (error) { + callback(error); + } + })(); + }; + + class HttpOverHttp2 extends http.Agent { + constructor(options) { + super(options); + + initialize(this, options.proxyOptions); } - if ( - value instanceof String || - value instanceof Boolean || - value instanceof Number - ) { - throw new TypeError( - "Please don't use object wrappers for primitive types" - ); + + createConnection(options, callback) { + createConnection(this, options, callback); } - return "Object"; } - is.undefined = isOfType("undefined"); - is.string = isOfType("string"); - const isNumberType = isOfType("number"); - is.number = (value) => isNumberType(value) && !is.nan(value); - is.bigint = isOfType("bigint"); - // eslint-disable-next-line @typescript-eslint/ban-types - is.function_ = isOfType("function"); - is.null_ = (value) => value === null; - is.class_ = (value) => - is.function_(value) && value.toString().startsWith("class "); - is.boolean = (value) => value === true || value === false; - is.symbol = isOfType("symbol"); - is.numericString = (value) => - is.string(value) && - !is.emptyStringOrWhitespace(value) && - !Number.isNaN(Number(value)); - is.array = (value, assertion) => { - if (!Array.isArray(value)) { - return false; + + class HttpsOverHttp2 extends https.Agent { + constructor(options) { + super(options); + + initialize(this, options.proxyOptions); } - if (!is.function_(assertion)) { - return true; + + createConnection(options, callback) { + createConnection(this, options, callback); } - return value.every(assertion); - }; - is.buffer = (value) => { - var _a, _b, _c, _d; - return (_d = - (_c = - (_b = - (_a = value) === null || _a === void 0 - ? void 0 - : _a.constructor) === null || _b === void 0 - ? void 0 - : _b.isBuffer) === null || _c === void 0 - ? void 0 - : _c.call(_b, value)) !== null && _d !== void 0 - ? _d - : false; - }; - is.blob = (value) => isObjectOfType("Blob")(value); - is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); - is.object = (value) => - !is.null_(value) && (typeof value === "object" || is.function_(value)); - is.iterable = (value) => { - var _a; - return is.function_( - (_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator] - ); + } + + module.exports = { + HttpOverHttp2, + HttpsOverHttp2, }; - is.asyncIterable = (value) => { - var _a; - return is.function_( - (_a = value) === null || _a === void 0 - ? void 0 - : _a[Symbol.asyncIterator] - ); - }; - is.generator = (value) => { - var _a, _b; - return ( - is.iterable(value) && - is.function_( - (_a = value) === null || _a === void 0 ? void 0 : _a.next - ) && - is.function_( - (_b = value) === null || _b === void 0 ? void 0 : _b.throw - ) - ); - }; - is.asyncGenerator = (value) => - is.asyncIterable(value) && - is.function_(value.next) && - is.function_(value.throw); - is.nativePromise = (value) => isObjectOfType("Promise")(value); - const hasPromiseAPI = (value) => { - var _a, _b; - return ( - is.function_( - (_a = value) === null || _a === void 0 ? void 0 : _a.then - ) && - is.function_( - (_b = value) === null || _b === void 0 ? void 0 : _b.catch - ) - ); - }; - is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); - is.generatorFunction = isObjectOfType("GeneratorFunction"); - is.asyncGeneratorFunction = (value) => - getObjectType(value) === "AsyncGeneratorFunction"; - is.asyncFunction = (value) => getObjectType(value) === "AsyncFunction"; - // eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types - is.boundFunction = (value) => - is.function_(value) && !value.hasOwnProperty("prototype"); - is.regExp = isObjectOfType("RegExp"); - is.date = isObjectOfType("Date"); - is.error = isObjectOfType("Error"); - is.map = (value) => isObjectOfType("Map")(value); - is.set = (value) => isObjectOfType("Set")(value); - is.weakMap = (value) => isObjectOfType("WeakMap")(value); - is.weakSet = (value) => isObjectOfType("WeakSet")(value); - is.int8Array = isObjectOfType("Int8Array"); - is.uint8Array = isObjectOfType("Uint8Array"); - is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray"); - is.int16Array = isObjectOfType("Int16Array"); - is.uint16Array = isObjectOfType("Uint16Array"); - is.int32Array = isObjectOfType("Int32Array"); - is.uint32Array = isObjectOfType("Uint32Array"); - is.float32Array = isObjectOfType("Float32Array"); - is.float64Array = isObjectOfType("Float64Array"); - is.bigInt64Array = isObjectOfType("BigInt64Array"); - is.bigUint64Array = isObjectOfType("BigUint64Array"); - is.arrayBuffer = isObjectOfType("ArrayBuffer"); - is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer"); - is.dataView = isObjectOfType("DataView"); - is.enumCase = (value, targetEnum) => - Object.values(targetEnum).includes(value); - is.directInstanceOf = (instance, class_) => - Object.getPrototypeOf(instance) === class_.prototype; - is.urlInstance = (value) => isObjectOfType("URL")(value); - is.urlString = (value) => { - if (!is.string(value)) { - return false; - } - try { - new URL(value); // eslint-disable-line no-new - return true; - } catch (_a) { - return false; - } - }; - // Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);` - is.truthy = (value) => Boolean(value); - // Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);` - is.falsy = (value) => !value; - is.nan = (value) => Number.isNaN(value); - is.primitive = (value) => - is.null_(value) || isPrimitiveTypeName(typeof value); - is.integer = (value) => Number.isInteger(value); - is.safeInteger = (value) => Number.isSafeInteger(value); - is.plainObject = (value) => { - // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js - if (toString.call(value) !== "[object Object]") { - return false; - } - const prototype = Object.getPrototypeOf(value); - return prototype === null || prototype === Object.getPrototypeOf({}); - }; - is.typedArray = (value) => isTypedArrayName(getObjectType(value)); - const isValidLength = (value) => is.safeInteger(value) && value >= 0; - is.arrayLike = (value) => - !is.nullOrUndefined(value) && - !is.function_(value) && - isValidLength(value.length); - is.inRange = (value, range) => { - if (is.number(range)) { - return value >= Math.min(0, range) && value <= Math.max(range, 0); - } - if (is.array(range) && range.length === 2) { - return value >= Math.min(...range) && value <= Math.max(...range); - } - throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); - }; - const NODE_TYPE_ELEMENT = 1; - const DOM_PROPERTIES_TO_CHECK = [ - "innerHTML", - "ownerDocument", - "style", - "attributes", - "nodeValue", - ]; - is.domElement = (value) => { - return ( - is.object(value) && - value.nodeType === NODE_TYPE_ELEMENT && - is.string(value.nodeName) && - !is.plainObject(value) && - DOM_PROPERTIES_TO_CHECK.every((property) => property in value) - ); - }; - is.observable = (value) => { - var _a, _b, _c, _d; - if (!value) { - return false; - } - // eslint-disable-next-line no-use-extend-native/no-use-extend-native - if ( - value === - ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 - ? void 0 - : _b.call(_a)) - ) { - return true; - } - if ( - value === - ((_d = (_c = value)["@@observable"]) === null || _d === void 0 - ? void 0 - : _d.call(_c)) - ) { - return true; - } - return false; - }; - is.nodeStream = (value) => - is.object(value) && is.function_(value.pipe) && !is.observable(value); - is.infinite = (value) => value === Infinity || value === -Infinity; - const isAbsoluteMod2 = (remainder) => (value) => - is.integer(value) && Math.abs(value % 2) === remainder; - is.evenInteger = isAbsoluteMod2(0); - is.oddInteger = isAbsoluteMod2(1); - is.emptyArray = (value) => is.array(value) && value.length === 0; - is.nonEmptyArray = (value) => is.array(value) && value.length > 0; - is.emptyString = (value) => is.string(value) && value.length === 0; - const isWhiteSpaceString = (value) => - is.string(value) && !/\S/.test(value); - is.emptyStringOrWhitespace = (value) => - is.emptyString(value) || isWhiteSpaceString(value); - // TODO: Use `not ''` when the `not` operator is available. - is.nonEmptyString = (value) => is.string(value) && value.length > 0; - // TODO: Use `not ''` when the `not` operator is available. - is.nonEmptyStringAndNotWhitespace = (value) => - is.string(value) && !is.emptyStringOrWhitespace(value); - is.emptyObject = (value) => - is.object(value) && - !is.map(value) && - !is.set(value) && - Object.keys(value).length === 0; - // TODO: Use `not` operator here to remove `Map` and `Set` from type guard: - // - https://github.com/Microsoft/TypeScript/pull/29317 - is.nonEmptyObject = (value) => - is.object(value) && - !is.map(value) && - !is.set(value) && - Object.keys(value).length > 0; - is.emptySet = (value) => is.set(value) && value.size === 0; - is.nonEmptySet = (value) => is.set(value) && value.size > 0; - is.emptyMap = (value) => is.map(value) && value.size === 0; - is.nonEmptyMap = (value) => is.map(value) && value.size > 0; - // `PropertyKey` is any value that can be used as an object key (string, number, or symbol) - is.propertyKey = (value) => - is.any([is.string, is.number, is.symbol], value); - is.formData = (value) => isObjectOfType("FormData")(value); - is.urlSearchParams = (value) => isObjectOfType("URLSearchParams")(value); - const predicateOnArray = (method, predicate, values) => { - if (!is.function_(predicate)) { - throw new TypeError( - `Invalid predicate: ${JSON.stringify(predicate)}` - ); - } - if (values.length === 0) { - throw new TypeError("Invalid number of values"); - } - return method.call(values, predicate); - }; - is.any = (predicate, ...values) => { - const predicates = is.array(predicate) ? predicate : [predicate]; - return predicates.some((singlePredicate) => - predicateOnArray(Array.prototype.some, singlePredicate, values) - ); - }; - is.all = (predicate, ...values) => - predicateOnArray(Array.prototype.every, predicate, values); - const assertType = (condition, description, value, options = {}) => { - if (!condition) { - const { multipleValues } = options; - const valuesMessage = multipleValues - ? `received values of types ${[ - ...new Set( - value.map((singleValue) => `\`${is(singleValue)}\``) - ), - ].join(", ")}` - : `received value of type \`${is(value)}\``; - throw new TypeError( - `Expected value which is \`${description}\`, ${valuesMessage}.` - ); - } - }; - exports.assert = { - // Unknowns. - undefined: (value) => - assertType(is.undefined(value), "undefined", value), - string: (value) => assertType(is.string(value), "string", value), - number: (value) => assertType(is.number(value), "number", value), - bigint: (value) => assertType(is.bigint(value), "bigint", value), - // eslint-disable-next-line @typescript-eslint/ban-types - function_: (value) => - assertType(is.function_(value), "Function", value), - null_: (value) => assertType(is.null_(value), "null", value), - class_: (value) => - assertType(is.class_(value), "Class" /* class_ */, value), - boolean: (value) => assertType(is.boolean(value), "boolean", value), - symbol: (value) => assertType(is.symbol(value), "symbol", value), - numericString: (value) => - assertType( - is.numericString(value), - "string with a number" /* numericString */, - value - ), - array: (value, assertion) => { - const assert = assertType; - assert(is.array(value), "Array", value); - if (assertion) { - value.forEach(assertion); - } - }, - buffer: (value) => assertType(is.buffer(value), "Buffer", value), - blob: (value) => assertType(is.blob(value), "Blob", value), - nullOrUndefined: (value) => - assertType( - is.nullOrUndefined(value), - "null or undefined" /* nullOrUndefined */, - value - ), - object: (value) => assertType(is.object(value), "Object", value), - iterable: (value) => - assertType(is.iterable(value), "Iterable" /* iterable */, value), - asyncIterable: (value) => - assertType( - is.asyncIterable(value), - "AsyncIterable" /* asyncIterable */, - value - ), - generator: (value) => - assertType(is.generator(value), "Generator", value), - asyncGenerator: (value) => - assertType(is.asyncGenerator(value), "AsyncGenerator", value), - nativePromise: (value) => - assertType( - is.nativePromise(value), - "native Promise" /* nativePromise */, - value - ), - promise: (value) => assertType(is.promise(value), "Promise", value), - generatorFunction: (value) => - assertType(is.generatorFunction(value), "GeneratorFunction", value), - asyncGeneratorFunction: (value) => - assertType( - is.asyncGeneratorFunction(value), - "AsyncGeneratorFunction", - value - ), - // eslint-disable-next-line @typescript-eslint/ban-types - asyncFunction: (value) => - assertType(is.asyncFunction(value), "AsyncFunction", value), - // eslint-disable-next-line @typescript-eslint/ban-types - boundFunction: (value) => - assertType(is.boundFunction(value), "Function", value), - regExp: (value) => assertType(is.regExp(value), "RegExp", value), - date: (value) => assertType(is.date(value), "Date", value), - error: (value) => assertType(is.error(value), "Error", value), - map: (value) => assertType(is.map(value), "Map", value), - set: (value) => assertType(is.set(value), "Set", value), - weakMap: (value) => assertType(is.weakMap(value), "WeakMap", value), - weakSet: (value) => assertType(is.weakSet(value), "WeakSet", value), - int8Array: (value) => - assertType(is.int8Array(value), "Int8Array", value), - uint8Array: (value) => - assertType(is.uint8Array(value), "Uint8Array", value), - uint8ClampedArray: (value) => - assertType(is.uint8ClampedArray(value), "Uint8ClampedArray", value), - int16Array: (value) => - assertType(is.int16Array(value), "Int16Array", value), - uint16Array: (value) => - assertType(is.uint16Array(value), "Uint16Array", value), - int32Array: (value) => - assertType(is.int32Array(value), "Int32Array", value), - uint32Array: (value) => - assertType(is.uint32Array(value), "Uint32Array", value), - float32Array: (value) => - assertType(is.float32Array(value), "Float32Array", value), - float64Array: (value) => - assertType(is.float64Array(value), "Float64Array", value), - bigInt64Array: (value) => - assertType(is.bigInt64Array(value), "BigInt64Array", value), - bigUint64Array: (value) => - assertType(is.bigUint64Array(value), "BigUint64Array", value), - arrayBuffer: (value) => - assertType(is.arrayBuffer(value), "ArrayBuffer", value), - sharedArrayBuffer: (value) => - assertType(is.sharedArrayBuffer(value), "SharedArrayBuffer", value), - dataView: (value) => assertType(is.dataView(value), "DataView", value), - enumCase: (value, targetEnum) => - assertType(is.enumCase(value, targetEnum), "EnumCase", value), - urlInstance: (value) => assertType(is.urlInstance(value), "URL", value), - urlString: (value) => - assertType( - is.urlString(value), - "string with a URL" /* urlString */, - value - ), - truthy: (value) => - assertType(is.truthy(value), "truthy" /* truthy */, value), - falsy: (value) => - assertType(is.falsy(value), "falsy" /* falsy */, value), - nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value), - primitive: (value) => - assertType(is.primitive(value), "primitive" /* primitive */, value), - integer: (value) => - assertType(is.integer(value), "integer" /* integer */, value), - safeInteger: (value) => - assertType(is.safeInteger(value), "integer" /* safeInteger */, value), - plainObject: (value) => - assertType( - is.plainObject(value), - "plain object" /* plainObject */, - value - ), - typedArray: (value) => - assertType( - is.typedArray(value), - "TypedArray" /* typedArray */, - value - ), - arrayLike: (value) => - assertType(is.arrayLike(value), "array-like" /* arrayLike */, value), - domElement: (value) => - assertType( - is.domElement(value), - "HTMLElement" /* domElement */, - value - ), - observable: (value) => - assertType(is.observable(value), "Observable", value), - nodeStream: (value) => - assertType( - is.nodeStream(value), - "Node.js Stream" /* nodeStream */, - value - ), - infinite: (value) => - assertType( - is.infinite(value), - "infinite number" /* infinite */, - value - ), - emptyArray: (value) => - assertType( - is.emptyArray(value), - "empty array" /* emptyArray */, - value - ), - nonEmptyArray: (value) => - assertType( - is.nonEmptyArray(value), - "non-empty array" /* nonEmptyArray */, - value - ), - emptyString: (value) => - assertType( - is.emptyString(value), - "empty string" /* emptyString */, - value - ), - emptyStringOrWhitespace: (value) => - assertType( - is.emptyStringOrWhitespace(value), - "empty string or whitespace" /* emptyStringOrWhitespace */, - value - ), - nonEmptyString: (value) => - assertType( - is.nonEmptyString(value), - "non-empty string" /* nonEmptyString */, - value - ), - nonEmptyStringAndNotWhitespace: (value) => - assertType( - is.nonEmptyStringAndNotWhitespace(value), - "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, - value - ), - emptyObject: (value) => - assertType( - is.emptyObject(value), - "empty object" /* emptyObject */, - value - ), - nonEmptyObject: (value) => - assertType( - is.nonEmptyObject(value), - "non-empty object" /* nonEmptyObject */, - value - ), - emptySet: (value) => - assertType(is.emptySet(value), "empty set" /* emptySet */, value), - nonEmptySet: (value) => - assertType( - is.nonEmptySet(value), - "non-empty set" /* nonEmptySet */, - value - ), - emptyMap: (value) => - assertType(is.emptyMap(value), "empty map" /* emptyMap */, value), - nonEmptyMap: (value) => - assertType( - is.nonEmptyMap(value), - "non-empty map" /* nonEmptyMap */, - value - ), - propertyKey: (value) => - assertType(is.propertyKey(value), "PropertyKey", value), - formData: (value) => assertType(is.formData(value), "FormData", value), - urlSearchParams: (value) => - assertType(is.urlSearchParams(value), "URLSearchParams", value), - // Numbers. - evenInteger: (value) => - assertType( - is.evenInteger(value), - "even integer" /* evenInteger */, - value - ), - oddInteger: (value) => - assertType( - is.oddInteger(value), - "odd integer" /* oddInteger */, - value - ), - // Two arguments. - directInstanceOf: (instance, class_) => - assertType( - is.directInstanceOf(instance, class_), - "T" /* directInstanceOf */, - instance - ), - inRange: (value, range) => - assertType(is.inRange(value, range), "in range" /* inRange */, value), - // Variadic functions. - any: (predicate, ...values) => { - return assertType( - is.any(predicate, ...values), - "predicate returns truthy for any value" /* any */, - values, - { multipleValues: true } - ); - }, - all: (predicate, ...values) => - assertType( - is.all(predicate, ...values), - "predicate returns truthy for all values" /* all */, - values, - { multipleValues: true } - ), - }; - // Some few keywords are reserved, but we'll populate them for Node.js users - // See https://github.com/Microsoft/TypeScript/issues/2536 - Object.defineProperties(is, { - class: { - value: is.class_, - }, - function: { - value: is.function_, - }, - null: { - value: is.null_, - }, - }); - Object.defineProperties(exports.assert, { - class: { - value: exports.assert.class_, - }, - function: { - value: exports.assert.function_, - }, - null: { - value: exports.assert.null_, - }, - }); - exports["default"] = is; - // For CommonJS default export support - module.exports = is; - module.exports["default"] = is; - module.exports.assert = exports.assert; /***/ }, - /***/ 8097: /***/ (module, exports, __nccwpck_require__) => { + /***/ 278: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - const defer_to_connect_1 = __nccwpck_require__(6214); - const util_1 = __nccwpck_require__(3837); - const nodejsMajorVersion = Number(process.versions.node.split(".")[0]); - const timer = (request) => { - if (request.timings) { - return request.timings; - } - const timings = { - start: Date.now(), - socket: undefined, - lookup: undefined, - connect: undefined, - secureConnect: undefined, - upload: undefined, - response: undefined, - end: undefined, - error: undefined, - abort: undefined, - phases: { - wait: undefined, - dns: undefined, - tcp: undefined, - tls: undefined, - request: undefined, - firstByte: undefined, - download: undefined, - total: undefined, - }, - }; - request.timings = timings; - const handleError = (origin) => { - const emit = origin.emit.bind(origin); - origin.emit = (event, ...args) => { - // Catches the `error` event - if (event === "error") { - timings.error = Date.now(); - timings.phases.total = timings.error - timings.start; - origin.emit = emit; - } - // Saves the original behavior - return emit(event, ...args); - }; - }; - handleError(request); - const onAbort = () => { - timings.abort = Date.now(); - // Let the `end` response event be responsible for setting the total phase, - // unless the Node.js major version is >= 13. - if (!timings.response || nodejsMajorVersion >= 13) { - timings.phases.total = Date.now() - timings.start; - } - }; - request.prependOnceListener("abort", onAbort); - const onSocket = (socket) => { - timings.socket = Date.now(); - timings.phases.wait = timings.socket - timings.start; - if (util_1.types.isProxy(socket)) { - return; - } - const lookupListener = () => { - timings.lookup = Date.now(); - timings.phases.dns = timings.lookup - timings.socket; + const http = __nccwpck_require__(8611); + const https = __nccwpck_require__(5692); + const Http2OverHttpX = __nccwpck_require__(861); + const getAuthorizationHeaders = __nccwpck_require__(2037); + + const getStream = (request) => + new Promise((resolve, reject) => { + const onConnect = (response, socket, head) => { + socket.unshift(head); + + request.off("error", reject); + resolve([socket, response.statusCode, response.statusMessage]); }; - socket.prependOnceListener("lookup", lookupListener); - defer_to_connect_1.default(socket, { - connect: () => { - timings.connect = Date.now(); - if (timings.lookup === undefined) { - socket.removeListener("lookup", lookupListener); - timings.lookup = timings.connect; - timings.phases.dns = timings.lookup - timings.socket; - } - timings.phases.tcp = timings.connect - timings.lookup; - // This callback is called before flushing any data, - // so we don't need to set `timings.phases.request` here. - }, - secureConnect: () => { - timings.secureConnect = Date.now(); - timings.phases.tls = timings.secureConnect - timings.connect; - }, - }); - }; - if (request.socket) { - onSocket(request.socket); - } else { - request.prependOnceListener("socket", onSocket); - } - const onUpload = () => { - var _a; - timings.upload = Date.now(); - timings.phases.request = - timings.upload - - ((_a = timings.secureConnect) !== null && _a !== void 0 - ? _a - : timings.connect); - }; - const writableFinished = () => { - if (typeof request.writableFinished === "boolean") { - return request.writableFinished; - } - // Node.js doesn't have `request.writableFinished` property - return ( - request.finished && - request.outputSize === 0 && - (!request.socket || request.socket.writableLength === 0) - ); - }; - if (writableFinished()) { - onUpload(); - } else { - request.prependOnceListener("finish", onUpload); - } - request.prependOnceListener("response", (response) => { - timings.response = Date.now(); - timings.phases.firstByte = timings.response - timings.upload; - response.timings = timings; - handleError(response); - response.prependOnceListener("end", () => { - timings.end = Date.now(); - timings.phases.download = timings.end - timings.response; - timings.phases.total = timings.end - timings.start; - }); - response.prependOnceListener("aborted", onAbort); + + request.once("error", reject); + request.once("connect", onConnect); }); - return timings; + + class Http2OverHttp extends Http2OverHttpX { + async _getProxyStream(authority) { + const { proxyOptions } = this; + const { url, headers } = this.proxyOptions; + + const network = url.protocol === "https:" ? https : http; + + // `new URL('https://localhost/httpbin.org:443')` results in + // a `/httpbin.org:443` path, which has an invalid leading slash. + const request = network + .request({ + ...proxyOptions, + hostname: url.hostname, + port: url.port, + path: authority, + headers: { + ...getAuthorizationHeaders(this), + ...headers, + host: authority, + }, + method: "CONNECT", + }) + .end(); + + return getStream(request); + } + } + + module.exports = { + Http2OverHttp, + Http2OverHttps: Http2OverHttp, }; - exports["default"] = timer; - // For CommonJS default export support - module.exports = timer; - module.exports["default"] = timer; /***/ }, - /***/ 9417: /***/ (module) => { + /***/ 3747: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { "use strict"; - module.exports = balanced; - function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); + const { globalAgent } = __nccwpck_require__(685); + const Http2OverHttpX = __nccwpck_require__(861); + const getAuthorizationHeaders = __nccwpck_require__(2037); - var r = range(a, b, str); + const getStatusCode = (stream) => + new Promise((resolve, reject) => { + stream.once("error", reject); + stream.once("response", (headers) => { + stream.off("error", reject); + resolve(headers[":status"]); + }); + }); - return ( - r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length), - } - ); - } + class Http2OverHttp2 extends Http2OverHttpX { + async _getProxyStream(authority) { + const { proxyOptions } = this; + + const headers = { + ...getAuthorizationHeaders(this), + ...proxyOptions.headers, + ":method": "CONNECT", + ":authority": authority, + }; + + const stream = await globalAgent.request( + proxyOptions.url, + proxyOptions, + headers, + ); + const statusCode = await getStatusCode(stream); - function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; + return [stream, statusCode, ""]; + } } - balanced.range = range; - function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; + module.exports = Http2OverHttp2; - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; + /***/ + }, - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } + /***/ 861: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; - bi = str.indexOf(b, i + 1); - } + const { Agent } = __nccwpck_require__(685); + const JSStreamSocket = __nccwpck_require__(5056); + const UnexpectedStatusCodeError = __nccwpck_require__(5930); + const initialize = __nccwpck_require__(4833); - i = ai < bi && ai >= 0 ? ai : bi; + class Http2OverHttpX extends Agent { + constructor(options) { + super(options); + + initialize(this, options.proxyOptions); + } + + async createConnection(origin, options) { + const authority = `${origin.hostname}:${origin.port || 443}`; + + const [stream, statusCode, statusMessage] = + await this._getProxyStream(authority); + if (statusCode !== 200) { + throw new UnexpectedStatusCodeError(statusCode, statusMessage); } - if (begs.length) { - result = [left, right]; + if (this.proxyOptions.raw) { + options.socket = stream; + } else { + const socket = new JSStreamSocket(stream); + socket.encrypted = false; + socket._handle.getpeername = (out) => { + out.family = undefined; + out.address = undefined; + out.port = undefined; + }; + + return socket; } - } - return result; + return super.createConnection(origin, options); + } } + module.exports = Http2OverHttpX; + /***/ }, - /***/ 2286: /***/ ( + /***/ 4833: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { "use strict"; - const { - V4MAPPED, - ADDRCONFIG, - ALL, - promises: { Resolver: AsyncResolver }, - lookup: dnsLookup, - } = __nccwpck_require__(9523); - const { promisify } = __nccwpck_require__(3837); - const os = __nccwpck_require__(2037); + // See https://github.com/facebook/jest/issues/2549 + // eslint-disable-next-line node/prefer-global/url + const { URL } = __nccwpck_require__(7016); + const checkType = __nccwpck_require__(891); + + module.exports = (self, proxyOptions) => { + checkType("proxyOptions", proxyOptions, ["object"]); + checkType("proxyOptions.headers", proxyOptions.headers, [ + "object", + "undefined", + ]); + checkType("proxyOptions.raw", proxyOptions.raw, [ + "boolean", + "undefined", + ]); + checkType("proxyOptions.url", proxyOptions.url, [URL, "string"]); + + const url = new URL(proxyOptions.url); + + self.proxyOptions = { + raw: true, + ...proxyOptions, + headers: { ...proxyOptions.headers }, + url, + }; + }; - const kCacheableLookupCreateConnection = Symbol( - "cacheableLookupCreateConnection" - ); - const kCacheableLookupInstance = Symbol("cacheableLookupInstance"); - const kExpires = Symbol("expires"); + /***/ + }, - const supportsALL = typeof ALL === "number"; + /***/ 5930: /***/ (module) => { + "use strict"; - const verifyAgent = (agent) => { - if (!(agent && typeof agent.createConnection === "function")) { - throw new Error("Expected an Agent instance as the first argument"); + class UnexpectedStatusCodeError extends Error { + constructor(statusCode, statusMessage = "") { + super( + `The proxy server rejected the request with status code ${statusCode} (${statusMessage || "empty status message"})`, + ); + this.statusCode = statusCode; + this.statusMessage = statusMessage; } - }; + } - const map4to6 = (entries) => { - for (const entry of entries) { - if (entry.family === 6) { - continue; - } + module.exports = UnexpectedStatusCodeError; - entry.address = `::ffff:${entry.address}`; - entry.family = 6; - } - }; + /***/ + }, - const getIfaceInfo = () => { - let has4 = false; - let has6 = false; + /***/ 2850: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; - for (const device of Object.values(os.networkInterfaces())) { - for (const iface of device) { - if (iface.internal) { - continue; - } + const { isIP } = __nccwpck_require__(9278); + const assert = __nccwpck_require__(2613); - if (iface.family === "IPv6") { - has6 = true; - } else { - has4 = true; - } + const getHost = (host) => { + if (host[0] === "[") { + const idx = host.indexOf("]"); - if (has4 && has6) { - return { has4, has6 }; - } - } + assert(idx !== -1); + return host.slice(1, idx); } - return { has4, has6 }; - }; + const idx = host.indexOf(":"); + if (idx === -1) { + return host; + } - const isIterable = (map) => { - return Symbol.iterator in map; + return host.slice(0, idx); }; - const ttl = { ttl: true }; - const all = { all: true }; - - class CacheableLookup { - constructor({ - cache = new Map(), - maxTtl = Infinity, - fallbackDuration = 3600, - errorTtl = 0.15, - resolver = new AsyncResolver(), - lookup = dnsLookup, - } = {}) { - this.maxTtl = maxTtl; - this.errorTtl = errorTtl; + module.exports = (host) => { + const servername = getHost(host); - this._cache = cache; - this._resolver = resolver; - this._dnsLookup = promisify(lookup); + if (isIP(servername)) { + return ""; + } - if (this._resolver instanceof AsyncResolver) { - this._resolve4 = this._resolver.resolve4.bind(this._resolver); - this._resolve6 = this._resolver.resolve6.bind(this._resolver); - } else { - this._resolve4 = promisify( - this._resolver.resolve4.bind(this._resolver) - ); - this._resolve6 = promisify( - this._resolver.resolve6.bind(this._resolver) - ); - } + return servername; + }; - this._iface = getIfaceInfo(); + /***/ + }, - this._pending = {}; - this._nextRemovalTime = false; - this._hostnamesToFallback = new Set(); + /***/ 891: /***/ (module) => { + "use strict"; - if (fallbackDuration < 1) { - this._fallback = false; - } else { - this._fallback = true; + const checkType = (name, value, types) => { + const valid = types.some((type) => { + const typeofType = typeof type; + if (typeofType === "string") { + return typeof value === type; + } - const interval = setInterval(() => { - this._hostnamesToFallback.clear(); - }, fallbackDuration * 1000); + return value instanceof type; + }); - /* istanbul ignore next: There is no `interval.unref()` when running inside an Electron renderer */ - if (interval.unref) { - interval.unref(); - } - } + if (!valid) { + const names = types.map((type) => + typeof type === "string" ? type : type.name, + ); - this.lookup = this.lookup.bind(this); - this.lookupAsync = this.lookupAsync.bind(this); + throw new TypeError( + `Expected '${name}' to be a type of ${names.join(" or ")}, got ${typeof value}`, + ); } + }; - set servers(servers) { - this.clear(); + module.exports = checkType; - this._resolver.setServers(servers); - } + /***/ + }, - get servers() { - return this._resolver.getServers(); + /***/ 811: /***/ (module) => { + "use strict"; + + module.exports = (stream) => { + if (stream.listenerCount("error") !== 0) { + return stream; } - lookup(hostname, options, callback) { - if (typeof options === "function") { - callback = options; - options = {}; - } else if (typeof options === "number") { - options = { - family: options, - }; - } + stream.__destroy = stream._destroy; + stream._destroy = (...args) => { + const callback = args.pop(); - if (!callback) { - throw new Error("Callback must be a function."); - } + stream.__destroy(...args, async (error) => { + await Promise.resolve(); + callback(error); + }); + }; + const onError = (error) => { // eslint-disable-next-line promise/prefer-await-to-then - this.lookupAsync(hostname, options).then((result) => { - if (options.all) { - callback(null, result); - } else { - callback( - null, - result.address, - result.family, - result.expires, - result.ttl - ); - } - }, callback); - } + Promise.resolve().then(() => { + stream.emit("error", error); + }); + }; - async lookupAsync(hostname, options = {}) { - if (typeof options === "number") { - options = { - family: options, - }; - } + stream.once("error", onError); - let cached = await this.query(hostname); + // eslint-disable-next-line promise/prefer-await-to-then + Promise.resolve().then(() => { + stream.off("error", onError); + }); - if (options.family === 6) { - const filtered = cached.filter((entry) => entry.family === 6); + return stream; + }; - if (options.hints & V4MAPPED) { - if ( - (supportsALL && options.hints & ALL) || - filtered.length === 0 - ) { - map4to6(cached); - } else { - cached = filtered; - } - } else { - cached = filtered; - } - } else if (options.family === 4) { - cached = cached.filter((entry) => entry.family === 4); - } + /***/ + }, - if (options.hints & ADDRCONFIG) { - const { _iface } = this; - cached = cached.filter((entry) => - entry.family === 6 ? _iface.has6 : _iface.has4 - ); - } + /***/ 9731: /***/ (module) => { + "use strict"; - if (cached.length === 0) { - const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`); - error.code = "ENOTFOUND"; - error.hostname = hostname; + /* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */ - throw error; + const makeError = (Base, key, getMessage) => { + module.exports[key] = class NodeError extends Base { + constructor(...args) { + super( + typeof getMessage === "string" ? getMessage : getMessage(args), + ); + this.name = `${super.name} [${key}]`; + this.code = key; } + }; + }; - if (options.all) { - return cached; - } + makeError(TypeError, "ERR_INVALID_ARG_TYPE", (args) => { + const type = args[0].includes(".") ? "property" : "argument"; - return cached[0]; + let valid = args[1]; + const isManyTypes = Array.isArray(valid); + + if (isManyTypes) { + valid = `${valid.slice(0, -1).join(", ")} or ${valid.slice(-1)}`; } - async query(hostname) { - let cached = await this._cache.get(hostname); + return `The "${args[0]}" ${type} must be ${isManyTypes ? "one of" : "of"} type ${valid}. Received ${typeof args[2]}`; + }); - if (!cached) { - const pending = this._pending[hostname]; + makeError( + TypeError, + "ERR_INVALID_PROTOCOL", + (args) => `Protocol "${args[0]}" not supported. Expected "${args[1]}"`, + ); - if (pending) { - cached = await pending; - } else { - const newPromise = this.queryAndCache(hostname); - this._pending[hostname] = newPromise; + makeError( + Error, + "ERR_HTTP_HEADERS_SENT", + (args) => `Cannot ${args[0]} headers after they are sent to the client`, + ); - try { - cached = await newPromise; - } finally { - delete this._pending[hostname]; - } - } - } + makeError( + TypeError, + "ERR_INVALID_HTTP_TOKEN", + (args) => `${args[0]} must be a valid HTTP token [${args[1]}]`, + ); - cached = cached.map((entry) => { - return { ...entry }; - }); + makeError( + TypeError, + "ERR_HTTP_INVALID_HEADER_VALUE", + (args) => `Invalid value "${args[0]} for header "${args[1]}"`, + ); - return cached; - } + makeError( + TypeError, + "ERR_INVALID_CHAR", + (args) => `Invalid character in ${args[0]} [${args[1]}]`, + ); - async _resolve(hostname) { - const wrap = async (promise) => { - try { - return await promise; - } catch (error) { - if (error.code === "ENODATA" || error.code === "ENOTFOUND") { - return []; - } + makeError( + Error, + "ERR_HTTP2_NO_SOCKET_MANIPULATION", + "HTTP/2 sockets should not be directly manipulated (e.g. read and written)", + ); - throw error; - } - }; + /***/ + }, - // ANY is unsafe as it doesn't trigger new queries in the underlying server. - const [A, AAAA] = await Promise.all( - [ - this._resolve4(hostname, ttl), - this._resolve6(hostname, ttl), - ].map((promise) => wrap(promise)) - ); + /***/ 6365: /***/ (module) => { + "use strict"; - let aTtl = 0; - let aaaaTtl = 0; - let cacheTtl = 0; + module.exports = (header) => { + switch (header) { + case ":method": + case ":scheme": + case ":authority": + case ":path": + return true; + default: + return false; + } + }; - const now = Date.now(); + /***/ + }, - for (const entry of A) { - entry.family = 4; - entry.expires = now + entry.ttl * 1000; + /***/ 5056: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; - aTtl = Math.max(aTtl, entry.ttl); - } + const stream = __nccwpck_require__(4584); + const tls = __nccwpck_require__(4756); - for (const entry of AAAA) { - entry.family = 6; - entry.expires = now + entry.ttl * 1000; + // Really awesome hack. + const JSStreamSocket = new tls.TLSSocket(new stream.PassThrough())._handle + ._parentWrap.constructor; - aaaaTtl = Math.max(aaaaTtl, entry.ttl); - } + module.exports = JSStreamSocket; - if (A.length > 0) { - if (AAAA.length > 0) { - cacheTtl = Math.min(aTtl, aaaaTtl); - } else { - cacheTtl = aTtl; - } - } else { - cacheTtl = aaaaTtl; - } + /***/ + }, - return { - entries: [...A, ...AAAA], - cacheTtl, - }; + /***/ 118: /***/ (module) => { + "use strict"; + + module.exports = (from, to, events) => { + for (const event of events) { + from.on(event, (...args) => to.emit(event, ...args)); } + }; - async _lookup(hostname) { - try { - const entries = await this._dnsLookup(hostname, { - all: true, - }); + /***/ + }, - return { - entries, - cacheTtl: 0, - }; - } catch (_) { - return { - entries: [], - cacheTtl: 0, - }; - } - } + /***/ 7083: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; - async _set(hostname, data, cacheTtl) { - if (this.maxTtl > 0 && cacheTtl > 0) { - cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000; - data[kExpires] = Date.now() + cacheTtl; + const { ERR_HTTP2_NO_SOCKET_MANIPULATION } = __nccwpck_require__(9731); - try { - await this._cache.set(hostname, data, cacheTtl); - } catch (error) { - this.lookupAsync = async () => { - const cacheError = new Error( - "Cache Error. Please recreate the CacheableLookup instance." - ); - cacheError.cause = error; + /* istanbul ignore file */ + /* https://github.com/nodejs/node/blob/6eec858f34a40ffa489c1ec54bb24da72a28c781/lib/internal/http2/compat.js#L195-L272 */ - throw cacheError; - }; + const proxySocketHandler = { + has(stream, property) { + // Replaced [kSocket] with .socket + const reference = + stream.session === undefined ? stream : stream.session.socket; + return property in stream || property in reference; + }, + + get(stream, property) { + switch (property) { + case "on": + case "once": + case "end": + case "emit": + case "destroy": + return stream[property].bind(stream); + case "writable": + case "destroyed": + return stream[property]; + case "readable": + if (stream.destroyed) { + return false; + } + + return stream.readable; + case "setTimeout": { + const { session } = stream; + if (session !== undefined) { + return session.setTimeout.bind(session); + } + + return stream.setTimeout.bind(stream); } - if (isIterable(this._cache)) { - this._tick(cacheTtl); + case "write": + case "read": + case "pause": + case "resume": + throw new ERR_HTTP2_NO_SOCKET_MANIPULATION(); + default: { + // Replaced [kSocket] with .socket + const reference = + stream.session === undefined ? stream : stream.session.socket; + const value = reference[property]; + + return typeof value === "function" + ? value.bind(reference) + : value; } } - } + }, - async queryAndCache(hostname) { - if (this._hostnamesToFallback.has(hostname)) { - return this._dnsLookup(hostname, all); + getPrototypeOf(stream) { + if (stream.session !== undefined) { + // Replaced [kSocket] with .socket + return Reflect.getPrototypeOf(stream.session.socket); } - let query = await this._resolve(hostname); + return Reflect.getPrototypeOf(stream); + }, - if (query.entries.length === 0 && this._fallback) { - query = await this._lookup(hostname); + set(stream, property, value) { + switch (property) { + case "writable": + case "readable": + case "destroyed": + case "on": + case "once": + case "end": + case "emit": + case "destroy": + stream[property] = value; + return true; + case "setTimeout": { + const { session } = stream; + if (session === undefined) { + stream.setTimeout = value; + } else { + session.setTimeout = value; + } - if (query.entries.length !== 0) { - // Use `dns.lookup(...)` for that particular hostname - this._hostnamesToFallback.add(hostname); + return true; } - } - const cacheTtl = - query.entries.length === 0 ? this.errorTtl : query.cacheTtl; - await this._set(hostname, query.entries, cacheTtl); + case "write": + case "read": + case "pause": + case "resume": + throw new ERR_HTTP2_NO_SOCKET_MANIPULATION(); + default: { + // Replaced [kSocket] with .socket + const reference = + stream.session === undefined ? stream : stream.session.socket; + reference[property] = value; + return true; + } + } + }, + }; - return query.entries; - } + module.exports = proxySocketHandler; - _tick(ms) { - const nextRemovalTime = this._nextRemovalTime; + /***/ + }, - if (!nextRemovalTime || ms < nextRemovalTime) { - clearTimeout(this._removalTimeout); + /***/ 1212: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; - this._nextRemovalTime = ms; + const { ERR_INVALID_HTTP_TOKEN } = __nccwpck_require__(9731); + const isRequestPseudoHeader = __nccwpck_require__(6365); - this._removalTimeout = setTimeout(() => { - this._nextRemovalTime = false; + const isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/; - let nextExpiry = Infinity; + module.exports = (name) => { + if ( + typeof name !== "string" || + (!isValidHttpToken.test(name) && !isRequestPseudoHeader(name)) + ) { + throw new ERR_INVALID_HTTP_TOKEN("Header name", name); + } + }; - const now = Date.now(); + /***/ + }, - for (const [hostname, entries] of this._cache) { - const expires = entries[kExpires]; + /***/ 6462: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; - if (now >= expires) { - this._cache.delete(hostname); - } else if (expires < nextExpiry) { - nextExpiry = expires; - } - } + const { ERR_HTTP_INVALID_HEADER_VALUE, ERR_INVALID_CHAR } = + __nccwpck_require__(9731); - if (nextExpiry !== Infinity) { - this._tick(nextExpiry - now); - } - }, ms); + const isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/; - /* istanbul ignore next: There is no `timeout.unref()` when running inside an Electron renderer */ - if (this._removalTimeout.unref) { - this._removalTimeout.unref(); - } - } + module.exports = (name, value) => { + if (typeof value === "undefined") { + throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); } - install(agent) { - verifyAgent(agent); + if (isInvalidHeaderValue.test(value)) { + throw new ERR_INVALID_CHAR("header content", name); + } + }; - if (kCacheableLookupCreateConnection in agent) { - throw new Error("CacheableLookup has been already installed"); - } + /***/ + }, - agent[kCacheableLookupCreateConnection] = agent.createConnection; - agent[kCacheableLookupInstance] = this; + /***/ 5475: /***/ (module) => { + "use strict"; - agent.createConnection = (options, callback) => { - if (!("lookup" in options)) { - options.lookup = this.lookup; - } + class QuickLRU { + constructor(options = {}) { + if (!(options.maxSize && options.maxSize > 0)) { + throw new TypeError("`maxSize` must be a number greater than 0"); + } - return agent[kCacheableLookupCreateConnection](options, callback); - }; + this.maxSize = options.maxSize; + this.onEviction = options.onEviction; + this.cache = new Map(); + this.oldCache = new Map(); + this._size = 0; } - uninstall(agent) { - verifyAgent(agent); + _set(key, value) { + this.cache.set(key, value); + this._size++; - if (agent[kCacheableLookupCreateConnection]) { - if (agent[kCacheableLookupInstance] !== this) { - throw new Error( - "The agent is not owned by this CacheableLookup instance" - ); - } + if (this._size >= this.maxSize) { + this._size = 0; - agent.createConnection = agent[kCacheableLookupCreateConnection]; + if (typeof this.onEviction === "function") { + for (const [key, value] of this.oldCache.entries()) { + this.onEviction(key, value); + } + } - delete agent[kCacheableLookupCreateConnection]; - delete agent[kCacheableLookupInstance]; + this.oldCache = this.cache; + this.cache = new Map(); } } - updateInterfaceInfo() { - const { _iface } = this; - - this._iface = getIfaceInfo(); + get(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } - if ( - (_iface.has4 && !this._iface.has4) || - (_iface.has6 && !this._iface.has6) - ) { - this._cache.clear(); + if (this.oldCache.has(key)) { + const value = this.oldCache.get(key); + this.oldCache.delete(key); + this._set(key, value); + return value; } } - clear(hostname) { - if (hostname) { - this._cache.delete(hostname); - return; + set(key, value) { + if (this.cache.has(key)) { + this.cache.set(key, value); + } else { + this._set(key, value); } - this._cache.clear(); + return this; } - } - module.exports = CacheableLookup; - module.exports["default"] = CacheableLookup; - - /***/ - }, + has(key) { + return this.cache.has(key) || this.oldCache.has(key); + } - /***/ 8116: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + peek(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } - const EventEmitter = __nccwpck_require__(2361); - const urlLib = __nccwpck_require__(7310); - const normalizeUrl = __nccwpck_require__(7952); - const getStream = __nccwpck_require__(1766); - const CachePolicy = __nccwpck_require__(1002); - const Response = __nccwpck_require__(9004); - const lowercaseKeys = __nccwpck_require__(9662); - const cloneResponse = __nccwpck_require__(1312); - const Keyv = __nccwpck_require__(1531); + if (this.oldCache.has(key)) { + return this.oldCache.get(key); + } + } - class CacheableRequest { - constructor(request, cacheAdapter) { - if (typeof request !== "function") { - throw new TypeError("Parameter `request` must be a function"); + delete(key) { + const deleted = this.cache.delete(key); + if (deleted) { + this._size--; } - this.cache = new Keyv({ - uri: typeof cacheAdapter === "string" && cacheAdapter, - store: typeof cacheAdapter !== "string" && cacheAdapter, - namespace: "cacheable-request", - }); + return this.oldCache.delete(key) || deleted; + } - return this.createCacheableRequest(request); + clear() { + this.cache.clear(); + this.oldCache.clear(); + this._size = 0; } - createCacheableRequest(request) { - return (opts, cb) => { - let url; - if (typeof opts === "string") { - url = normalizeUrlObject(urlLib.parse(opts)); - opts = {}; - } else if (opts instanceof urlLib.URL) { - url = normalizeUrlObject(urlLib.parse(opts.toString())); - opts = {}; - } else { - const [pathname, ...searchParts] = (opts.path || "").split("?"); - const search = - searchParts.length > 0 ? `?${searchParts.join("?")}` : ""; - url = normalizeUrlObject({ ...opts, pathname, search }); - } - - opts = { - headers: {}, - method: "GET", - cache: true, - strictTtl: false, - automaticFailover: false, - ...opts, - ...urlObjectToRequestOptions(url), - }; - opts.headers = lowercaseKeys(opts.headers); - - const ee = new EventEmitter(); - const normalizedUrlString = normalizeUrl(urlLib.format(url), { - stripWWW: false, - removeTrailingSlash: false, - stripAuthentication: false, - }); - const key = `${opts.method}:${normalizedUrlString}`; - let revalidate = false; - let madeRequest = false; + *keys() { + for (const [key] of this) { + yield key; + } + } - const makeRequest = (opts) => { - madeRequest = true; - let requestErrored = false; - let requestErrorCallback; + *values() { + for (const [, value] of this) { + yield value; + } + } - const requestErrorPromise = new Promise((resolve) => { - requestErrorCallback = () => { - if (!requestErrored) { - requestErrored = true; - resolve(); - } - }; - }); + *[Symbol.iterator]() { + for (const item of this.cache) { + yield item; + } - const handler = (response) => { - if (revalidate && !opts.forceRefresh) { - response.status = response.statusCode; - const revalidatedPolicy = CachePolicy.fromObject( - revalidate.cachePolicy - ).revalidatedPolicy(opts, response); - if (!revalidatedPolicy.modified) { - const headers = revalidatedPolicy.policy.responseHeaders(); - response = new Response( - revalidate.statusCode, - headers, - revalidate.body, - revalidate.url - ); - response.cachePolicy = revalidatedPolicy.policy; - response.fromCache = true; - } - } + for (const item of this.oldCache) { + const [key] = item; + if (!this.cache.has(key)) { + yield item; + } + } + } - if (!response.fromCache) { - response.cachePolicy = new CachePolicy(opts, response, opts); - response.fromCache = false; - } + get size() { + let oldCacheSize = 0; + for (const key of this.oldCache.keys()) { + if (!this.cache.has(key)) { + oldCacheSize++; + } + } - let clonedResponse; - if (opts.cache && response.cachePolicy.storable()) { - clonedResponse = cloneResponse(response); + return Math.min(this._size + oldCacheSize, this.maxSize); + } + } - (async () => { - try { - const bodyPromise = getStream.buffer(response); + module.exports = QuickLRU; - await Promise.race([ - requestErrorPromise, - new Promise((resolve) => response.once("end", resolve)), - ]); + /***/ + }, - if (requestErrored) { - return; - } + /***/ 8824: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; - const body = await bodyPromise; + const tls = __nccwpck_require__(4756); - const value = { - cachePolicy: response.cachePolicy.toObject(), - url: response.url, - statusCode: response.fromCache - ? revalidate.statusCode - : response.statusCode, - body, - }; + module.exports = (options = {}, connect = tls.connect) => + new Promise((resolve, reject) => { + let timeout = false; - let ttl = opts.strictTtl - ? response.cachePolicy.timeToLive() - : undefined; - if (opts.maxTtl) { - ttl = ttl ? Math.min(ttl, opts.maxTtl) : opts.maxTtl; - } + let socket; - await this.cache.set(key, value, ttl); - } catch (error) { - ee.emit("error", new CacheableRequest.CacheError(error)); - } - })(); - } else if (opts.cache && revalidate) { - (async () => { - try { - await this.cache.delete(key); - } catch (error) { - ee.emit("error", new CacheableRequest.CacheError(error)); - } - })(); - } + const callback = async () => { + await socketPromise; - ee.emit("response", clonedResponse || response); - if (typeof cb === "function") { - cb(clonedResponse || response); - } - }; + socket.off("timeout", onTimeout); + socket.off("error", reject); - try { - const req = request(opts, handler); - req.once("error", requestErrorCallback); - req.once("abort", requestErrorCallback); - ee.emit("request", req); - } catch (error) { - ee.emit("error", new CacheableRequest.RequestError(error)); - } - }; + if (options.resolveSocket) { + resolve({ alpnProtocol: socket.alpnProtocol, socket, timeout }); - (async () => { - const get = async (opts) => { + if (timeout) { await Promise.resolve(); - - const cacheEntry = opts.cache - ? await this.cache.get(key) - : undefined; - if (typeof cacheEntry === "undefined") { - return makeRequest(opts); - } - - const policy = CachePolicy.fromObject(cacheEntry.cachePolicy); - if ( - policy.satisfiesWithoutRevalidation(opts) && - !opts.forceRefresh - ) { - const headers = policy.responseHeaders(); - const response = new Response( - cacheEntry.statusCode, - headers, - cacheEntry.body, - cacheEntry.url - ); - response.cachePolicy = policy; - response.fromCache = true; - - ee.emit("response", response); - if (typeof cb === "function") { - cb(response); - } - } else { - revalidate = cacheEntry; - opts.headers = policy.revalidationHeaders(opts); - makeRequest(opts); - } - }; - - const errorHandler = (error) => - ee.emit("error", new CacheableRequest.CacheError(error)); - this.cache.once("error", errorHandler); - ee.on("response", () => - this.cache.removeListener("error", errorHandler) - ); - - try { - await get(opts); - } catch (error) { - if (opts.automaticFailover && !madeRequest) { - makeRequest(opts); - } - - ee.emit("error", new CacheableRequest.CacheError(error)); + socket.emit("timeout"); } - })(); - - return ee; + } else { + socket.destroy(); + resolve({ alpnProtocol: socket.alpnProtocol, timeout }); + } }; - } - } - - function urlObjectToRequestOptions(url) { - const options = { ...url }; - options.path = `${url.pathname || "/"}${url.search || ""}`; - delete options.pathname; - delete options.search; - return options; - } - - function normalizeUrlObject(url) { - // If url was parsed by url.parse or new URL: - // - hostname will be set - // - host will be hostname[:port] - // - port will be set if it was explicit in the parsed string - // Otherwise, url was from request options: - // - hostname or host may be set - // - host shall not have port encoded - return { - protocol: url.protocol, - auth: url.auth, - hostname: url.hostname || url.host || "localhost", - port: url.port, - pathname: url.pathname, - search: url.search, - }; - } - CacheableRequest.RequestError = class extends Error { - constructor(error) { - super(error.message); - this.name = "RequestError"; - Object.assign(this, error); - } - }; + const onTimeout = async () => { + timeout = true; + callback(); + }; - CacheableRequest.CacheError = class extends Error { - constructor(error) { - super(error.message); - this.name = "CacheError"; - Object.assign(this, error); - } - }; + const socketPromise = (async () => { + try { + socket = await connect(options, callback); - module.exports = CacheableRequest; + socket.on("error", reject); + socket.once("timeout", onTimeout); + } catch (error) { + reject(error); + } + })(); + }); /***/ }, - /***/ 1312: /***/ ( + /***/ 770: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { - "use strict"; - - const PassThrough = __nccwpck_require__(2781).PassThrough; - const mimicResponse = __nccwpck_require__(2610); - - const cloneResponse = (response) => { - if (!(response && response.pipe)) { - throw new TypeError( - "Parameter `response` must be a response stream." - ); - } - - const clone = new PassThrough(); - mimicResponse(response, clone); - - return response.pipe(clone); - }; - - module.exports = cloneResponse; + module.exports = __nccwpck_require__(218); /***/ }, - /***/ 2391: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ + /***/ 218: /***/ ( + __unused_webpack_module, + exports, + __nccwpck_require__, ) => { "use strict"; + var __webpack_unused_export__; - const { Transform, PassThrough } = __nccwpck_require__(2781); - const zlib = __nccwpck_require__(9796); - const mimicResponse = __nccwpck_require__(3877); - - module.exports = (response) => { - const contentEncoding = ( - response.headers["content-encoding"] || "" - ).toLowerCase(); + var net = __nccwpck_require__(9278); + var tls = __nccwpck_require__(4756); + var http = __nccwpck_require__(8611); + var https = __nccwpck_require__(5692); + var events = __nccwpck_require__(4434); + var assert = __nccwpck_require__(2613); + var util = __nccwpck_require__(9023); - if (!["gzip", "deflate", "br"].includes(contentEncoding)) { - return response; - } + exports.httpOverHttp = httpOverHttp; + exports.httpsOverHttp = httpsOverHttp; + exports.httpOverHttps = httpOverHttps; + exports.httpsOverHttps = httpsOverHttps; - // TODO: Remove this when targeting Node.js 12. - const isBrotli = contentEncoding === "br"; - if (isBrotli && typeof zlib.createBrotliDecompress !== "function") { - response.destroy( - new Error("Brotli is not supported on Node.js < 12") - ); - return response; - } + function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; + } - let isEmpty = true; + function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } - const checker = new Transform({ - transform(data, _encoding, callback) { - isEmpty = false; + function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; + } - callback(null, data); - }, + function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } - flush(callback) { - callback(); - }, + 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); - const finalStream = new PassThrough({ - autoDestroy: false, - destroy(error, callback) { - response.destroy(); + TunnelingAgent.prototype.addRequest = function addRequest( + req, + host, + port, + localAddress, + ) { + var self = this; + var options = mergeOptions( + { request: req }, + self.options, + toOptions(host, port, localAddress), + ); - callback(error); - }, - }); + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } - const decompressStream = isBrotli - ? zlib.createBrotliDecompress() - : zlib.createUnzip(); + // 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); - decompressStream.once("error", (error) => { - if (isEmpty && !response.readable) { - finalStream.end(); - return; + function onFree() { + self.emit("free", socket, options); } - finalStream.destroy(error); + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } }); - - mimicResponse(response, finalStream); - response.pipe(checker).pipe(decompressStream).pipe(finalStream); - - return finalStream; }; - /***/ - }, + TunnelingAgent.prototype.createSocket = function createSocket( + options, + cb, + ) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); - /***/ 3877: /***/ (module) => { - "use strict"; + 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"); + } - // We define these manually to ensure they're always copied - // even if they would move up the prototype chain - // https://nodejs.org/api/http.html#http_class_http_incomingmessage - const knownProperties = [ - "aborted", - "complete", - "headers", - "httpVersion", - "httpVersionMinor", - "httpVersionMajor", - "method", - "rawHeaders", - "rawTrailers", - "setTimeout", - "socket", - "statusCode", - "statusMessage", - "trailers", - "url", - ]; + 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(); - module.exports = (fromStream, toStream) => { - if (toStream._readableState.autoDestroy) { - throw new Error( - "The second stream must have the `autoDestroy` option set to `false`" - ); + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; } - const fromProperties = new Set( - Object.keys(fromStream).concat(knownProperties) - ); + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function () { + onConnect(res, socket, head); + }); + } - const properties = {}; + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); - for (const property of fromProperties) { - // Don't overwrite existing properties. - if (property in toStream) { - continue; + 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; } - - properties[property] = { - get() { - const value = fromStream[property]; - const isFunction = typeof value === "function"; - - return isFunction ? value.bind(fromStream) : value; - }, - set(value) { - fromStream[property] = value; - }, - enumerable: true, - configurable: false, - }; + 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); } - Object.defineProperties(toStream, properties); - - fromStream.once("aborted", () => { - toStream.destroy(); + function onError(cause) { + connectReq.removeAllListeners(); - toStream.emit("aborted"); - }); + 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); + } + }; - fromStream.once("close", () => { - if (fromStream.complete) { - if (toStream.readable) { - toStream.once("end", () => { - toStream.emit("close"); - }); - } else { - toStream.emit("close"); - } - } else { - toStream.emit("close"); - } - }); + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); - return toStream; + 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); + }); + } }; - /***/ - }, - - /***/ 6214: /***/ (module, exports) => { - "use strict"; + 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, + }); - Object.defineProperty(exports, "__esModule", { value: true }); - function isTLSSocket(socket) { - return socket.encrypted; + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }, + ); } - const deferToConnect = (socket, fn) => { - let listeners; - if (typeof fn === "function") { - const connect = fn; - listeners = { connect }; - } else { - listeners = fn; - } - const hasConnectListener = typeof listeners.connect === "function"; - const hasSecureConnectListener = - typeof listeners.secureConnect === "function"; - const hasCloseListener = typeof listeners.close === "function"; - const onConnect = () => { - if (hasConnectListener) { - listeners.connect(); - } - if (isTLSSocket(socket) && hasSecureConnectListener) { - if (socket.authorized) { - listeners.secureConnect(); - } else if (!socket.authorizationError) { - socket.once("secureConnect", listeners.secureConnect); + + 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]; + } } } - if (hasCloseListener) { - socket.once("close", listeners.close); + } + 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); }; - if (socket.writable && !socket.connecting) { - onConnect(); - } else if (socket.connecting) { - socket.once("connect", onConnect); - } else if (socket.destroyed && hasCloseListener) { - listeners.close(socket._hadError); - } - }; - exports["default"] = deferToConnect; - // For CommonJS default export support - module.exports = deferToConnect; - module.exports["default"] = deferToConnect; + } else { + debug = function () {}; + } + __webpack_unused_export__ = debug; // for test /***/ }, - /***/ 1205: /***/ ( + /***/ 6752: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { - var once = __nccwpck_require__(1223); - - var noop = function () {}; - - var isRequest = function (stream) { - return stream.setHeader && typeof stream.abort === "function"; + "use strict"; + var __webpack_unused_export__; + + const Client = __nccwpck_require__(3701); + const Dispatcher = __nccwpck_require__(883); + const Pool = __nccwpck_require__(628); + const BalancedPool = __nccwpck_require__(837); + const Agent = __nccwpck_require__(7405); + const ProxyAgent = __nccwpck_require__(6672); + const EnvHttpProxyAgent = __nccwpck_require__(3137); + const RetryAgent = __nccwpck_require__(50); + const errors = __nccwpck_require__(8707); + const util = __nccwpck_require__(3440); + const { InvalidArgumentError } = errors; + const api = __nccwpck_require__(6615); + const buildConnector = __nccwpck_require__(9136); + const MockClient = __nccwpck_require__(7365); + const MockAgent = __nccwpck_require__(7501); + const MockPool = __nccwpck_require__(4004); + const mockErrors = __nccwpck_require__(2429); + const RetryHandler = __nccwpck_require__(7816); + const { getGlobalDispatcher, setGlobalDispatcher } = + __nccwpck_require__(2581); + const DecoratorHandler = __nccwpck_require__(8155); + const RedirectHandler = __nccwpck_require__(8754); + const createRedirectInterceptor = __nccwpck_require__(5092); + + Object.assign(Dispatcher.prototype, api); + + __webpack_unused_export__ = Dispatcher; + __webpack_unused_export__ = Client; + __webpack_unused_export__ = Pool; + __webpack_unused_export__ = BalancedPool; + __webpack_unused_export__ = Agent; + module.exports.kT = ProxyAgent; + __webpack_unused_export__ = EnvHttpProxyAgent; + __webpack_unused_export__ = RetryAgent; + __webpack_unused_export__ = RetryHandler; + + __webpack_unused_export__ = DecoratorHandler; + __webpack_unused_export__ = RedirectHandler; + __webpack_unused_export__ = createRedirectInterceptor; + __webpack_unused_export__ = { + redirect: __nccwpck_require__(1514), + retry: __nccwpck_require__(2026), + dump: __nccwpck_require__(8060), + dns: __nccwpck_require__(379), }; - var isChildProcess = function (stream) { - return ( - stream.stdio && - Array.isArray(stream.stdio) && - stream.stdio.length === 3 - ); + __webpack_unused_export__ = buildConnector; + __webpack_unused_export__ = errors; + __webpack_unused_export__ = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString, }; - var eos = function (stream, opts, callback) { - if (typeof opts === "function") return eos(stream, null, opts); - if (!opts) opts = {}; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } - callback = once(callback || noop); + if ( + !url || + (typeof url !== "string" && + typeof url !== "object" && + !(url instanceof URL)) + ) { + throw new InvalidArgumentError("invalid url"); + } - var ws = stream._writableState; - var rs = stream._readableState; - var readable = - opts.readable || (opts.readable !== false && stream.readable); - var writable = - opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; + if (opts != null && typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } - var onlegacyfinish = function () { - if (!stream.writable) onfinish(); - }; + if (opts && opts.path != null) { + if (typeof opts.path !== "string") { + throw new InvalidArgumentError("invalid opts.path"); + } - var onfinish = function () { - writable = false; - if (!readable) callback.call(stream); - }; + let path = opts.path; + if (!opts.path.startsWith("/")) { + path = `/${path}`; + } - var onend = function () { - readable = false; - if (!writable) callback.call(stream); - }; + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) { + opts = typeof url === "object" ? url : {}; + } - var onexit = function (exitCode) { - callback.call( - stream, - exitCode ? new Error("exited with error code: " + exitCode) : null - ); - }; + url = util.parseURL(url); + } - var onerror = function (err) { - callback.call(stream, err); - }; + const { agent, dispatcher = getGlobalDispatcher() } = opts; - var onclose = function () { - process.nextTick(onclosenexttick); - }; + if (agent) { + throw new InvalidArgumentError( + "unsupported opts.agent. Did you mean opts.client?", + ); + } - var onclosenexttick = function () { - if (cancelled) return; - if (readable && !(rs && rs.ended && !rs.destroyed)) - return callback.call(stream, new Error("premature close")); - if (writable && !(ws && ws.ended && !ws.destroyed)) - return callback.call(stream, new Error("premature close")); + 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, + ); }; + } - var onrequest = function () { - stream.req.on("finish", onfinish); - }; + __webpack_unused_export__ = setGlobalDispatcher; + __webpack_unused_export__ = getGlobalDispatcher; - if (isRequest(stream)) { - stream.on("complete", onfinish); - stream.on("abort", onclose); - if (stream.req) onrequest(); - else stream.on("request", onrequest); - } else if (writable && !ws) { - // legacy streams - stream.on("end", onlegacyfinish); - stream.on("close", onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on("exit", onexit); - - stream.on("end", onend); - stream.on("finish", onfinish); - if (opts.error !== false) stream.on("error", onerror); - stream.on("close", onclose); - - return function () { - cancelled = true; - 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("exit", onexit); - stream.removeListener("end", onend); - stream.removeListener("error", onerror); - stream.removeListener("close", onclose); - }; + const fetchImpl = __nccwpck_require__(4398).fetch; + __webpack_unused_export__ = async function fetch( + init, + options = undefined, + ) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") { + Error.captureStackTrace(err); + } + + throw err; + } }; + /* unused reexport */ __nccwpck_require__(660).Headers; + /* unused reexport */ __nccwpck_require__(9051).Response; + /* unused reexport */ __nccwpck_require__(9967).Request; + /* unused reexport */ __nccwpck_require__(5910).FormData; + __webpack_unused_export__ = + globalThis.File ?? __nccwpck_require__(4573).File; + /* unused reexport */ __nccwpck_require__(8355).FileReader; + + const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(1059); + + __webpack_unused_export__ = setGlobalOrigin; + __webpack_unused_export__ = getGlobalOrigin; + + const { CacheStorage } = __nccwpck_require__(3245); + const { kConstruct } = __nccwpck_require__(109); + + // 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. + __webpack_unused_export__ = new CacheStorage(kConstruct); + + const { deleteCookie, getCookies, getSetCookies, setCookie } = + __nccwpck_require__(9061); + + __webpack_unused_export__ = deleteCookie; + __webpack_unused_export__ = getCookies; + __webpack_unused_export__ = getSetCookies; + __webpack_unused_export__ = setCookie; + + const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(1900); + + __webpack_unused_export__ = parseMIMEType; + __webpack_unused_export__ = serializeAMimeType; + + const { CloseEvent, ErrorEvent, MessageEvent } = + __nccwpck_require__(5188); + /* unused reexport */ __nccwpck_require__(3726).WebSocket; + __webpack_unused_export__ = CloseEvent; + __webpack_unused_export__ = ErrorEvent; + __webpack_unused_export__ = MessageEvent; + + __webpack_unused_export__ = makeDispatcher(api.request); + __webpack_unused_export__ = makeDispatcher(api.stream); + __webpack_unused_export__ = makeDispatcher(api.pipeline); + __webpack_unused_export__ = makeDispatcher(api.connect); + __webpack_unused_export__ = makeDispatcher(api.upgrade); + + __webpack_unused_export__ = MockClient; + __webpack_unused_export__ = MockPool; + __webpack_unused_export__ = MockAgent; + __webpack_unused_export__ = mockErrors; + + const { EventSource } = __nccwpck_require__(1238); - module.exports = eos; + __webpack_unused_export__ = EventSource; /***/ }, - /***/ 1585: /***/ ( + /***/ 158: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { - "use strict"; - - const { PassThrough: PassThroughStream } = __nccwpck_require__(2781); + const { addAbortListener } = __nccwpck_require__(3440); + const { RequestAbortedError } = __nccwpck_require__(8707); - module.exports = (options) => { - options = { ...options }; + const kListener = Symbol("kListener"); + const kSignal = Symbol("kSignal"); - const { array } = options; - let { encoding } = options; - const isBuffer = encoding === "buffer"; - let objectMode = false; - - if (array) { - objectMode = !(encoding || isBuffer); + function abort(self) { + if (self.abort) { + self.abort(self[kSignal]?.reason); } else { - encoding = encoding || "utf8"; + self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); } + removeSignal(self); + } - if (isBuffer) { - encoding = null; - } + function addSignal(self, signal) { + self.reason = null; - const stream = new PassThroughStream({ objectMode }); + self[kSignal] = null; + self[kListener] = null; - if (encoding) { - stream.setEncoding(encoding); + if (!signal) { + return; } - let length = 0; - const chunks = []; + if (signal.aborted) { + abort(self); + return; + } - stream.on("data", (chunk) => { - chunks.push(chunk); + self[kSignal] = signal; + self[kListener] = () => { + abort(self); + }; - if (objectMode) { - length = chunks.length; - } else { - length += chunk.length; - } - }); + addAbortListener(self[kSignal], self[kListener]); + } - stream.getBufferedValue = () => { - if (array) { - return chunks; - } + function removeSignal(self) { + if (!self[kSignal]) { + return; + } - return isBuffer ? Buffer.concat(chunks, length) : chunks.join(""); - }; + if ("removeEventListener" in self[kSignal]) { + self[kSignal].removeEventListener("abort", self[kListener]); + } else { + self[kSignal].removeListener("abort", self[kListener]); + } - stream.getBufferedLength = () => length; + self[kSignal] = null; + self[kListener] = null; + } - return stream; + module.exports = { + addSignal, + removeSignal, }; /***/ }, - /***/ 1766: /***/ ( + /***/ 2279: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { "use strict"; - const { constants: BufferConstants } = __nccwpck_require__(4300); - const pump = __nccwpck_require__(8341); - const bufferStream = __nccwpck_require__(1585); + const assert = __nccwpck_require__(4589); + const { AsyncResource } = __nccwpck_require__(6698); + const { InvalidArgumentError, SocketError } = __nccwpck_require__(8707); + const util = __nccwpck_require__(3440); + const { addSignal, removeSignal } = __nccwpck_require__(158); - class MaxBufferError extends Error { - constructor() { - super("maxBuffer exceeded"); - this.name = "MaxBufferError"; + 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); } - } - async function getStream(inputStream, options) { - if (!inputStream) { - return Promise.reject(new Error("Expected a stream")); + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + + assert(this.callback); + + this.abort = abort; + this.context = context; } - options = { - maxBuffer: Infinity, - ...options, - }; + onHeaders() { + throw new SocketError("bad connect", null); + } - const { maxBuffer } = options; + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; - let stream; - await new Promise((resolve, reject) => { - const rejectPromise = (error) => { - // Don't retrieve an oversized buffer. - if ( - error && - stream.getBufferedLength() <= BufferConstants.MAX_LENGTH - ) { - error.bufferedData = stream.getBufferedValue(); - } + removeSignal(this); - reject(error); - }; + this.callback = null; - stream = pump(inputStream, bufferStream(options), (error) => { - if (error) { - rejectPromise(error); - return; - } + let headers = rawHeaders; + // Indicates is an HTTP2Session + if (headers != null) { + headers = + this.responseHeaders === "raw" + ? util.parseRawHeaders(rawHeaders) + : util.parseHeaders(rawHeaders); + } - resolve(); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context, }); + } - stream.on("data", () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } + 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); + }); }); - }); + } - return stream.getBufferedValue(); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ ...opts, method: "CONNECT" }, connectHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } - module.exports = getStream; - // TODO: Remove this for the next major release - module.exports["default"] = getStream; - module.exports.buffer = (stream, options) => - getStream(stream, { ...options, encoding: "buffer" }); - module.exports.array = (stream, options) => - getStream(stream, { ...options, array: true }); - module.exports.MaxBufferError = MaxBufferError; + module.exports = connect; /***/ }, - /***/ 1046: /***/ ( + /***/ 6862: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { - var balanced = __nccwpck_require__(9417); - - module.exports = expandTop; - - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - - function numeric(str) { - return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); - } - - function escapeBraces(str) { - return str - .split("\\\\") - .join(escSlash) - .split("\\{") - .join(escOpen) - .split("\\}") - .join(escClose) - .split("\\,") - .join(escComma) - .split("\\.") - .join(escPeriod); - } - - function unescapeBraces(str) { - return str - .split(escSlash) - .join("\\") - .split(escOpen) - .join("{") - .split(escClose) - .join("}") - .split(escComma) - .join(",") - .split(escPeriod) - .join("."); - } - - // Basically just str.split(","), but handling cases - // where we have nested braced sections, which should be - // treated as individual members, like {a,{b,c},d} - function parseCommaParts(str) { - if (!str) return [""]; + "use strict"; - var parts = []; - var m = balanced("{", "}", str); + const { Readable, Duplex, PassThrough } = __nccwpck_require__(7075); + const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + } = __nccwpck_require__(8707); + const util = __nccwpck_require__(3440); + const { AsyncResource } = __nccwpck_require__(6698); + const { addSignal, removeSignal } = __nccwpck_require__(158); + const assert = __nccwpck_require__(4589); + + const kResume = Symbol("resume"); + + class PipelineRequest extends Readable { + constructor() { + super({ autoDestroy: true }); - if (!m) return str.split(","); + this[kResume] = null; + } - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); + _read() { + const { [kResume]: resume } = this; - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); + if (resume) { + this[kResume] = null; + resume(); + } } - parts.push.apply(parts, p); + _destroy(err, callback) { + this._read(); - return parts; + callback(err); + } } - function expandTop(str) { - if (!str) return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === "{}") { - str = "\\{\\}" + str.substr(2); + class PipelineResponse extends Readable { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; } - return expand(escapeBraces(str), true).map(unescapeBraces); - } + _read() { + this[kResume](); + } - function embrace(str) { - return "{" + str + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); + } - function lte(i, y) { - return i <= y; - } - function gte(i, y) { - return i >= y; + callback(err); + } } - function expand(str, isTop) { - var expansions = []; + class PipelineHandler extends AsyncResource { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } - var m = balanced("{", "}", str); - if (!m) return [str]; + if (typeof handler !== "function") { + throw new InvalidArgumentError("invalid handler"); + } - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; + const { signal, method, opaque, onInfo, responseHeaders } = opts; - if (/\$$/.test(m.pre)) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + "{" + m.body + "}" + post[k]; - expansions.push(expansion); + if ( + signal && + typeof signal.on !== "function" && + typeof signal.addEventListener !== "function" + ) { + throw new InvalidArgumentError( + "signal must be an EventEmitter or EventTarget", + ); } - } else { - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test( - m.body - ); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + "{" + m.body + escClose + m.post; - return expand(str); - } - return [str]; + + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - return post.map(function (p) { - return m.pre + n[0] + p; - }); - } - } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); } - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - var N; + super("UNDICI_PIPELINE"); - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); + 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; - N = []; + if (body?.resume) { + body.resume(); + } + }, + write: (chunk, encoding, callback) => { + const { req } = this; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") c = ""; + if (req.push(chunk, encoding) || req._readableState.destroyed) { + callback(); } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) c = "-" + z + c.slice(1); - else c = z + c; - } - } + req[kResume] = callback; } - N.push(c); - } - } else { - N = []; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; - for (var j = 0; j < n.length; j++) { - N.push.apply(N, expand(n[j], false)); - } - } + if (!err && !ret._readableState.endEmitted) { + err = new RequestAbortedError(); + } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) expansions.push(expansion); - } - } - } + if (abort && err) { + abort(); + } - return expansions; - } + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); - /***/ - }, + removeSignal(this); - /***/ 6457: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + callback(err); + }, + }).on("prefinish", () => { + const { req } = this; - Object.defineProperty(exports, "__esModule", { value: true }); - const types_1 = __nccwpck_require__(4597); - function createRejection(error, ...beforeErrorGroups) { - const promise = (async () => { - if (error instanceof types_1.RequestError) { - try { - for (const hooks of beforeErrorGroups) { - if (hooks) { - for (const hook of hooks) { - // eslint-disable-next-line no-await-in-loop - error = await hook(error); - } - } - } - } catch (error_) { - error = error_; - } - } - throw error; - })(); - const returnPromise = () => promise; - promise.json = returnPromise; - promise.text = returnPromise; - promise.buffer = returnPromise; - promise.on = returnPromise; - return promise; - } - exports["default"] = createRejection; + // Node < 15 does not call _final in same tick. + req.push(null); + }); - /***/ - }, + this.res = null; - /***/ 6056: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + addSignal(this, signal); + } - 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]; - }, - }); + onConnect(abort, context) { + const { ret, res } = this; + + if (this.reason) { + abort(this.reason); + return; + } + + assert(!res, "pipeline cannot be retried"); + assert(!ret.destroyed); + + 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 }); } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if ( - p !== "default" && - !Object.prototype.hasOwnProperty.call(exports, p) - ) - __createBinding(exports, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - const events_1 = __nccwpck_require__(2361); - const is_1 = __nccwpck_require__(7678); - const PCancelable = __nccwpck_require__(9072); - const types_1 = __nccwpck_require__(4597); - const parse_body_1 = __nccwpck_require__(8220); - const core_1 = __nccwpck_require__(94); - const proxy_events_1 = __nccwpck_require__(3021); - const get_buffer_1 = __nccwpck_require__(4500); - const is_response_ok_1 = __nccwpck_require__(9298); - const proxiedRequestEvents = [ - "request", - "response", - "redirect", - "uploadProgress", - "downloadProgress", - ]; - function asPromise(normalizedOptions) { - let globalRequest; - let globalResponse; - const emitter = new events_1.EventEmitter(); - const promise = new PCancelable((resolve, reject, onCancel) => { - const makeRequest = (retryCount) => { - const request = new core_1.default(undefined, normalizedOptions); - request.retryCount = retryCount; - request._noPipe = true; - onCancel(() => request.destroy()); - onCancel.shouldReject = false; - onCancel(() => reject(new types_1.CancelError(request))); - globalRequest = request; - request.once("response", async (response) => { - var _a; - response.retryCount = retryCount; - if (response.request.aborted) { - // Canceled while downloading - will throw a `CancelError` or `TimeoutError` error - return; - } - // Download body - let rawBody; - try { - rawBody = await get_buffer_1.default(request); - response.rawBody = rawBody; - } catch (_b) { - // The same error is caught below. - // See request.once('error') - return; - } - if (request._isAboutToError) { - return; - } - // Parse body - const contentEncoding = ((_a = - response.headers["content-encoding"]) !== null && _a !== void 0 - ? _a - : "" - ).toLowerCase(); - const isCompressed = ["gzip", "deflate", "br"].includes( - contentEncoding - ); - const { options } = request; - if (isCompressed && !options.decompress) { - response.body = rawBody; - } else { - try { - response.body = parse_body_1.default( - response, - options.responseType, - options.parseJson, - options.encoding - ); - } catch (error) { - // Fallback to `utf8` - response.body = rawBody.toString(); - if (is_response_ok_1.isResponseOk(response)) { - request._beforeError(error); - return; - } - } - } - try { - for (const [ - index, - hook, - ] of options.hooks.afterResponse.entries()) { - // @ts-expect-error TS doesn't notice that CancelableRequest is a Promise - // eslint-disable-next-line no-await-in-loop - response = await hook(response, async (updatedOptions) => { - const typedOptions = core_1.default.normalizeArguments( - undefined, - { - ...updatedOptions, - retry: { - calculateDelay: () => 0, - }, - throwHttpErrors: false, - resolveBodyOnly: false, - }, - options - ); - // Remove any further hooks for that request, because we'll call them anyway. - // The loop continues. We don't want duplicates (asPromise recursion). - typedOptions.hooks.afterResponse = typedOptions.hooks.afterResponse.slice( - 0, - index - ); - for (const hook of typedOptions.hooks.beforeRetry) { - // eslint-disable-next-line no-await-in-loop - await hook(typedOptions); - } - const promise = asPromise(typedOptions); - onCancel(() => { - promise.catch(() => {}); - promise.cancel(); - }); - return promise; - }); - } - } catch (error) { - request._beforeError( - new types_1.RequestError(error.message, error, request) - ); - return; - } - if (!is_response_ok_1.isResponseOk(response)) { - request._beforeError(new types_1.HTTPError(response)); - return; - } - globalResponse = response; - resolve( - request.options.resolveBodyOnly ? response.body : response - ); + 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, }); - const onError = (error) => { - if (promise.isCanceled) { - return; - } - const { options } = request; - if ( - error instanceof types_1.HTTPError && - !options.throwHttpErrors - ) { - const { response } = error; - resolve( - request.options.resolveBodyOnly ? response.body : response - ); - return; + } 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(); } - reject(error); - }; - request.once("error", onError); - const previousBody = request.options.body; - request.once("retry", (newRetryCount, error) => { - var _a, _b; - if ( - previousBody === - ((_a = error.request) === null || _a === void 0 - ? void 0 - : _a.options.body) && - is_1.default.nodeStream( - (_b = error.request) === null || _b === void 0 - ? void 0 - : _b.options.body - ) - ) { - onError(error); - return; + }) + .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()); } - makeRequest(newRetryCount); }); - proxy_events_1.default(request, emitter, proxiedRequestEvents); - }; - makeRequest(0); - }); - promise.on = (event, fn) => { - emitter.on(event, fn); - return promise; - }; - const shortcut = (responseType) => { - const newPromise = (async () => { - // Wait until downloading has ended - await promise; - const { options } = globalResponse.request; - return parse_body_1.default( - globalResponse, - responseType, - options.parseJson, - options.encoding - ); - })(); - Object.defineProperties( - newPromise, - Object.getOwnPropertyDescriptors(promise) - ); - return newPromise; - }; - promise.json = () => { - const { headers } = globalRequest.options; - if (!globalRequest.writableFinished && headers.accept === undefined) { - headers.accept = "application/json"; - } - return shortcut("json"); - }; - promise.buffer = () => shortcut("buffer"); - promise.text = () => shortcut("text"); - return promise; - } - exports["default"] = asPromise; - __exportStar(__nccwpck_require__(4597), exports); - /***/ - }, + this.body = body; + } - /***/ 1048: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + onData(chunk) { + const { res } = this; + return res.push(chunk); + } - Object.defineProperty(exports, "__esModule", { value: true }); - const is_1 = __nccwpck_require__(7678); - const normalizeArguments = (options, defaults) => { - if (is_1.default.null_(options.encoding)) { - throw new TypeError( - "To get a Buffer, set `options.responseType` to `buffer` instead" - ); + onComplete(trailers) { + const { res } = this; + res.push(null); } - is_1.assert.any( - [is_1.default.string, is_1.default.undefined], - options.encoding - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.resolveBodyOnly - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.methodRewriting - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.isStream - ); - is_1.assert.any( - [is_1.default.string, is_1.default.undefined], - options.responseType - ); - // `options.responseType` - if (options.responseType === undefined) { - options.responseType = "text"; - } - // `options.retry` - const { retry } = options; - if (defaults) { - options.retry = { ...defaults.retry }; - } else { - options.retry = { - calculateDelay: (retryObject) => retryObject.computedValue, - limit: 0, - methods: [], - statusCodes: [], - errorCodes: [], - maxRetryAfter: undefined, - }; + + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); } - if (is_1.default.object(retry)) { - options.retry = { - ...options.retry, - ...retry, - }; - options.retry.methods = [ - ...new Set( - options.retry.methods.map((method) => method.toUpperCase()) - ), - ]; - options.retry.statusCodes = [...new Set(options.retry.statusCodes)]; - options.retry.errorCodes = [...new Set(options.retry.errorCodes)]; - } else if (is_1.default.number(retry)) { - options.retry.limit = retry; - } - if (is_1.default.undefined(options.retry.maxRetryAfter)) { - options.retry.maxRetryAfter = Math.min( - // TypeScript is not smart enough to handle `.filter(x => is.number(x))`. - // eslint-disable-next-line unicorn/no-fn-reference-in-iterator - ...[options.timeout.request, options.timeout.connect].filter( - is_1.default.number - ) + } + + 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); } - // `options.pagination` - if (is_1.default.object(options.pagination)) { - if (defaults) { - options.pagination = { - ...defaults.pagination, - ...options.pagination, - }; - } - const { pagination } = options; - if (!is_1.default.function_(pagination.transform)) { - throw new Error( - "`options.pagination.transform` must be implemented" - ); - } - if (!is_1.default.function_(pagination.shouldContinue)) { - throw new Error( - "`options.pagination.shouldContinue` must be implemented" - ); - } - if (!is_1.default.function_(pagination.filter)) { - throw new TypeError( - "`options.pagination.filter` must be implemented" - ); - } - if (!is_1.default.function_(pagination.paginate)) { - throw new Error( - "`options.pagination.paginate` must be implemented" - ); - } - } - // JSON mode - if ( - options.responseType === "json" && - options.headers.accept === undefined - ) { - options.headers.accept = "application/json"; - } - return options; - }; - exports["default"] = normalizeArguments; + } + + module.exports = pipeline; /***/ }, - /***/ 8220: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ + /***/ 4043: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, ) => { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - const types_1 = __nccwpck_require__(4597); - const parseBody = (response, responseType, parseJson, encoding) => { - const { rawBody } = response; - try { - if (responseType === "text") { - return rawBody.toString(encoding); - } - if (responseType === "json") { - return rawBody.length === 0 ? "" : parseJson(rawBody.toString()); + const assert = __nccwpck_require__(4589); + const { Readable } = __nccwpck_require__(9927); + const { InvalidArgumentError, RequestAbortedError } = + __nccwpck_require__(8707); + const util = __nccwpck_require__(3440); + const { getResolveErrorBodyCallback } = __nccwpck_require__(7655); + const { AsyncResource } = __nccwpck_require__(6698); + + class RequestHandler extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); } - if (responseType === "buffer") { - return rawBody; + + 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; } - throw new types_1.ParseError( - { - message: `Unknown body type '${responseType}'`, - name: "Error", - }, - response - ); - } catch (error) { - throw new types_1.ParseError(error, response); - } - }; - exports["default"] = parseBody; - /***/ - }, + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + + if (util.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); + } - /***/ 4597: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + if (this.signal) { + if (this.signal.aborted) { + this.reason = this.signal.reason ?? new RequestAbortedError(); + } else { + this.removeAbortListener = util.addAbortListener( + this.signal, + () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) { + util.destroy(this.res.on("error", util.nop), this.reason); + } else if (this.abort) { + this.abort(this.reason); + } - 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]; + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } }, - }); + ); } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if ( - p !== "default" && - !Object.prototype.hasOwnProperty.call(exports, p) - ) - __createBinding(exports, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CancelError = exports.ParseError = void 0; - const core_1 = __nccwpck_require__(94); - /** -An error to be thrown when server response code is 2xx, and parsing body fails. -Includes a `response` property. -*/ - class ParseError extends core_1.RequestError { - constructor(error, response) { - const { options } = response.request; - super( - `${error.message} in "${options.url.toString()}"`, - error, - response.request - ); - this.name = "ParseError"; - } - } - exports.ParseError = ParseError; - /** -An error to be thrown when the request is aborted with `.cancel()`. -*/ - class CancelError extends core_1.RequestError { - constructor(request) { - super("Promise was canceled", {}, request); - this.name = "CancelError"; - } - get isCanceled() { - return true; + } } - } - exports.CancelError = CancelError; - __exportStar(__nccwpck_require__(94), exports); - /***/ - }, + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } - /***/ 3462: /***/ (__unused_webpack_module, exports) => { - "use strict"; + assert(this.callback); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.retryAfterStatusCodes = void 0; - exports.retryAfterStatusCodes = new Set([413, 429, 503]); - const calculateRetryDelay = ({ - attemptCount, - retryOptions, - error, - retryAfter, - }) => { - if (attemptCount > retryOptions.limit) { - return 0; - } - const hasMethod = retryOptions.methods.includes(error.options.method); - const hasErrorCode = retryOptions.errorCodes.includes(error.code); - const hasStatusCode = - error.response && - retryOptions.statusCodes.includes(error.response.statusCode); - if (!hasMethod || (!hasErrorCode && !hasStatusCode)) { - return 0; + this.abort = abort; + this.context = context; } - if (error.response) { - if (retryAfter) { - if ( - retryOptions.maxRetryAfter === undefined || - retryAfter > retryOptions.maxRetryAfter - ) { - return 0; + + 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 retryAfter; + return; } - if (error.response.statusCode === 413) { - return 0; + + const parsedHeaders = + responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: + this.method !== "HEAD" && contentLength + ? Number(contentLength) + : null, + highWaterMark, + }); + + if (this.removeAbortListener) { + res.on("close", this.removeAbortListener); + } + + this.callback = null; + this.res = res; + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers, + }); + } else { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context, + }); + } } } - const noise = Math.random() * 100; - return 2 ** (attemptCount - 1) * 1000 + noise; - }; - exports["default"] = calculateRetryDelay; - /***/ - }, + onData(chunk) { + return this.res.push(chunk); + } - /***/ 94: /***/ (__unused_webpack_module, exports, __nccwpck_require__) => { - "use strict"; + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.UnsupportedProtocolError = exports.ReadError = exports.TimeoutError = exports.UploadError = exports.CacheError = exports.HTTPError = exports.MaxRedirectsError = exports.RequestError = exports.setNonEnumerableProperties = exports.knownHookEvents = exports.withoutBody = exports.kIsNormalizedAlready = void 0; - const util_1 = __nccwpck_require__(3837); - const stream_1 = __nccwpck_require__(2781); - const fs_1 = __nccwpck_require__(7147); - const url_1 = __nccwpck_require__(7310); - const http = __nccwpck_require__(3685); - const http_1 = __nccwpck_require__(3685); - const https = __nccwpck_require__(5687); - const http_timer_1 = __nccwpck_require__(8097); - const cacheable_lookup_1 = __nccwpck_require__(2286); - const CacheableRequest = __nccwpck_require__(8116); - const decompressResponse = __nccwpck_require__(2391); - // @ts-expect-error Missing types - const http2wrapper = __nccwpck_require__(4645); - const lowercaseKeys = __nccwpck_require__(9662); - const is_1 = __nccwpck_require__(7678); - const get_body_size_1 = __nccwpck_require__(4564); - const is_form_data_1 = __nccwpck_require__(40); - const proxy_events_1 = __nccwpck_require__(3021); - const timed_out_1 = __nccwpck_require__(2454); - const url_to_options_1 = __nccwpck_require__(8026); - const options_to_url_1 = __nccwpck_require__(9219); - const weakable_map_1 = __nccwpck_require__(7288); - const get_buffer_1 = __nccwpck_require__(4500); - const dns_ip_version_1 = __nccwpck_require__(4993); - const is_response_ok_1 = __nccwpck_require__(9298); - const deprecation_warning_1 = __nccwpck_require__(397); - const normalize_arguments_1 = __nccwpck_require__(1048); - const calculate_retry_delay_1 = __nccwpck_require__(3462); - let globalDnsCache; - const kRequest = Symbol("request"); - const kResponse = Symbol("response"); - const kResponseSize = Symbol("responseSize"); - const kDownloadedSize = Symbol("downloadedSize"); - const kBodySize = Symbol("bodySize"); - const kUploadedSize = Symbol("uploadedSize"); - const kServerResponsesPiped = Symbol("serverResponsesPiped"); - const kUnproxyEvents = Symbol("unproxyEvents"); - const kIsFromCache = Symbol("isFromCache"); - const kCancelTimeouts = Symbol("cancelTimeouts"); - const kStartedReading = Symbol("startedReading"); - const kStopReading = Symbol("stopReading"); - const kTriggerRead = Symbol("triggerRead"); - const kBody = Symbol("body"); - const kJobs = Symbol("jobs"); - const kOriginalResponse = Symbol("originalResponse"); - const kRetryTimeout = Symbol("retryTimeout"); - exports.kIsNormalizedAlready = Symbol("isNormalizedAlready"); - const supportsBrotli = is_1.default.string(process.versions.brotli); - exports.withoutBody = new Set(["GET", "HEAD"]); - exports.knownHookEvents = [ - "init", - "beforeRequest", - "beforeRedirect", - "beforeError", - "beforeRetry", - // Promise-Only - "afterResponse", - ]; - function validateSearchParameters(searchParameters) { - // eslint-disable-next-line guard-for-in - for (const key in searchParameters) { - const value = searchParameters[key]; - if ( - !is_1.default.string(value) && - !is_1.default.number(value) && - !is_1.default.boolean(value) && - !is_1.default.null_(value) && - !is_1.default.undefined(value) - ) { - throw new TypeError( - `The \`searchParams\` value '${String( - value - )}' must be a string, number, boolean or null` - ); + onError(err) { + const { res, callback, body, opaque } = 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); + } + + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; } } } - function isClientRequest(clientRequest) { - return ( - is_1.default.object(clientRequest) && !("statusCode" in clientRequest) - ); - } - const cacheableStore = new weakable_map_1.default(); - const waitForOpenFile = async (file) => - new Promise((resolve, reject) => { - const onError = (error) => { - reject(error); - }; - // Node.js 12 has incomplete types - if (!file.pending) { - resolve(); - } - file.once("error", onError); - file.once("ready", () => { - file.off("error", onError); - resolve(); + + function request(opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); }); - }); - const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]); - const nonEnumerableProperties = ["context", "body", "json", "form"]; - exports.setNonEnumerableProperties = (sources, to) => { - // Non enumerable properties shall not be merged - const properties = {}; - for (const source of sources) { - if (!source) { - continue; + } + + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") { + throw err; } - for (const name of nonEnumerableProperties) { - if (!(name in source)) { - continue; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + + module.exports = request; + module.exports.RequestHandler = RequestHandler; + + /***/ + }, + + /***/ 3560: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const assert = __nccwpck_require__(4589); + const { finished, PassThrough } = __nccwpck_require__(7075); + const { InvalidArgumentError, InvalidReturnValueError } = + __nccwpck_require__(8707); + const util = __nccwpck_require__(3440); + const { getResolveErrorBodyCallback } = __nccwpck_require__(7655); + const { AsyncResource } = __nccwpck_require__(6698); + const { addSignal, removeSignal } = __nccwpck_require__(158); + + 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"); } - properties[name] = { - writable: true, - configurable: true, - enumerable: false, - // @ts-expect-error TS doesn't see the check above - value: source[name], - }; + + 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; } - } - Object.defineProperties(to, properties); - }; - /** -An error to be thrown when a request fails. -Contains a `code` property with error class code, like `ECONNREFUSED`. -*/ - class RequestError extends Error { - constructor(message, error, self) { - var _a; - super(message); - Error.captureStackTrace(this, this.constructor); - this.name = "RequestError"; - this.code = error.code; - if (self instanceof Request) { - Object.defineProperty(this, "request", { - enumerable: false, - value: self, - }); - Object.defineProperty(this, "response", { - enumerable: false, - value: self[kResponse], + + 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); }); - Object.defineProperty(this, "options", { - // This fails because of TS 3.7.2 useDefineForClassFields - // Ref: https://github.com/microsoft/TypeScript/issues/34972 - enumerable: false, - value: self.options, + } + + addSignal(this, signal); + } + + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + + assert(this.callback); + + 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 { - Object.defineProperty(this, "options", { - // This fails because of TS 3.7.2 useDefineForClassFields - // Ref: https://github.com/microsoft/TypeScript/issues/34972 - enumerable: false, - value: self, + if (factory === null) { + return; + } + + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context, }); - } - this.timings = - (_a = this.request) === null || _a === void 0 ? void 0 : _a.timings; - // Recover the original stacktrace - if ( - is_1.default.string(error.stack) && - is_1.default.string(this.stack) - ) { - const indexOfMessage = - this.stack.indexOf(this.message) + this.message.length; - const thisStackTrace = this.stack - .slice(indexOfMessage) - .split("\n") - .reverse(); - const errorStackTrace = error.stack - .slice(error.stack.indexOf(error.message) + error.message.length) - .split("\n") - .reverse(); - // Remove duplicated traces - while ( - errorStackTrace.length !== 0 && - errorStackTrace[0] === thisStackTrace[0] + + if ( + !res || + typeof res.write !== "function" || + typeof res.end !== "function" || + typeof res.on !== "function" ) { - thisStackTrace.shift(); + throw new InvalidReturnValueError("expected Writable"); } - this.stack = `${this.stack.slice( - 0, - indexOfMessage - )}${thisStackTrace - .reverse() - .join("\n")}${errorStackTrace.reverse().join("\n")}`; + + // 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?.needDrain; + + return needDrain !== true; } - } - exports.RequestError = RequestError; - /** -An error to be thrown when the server redirects you more than ten times. -Includes a `response` property. -*/ - class MaxRedirectsError extends RequestError { - constructor(request) { - super( - `Redirected ${request.options.maxRedirects} times. Aborting.`, - {}, - request - ); - this.name = "MaxRedirectsError"; + + onData(chunk) { + const { res } = this; + + return res ? res.write(chunk) : true; } - } - exports.MaxRedirectsError = MaxRedirectsError; - /** -An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304. -Includes a `response` property. -*/ - class HTTPError extends RequestError { - constructor(response) { - super( - `Response code ${response.statusCode} (${response.statusMessage})`, - {}, - response.request - ); - this.name = "HTTPError"; + + onComplete(trailers) { + const { res } = this; + + removeSignal(this); + + if (!res) { + return; + } + + this.trailers = util.parseHeaders(trailers); + + res.end(); } - } - exports.HTTPError = HTTPError; - /** -An error to be thrown when a cache method fails. -For example, if the database goes down or there's a filesystem error. -*/ - class CacheError extends RequestError { - constructor(error, request) { - super(error.message, error, request); - this.name = "CacheError"; + + 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); + } } } - exports.CacheError = CacheError; - /** -An error to be thrown when the request body is a stream and an error occurs while reading from that stream. -*/ - class UploadError extends RequestError { - constructor(error, request) { - super(error.message, error, request); - this.name = "UploadError"; + + 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?.opaque; + queueMicrotask(() => callback(err, { opaque })); } } - exports.UploadError = UploadError; - /** -An error to be thrown when the request is aborted due to a timeout. -Includes an `event` and `timings` property. -*/ - class TimeoutError extends RequestError { - constructor(error, timings, request) { - super(error.message, error, request); - this.name = "TimeoutError"; - this.event = error.event; - this.timings = timings; + + module.exports = stream; + + /***/ + }, + + /***/ 1882: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { InvalidArgumentError, SocketError } = __nccwpck_require__(8707); + const { AsyncResource } = __nccwpck_require__(6698); + const util = __nccwpck_require__(3440); + const { addSignal, removeSignal } = __nccwpck_require__(158); + const assert = __nccwpck_require__(4589); + + 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); } - } - exports.TimeoutError = TimeoutError; - /** -An error to be thrown when reading from response stream fails. -*/ - class ReadError extends RequestError { - constructor(error, request) { - super(error.message, error, request); - this.name = "ReadError"; + + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + + assert(this.callback); + + this.abort = abort; + this.context = null; + } + + onHeaders() { + throw new SocketError("bad upgrade", null); + } + + onUpgrade(statusCode, rawHeaders, socket) { + assert(statusCode === 101); + + const { callback, opaque, context } = this; + + 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 }); + }); + } } } - exports.ReadError = ReadError; - /** -An error to be thrown when given an unsupported protocol. -*/ - class UnsupportedProtocolError extends RequestError { - constructor(options) { - super(`Unsupported protocol "${options.url.protocol}"`, {}, options); - this.name = "UnsupportedProtocolError"; + + 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?.opaque; + queueMicrotask(() => callback(err, { opaque })); } } - exports.UnsupportedProtocolError = UnsupportedProtocolError; - const proxiedRequestEvents = [ - "socket", - "connect", - "continue", - "information", - "upgrade", - "timeout", - ]; - class Request extends stream_1.Duplex { - constructor(url, options = {}, defaults) { + + module.exports = upgrade; + + /***/ + }, + + /***/ 6615: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + module.exports.request = __nccwpck_require__(4043); + module.exports.stream = __nccwpck_require__(3560); + module.exports.pipeline = __nccwpck_require__(6862); + module.exports.upgrade = __nccwpck_require__(1882); + module.exports.connect = __nccwpck_require__(2279); + + /***/ + }, + + /***/ 9927: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + // Ported from https://github.com/nodejs/undici/pull/907 + + const assert = __nccwpck_require__(4589); + const { Readable } = __nccwpck_require__(7075); + const { + RequestAbortedError, + NotSupportedError, + InvalidArgumentError, + AbortError, + } = __nccwpck_require__(8707); + const util = __nccwpck_require__(3440); + const { ReadableStreamFrom } = __nccwpck_require__(3440); + + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("kAbort"); + const kContentType = Symbol("kContentType"); + const kContentLength = Symbol("kContentLength"); + + const noop = () => {}; + + class BodyReadable extends Readable { + constructor({ + resume, + abort, + contentType = "", + contentLength, + highWaterMark = 64 * 1024, // Same as nodejs fs streams. + }) { super({ - // This must be false, to enable throwing after destroy - // It is used for retry logic in Promise API - autoDestroy: false, - // It needs to be zero because we're just proxying the data to another stream - highWaterMark: 0, - }); - this[kDownloadedSize] = 0; - this[kUploadedSize] = 0; - this.requestInitialized = false; - this[kServerResponsesPiped] = new Set(); - this.redirects = []; - this[kStopReading] = false; - this[kTriggerRead] = false; - this[kJobs] = []; - this.retryCount = 0; - // TODO: Remove this when targeting Node.js >= 12 - this._progressCallbacks = []; - const unlockWrite = () => this._unlockWrite(); - const lockWrite = () => this._lockWrite(); - this.on("pipe", (source) => { - source.prependListener("data", unlockWrite); - source.on("data", lockWrite); - source.prependListener("end", unlockWrite); - source.on("end", lockWrite); - }); - this.on("unpipe", (source) => { - source.off("data", unlockWrite); - source.off("data", lockWrite); - source.off("end", unlockWrite); - source.off("end", lockWrite); - }); - this.on("pipe", (source) => { - if (source instanceof http_1.IncomingMessage) { - this.options.headers = { - ...source.headers, - ...this.options.headers, - }; - } + autoDestroy: true, + read: resume, + highWaterMark, }); - const { json, body, form } = options; - if (json || body || form) { - this._lockWrite(); + + this._readableState.dataEmitted = false; + + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + + // Is stream being consumed through Readable API? + // This is an optimization so that we avoid checking + // for 'data' and 'readable' listeners in the hot path + // inside push(). + this[kReading] = false; + } + + destroy(err) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); } - if (exports.kIsNormalizedAlready in options) { - this.options = options; - } else { - try { - // @ts-expect-error Common TypeScript bug saying that `this.constructor` is not accessible - this.options = this.constructor.normalizeArguments( - url, - options, - defaults - ); - } catch (error) { - // TODO: Move this to `_destroy()` - if (is_1.default.nodeStream(options.body)) { - options.body.destroy(); - } - this.destroy(error); - return; - } + + if (err) { + this[kAbort](); } - (async () => { - var _a; - try { - if (this.options.body instanceof fs_1.ReadStream) { - await waitForOpenFile(this.options.body); - } - const { url: normalizedURL } = this.options; - if (!normalizedURL) { - throw new TypeError("Missing `url` property"); - } - this.requestUrl = normalizedURL.toString(); - decodeURI(this.requestUrl); - await this._finalizeBody(); - await this._makeRequest(); - if (this.destroyed) { - (_a = this[kRequest]) === null || _a === void 0 - ? void 0 - : _a.destroy(); - return; - } - // Queued writes etc. - for (const job of this[kJobs]) { - job(); - } - // Prevent memory leak - this[kJobs].length = 0; - this.requestInitialized = true; - } catch (error) { - if (error instanceof RequestError) { - this._beforeError(error); - return; - } - // This is a workaround for https://github.com/nodejs/node/issues/33335 - if (!this.destroyed) { - this.destroy(error); - } - } - })(); + + return super.destroy(err); } - static normalizeArguments(url, options, defaults) { - var _a, _b, _c, _d, _e; - const rawOptions = options; - if (is_1.default.object(url) && !is_1.default.urlInstance(url)) { - options = { ...defaults, ...url, ...options }; + + _destroy(err, callback) { + // Workaround for Node "bug". If the stream is destroyed in same + // tick as it is created, then a user who is waiting for a + // promise (i.e micro tick) for installing a 'error' listener will + // never get a chance and will always encounter an unhandled exception. + if (!this[kReading]) { + setImmediate(() => { + callback(err); + }); } else { - if (url && options && options.url !== undefined) { - throw new TypeError( - "The `url` option is mutually exclusive with the `input` argument" - ); - } - options = { ...defaults, ...options }; - if (url !== undefined) { - options.url = url; - } - if (is_1.default.urlInstance(options.url)) { - options.url = new url_1.URL(options.url.toString()); - } + callback(err); } - // TODO: Deprecate URL options in Got 12. - // Support extend-specific options - if (options.cache === false) { - options.cache = undefined; + } + + on(ev, ...args) { + if (ev === "data" || ev === "readable") { + this[kReading] = true; } - if (options.dnsCache === false) { - options.dnsCache = undefined; + 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; } - // Nice type assertions - is_1.assert.any( - [is_1.default.string, is_1.default.undefined], - options.method - ); - is_1.assert.any( - [is_1.default.object, is_1.default.undefined], - options.headers - ); - is_1.assert.any( - [ - is_1.default.string, - is_1.default.urlInstance, - is_1.default.undefined, - ], - options.prefixUrl - ); - is_1.assert.any( - [is_1.default.object, is_1.default.undefined], - options.cookieJar - ); - is_1.assert.any( - [is_1.default.object, is_1.default.string, is_1.default.undefined], - options.searchParams - ); - is_1.assert.any( - [is_1.default.object, is_1.default.string, is_1.default.undefined], - options.cache - ); - is_1.assert.any( - [is_1.default.object, is_1.default.number, is_1.default.undefined], - options.timeout - ); - is_1.assert.any( - [is_1.default.object, is_1.default.undefined], - options.context - ); - is_1.assert.any( - [is_1.default.object, is_1.default.undefined], - options.hooks - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.decompress - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.ignoreInvalidCookies - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.followRedirect - ); - is_1.assert.any( - [is_1.default.number, is_1.default.undefined], - options.maxRedirects - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.throwHttpErrors - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.http2 - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.allowGetBody - ); - is_1.assert.any( - [is_1.default.string, is_1.default.undefined], - options.localAddress - ); - is_1.assert.any( - [dns_ip_version_1.isDnsLookupIpVersion, is_1.default.undefined], - options.dnsLookupIpVersion - ); - is_1.assert.any( - [is_1.default.object, is_1.default.undefined], - options.https - ); - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.rejectUnauthorized - ); - if (options.https) { - is_1.assert.any( - [is_1.default.boolean, is_1.default.undefined], - options.https.rejectUnauthorized - ); - is_1.assert.any( - [is_1.default.function_, is_1.default.undefined], - options.https.checkServerIdentity - ); - is_1.assert.any( - [ - is_1.default.string, - is_1.default.object, - is_1.default.array, - is_1.default.undefined, - ], - options.https.certificateAuthority - ); - is_1.assert.any( - [ - is_1.default.string, - is_1.default.object, - is_1.default.array, - is_1.default.undefined, - ], - options.https.key - ); - is_1.assert.any( - [ - is_1.default.string, - is_1.default.object, - is_1.default.array, - is_1.default.undefined, - ], - options.https.certificate - ); - is_1.assert.any( - [is_1.default.string, is_1.default.undefined], - options.https.passphrase - ); - is_1.assert.any( - [ - is_1.default.string, - is_1.default.buffer, - is_1.default.array, - is_1.default.undefined, - ], - options.https.pfx - ); + return ret; + } + + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; } - is_1.assert.any( - [is_1.default.object, is_1.default.undefined], - options.cacheOptions - ); - // `options.method` - if (is_1.default.string(options.method)) { - options.method = options.method.toUpperCase(); - } else { - options.method = "GET"; + 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-bytes + async bytes() { + return consume(this, "bytes"); + } + + // 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); + } } - // `options.headers` + return this[kBody]; + } + + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if ( - options.headers === - (defaults === null || defaults === void 0 - ? void 0 - : defaults.headers) + signal != null && + (typeof signal !== "object" || !("aborted" in signal)) ) { - options.headers = { ...options.headers }; - } else { - options.headers = lowercaseKeys({ - ...(defaults === null || defaults === void 0 - ? void 0 - : defaults.headers), - ...options.headers, - }); - } - // Disallow legacy `url.Url` - if ("slashes" in options) { - throw new TypeError( - "The legacy `url.Url` has been deprecated. Use `URL` instead." - ); + throw new InvalidArgumentError("signal must be an AbortSignal"); } - // `options.auth` - if ("auth" in options) { - throw new TypeError( - "Parameter `auth` is deprecated. Use `username` / `password` instead." - ); + + signal?.throwIfAborted(); + + if (this._readableState.closeEmitted) { + return null; } - // `options.searchParams` - if ("searchParams" in options) { - if ( - options.searchParams && - options.searchParams !== - (defaults === null || defaults === void 0 - ? void 0 - : defaults.searchParams) - ) { - let searchParameters; - if ( - is_1.default.string(options.searchParams) || - options.searchParams instanceof url_1.URLSearchParams - ) { - searchParameters = new url_1.URLSearchParams( - options.searchParams - ); + + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) { + this.destroy(new AbortError()); + } + + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + + this.on("close", function () { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) { + reject(signal.reason ?? new AbortError()); } else { - validateSearchParameters(options.searchParams); - searchParameters = new url_1.URLSearchParams(); - // eslint-disable-next-line guard-for-in - for (const key in options.searchParams) { - const value = options.searchParams[key]; - if (value === null) { - searchParameters.append(key, ""); - } else if (value !== undefined) { - searchParameters.append(key, value); - } - } + resolve(null); } - // `normalizeArguments()` is also used to merge options - (_a = - defaults === null || defaults === void 0 - ? void 0 - : defaults.searchParams) === null || _a === void 0 - ? void 0 - : _a.forEach((value, key) => { - // Only use default if one isn't already defined - if (!searchParameters.has(key)) { - searchParameters.append(key, value); - } - }); - options.searchParams = searchParameters; - } - } - // `options.username` & `options.password` - options.username = - (_b = options.username) !== null && _b !== void 0 ? _b : ""; - options.password = - (_c = options.password) !== null && _c !== void 0 ? _c : ""; - // `options.prefixUrl` & `options.url` - if (is_1.default.undefined(options.prefixUrl)) { - options.prefixUrl = - (_d = - defaults === null || defaults === void 0 - ? void 0 - : defaults.prefixUrl) !== null && _d !== void 0 - ? _d - : ""; - } else { - options.prefixUrl = options.prefixUrl.toString(); - if (options.prefixUrl !== "" && !options.prefixUrl.endsWith("/")) { - options.prefixUrl += "/"; - } - } - if (is_1.default.string(options.url)) { - if (options.url.startsWith("/")) { - throw new Error( - "`input` must not start with a slash when using `prefixUrl`" - ); - } - options.url = options_to_url_1.default( - options.prefixUrl + options.url, - options - ); - } else if ( - (is_1.default.undefined(options.url) && options.prefixUrl !== "") || - options.protocol - ) { - options.url = options_to_url_1.default(options.prefixUrl, options); - } - if (options.url) { - if ("port" in options) { - delete options.port; - } - // Make it possible to change `options.prefixUrl` - let { prefixUrl } = options; - Object.defineProperty(options, "prefixUrl", { - set: (value) => { - const url = options.url; - if (!url.href.startsWith(value)) { - throw new Error( - `Cannot change \`prefixUrl\` from ${prefixUrl} to ${value}: ${url.href}` - ); + }) + .on("error", noop) + .on("data", function (chunk) { + limit -= chunk.length; + if (limit <= 0) { + this.destroy(); } - options.url = new url_1.URL( - value + url.href.slice(prefixUrl.length) - ); - prefixUrl = value; - }, - get: () => prefixUrl, - }); - // Support UNIX sockets - let { protocol } = options.url; - if (protocol === "unix:") { - protocol = "http:"; - options.url = new url_1.URL( - `http://unix${options.url.pathname}${options.url.search}` - ); - } - // Set search params - if (options.searchParams) { - // eslint-disable-next-line @typescript-eslint/no-base-to-string - options.url.search = options.searchParams.toString(); - } - // Protocol check - if (protocol !== "http:" && protocol !== "https:") { - throw new UnsupportedProtocolError(options); - } - // Update `username` - if (options.username === "") { - options.username = options.url.username; + }) + .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) { + assert(!stream[kConsume]); + + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) { + stream + .on("error", (err) => { + reject(err); + }) + .on("close", () => { + reject(new TypeError("unusable")); + }); } else { - options.url.username = options.username; + reject(rState.errored ?? new TypeError("unusable")); } - // Update `password` - if (options.password === "") { - options.password = options.url.password; - } else { - options.url.password = options.password; - } - } - // `options.cookieJar` - const { cookieJar } = options; - if (cookieJar) { - let { setCookie, getCookieString } = cookieJar; - is_1.assert.function_(setCookie); - is_1.assert.function_(getCookieString); - /* istanbul ignore next: Horrible `tough-cookie` v3 check */ - if (setCookie.length === 4 && getCookieString.length === 0) { - setCookie = util_1.promisify(setCookie.bind(options.cookieJar)); - getCookieString = util_1.promisify( - getCookieString.bind(options.cookieJar) - ); - options.cookieJar = { - setCookie, - getCookieString: getCookieString, + } else { + queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [], }; - } - } - // `options.cache` - const { cache } = options; - if (cache) { - if (!cacheableStore.has(cache)) { - cacheableStore.set( - cache, - new CacheableRequest((requestOptions, handler) => { - const result = requestOptions[kRequest]( - requestOptions, - handler - ); - // TODO: remove this when `cacheable-request` supports async request functions. - if (is_1.default.promise(result)) { - // @ts-expect-error - // We only need to implement the error handler in order to support HTTP2 caching. - // The result will be a promise anyway. - result.once = (event, handler) => { - if (event === "error") { - result.catch(handler); - } else if (event === "abort") { - // The empty catch is needed here in case when - // it rejects before it's `await`ed in `_makeRequest`. - (async () => { - try { - const request = await result; - request.once("abort", handler); - } catch (_a) {} - })(); - } else { - /* istanbul ignore next: safety check */ - throw new Error( - `Unknown HTTP2 promise event: ${event}` - ); - } - return result; - }; + + stream + .on("error", function (err) { + consumeFinish(this[kConsume], err); + }) + .on("close", function () { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()); } - return result; - }, cache) - ); - } - } - // `options.cacheOptions` - options.cacheOptions = { ...options.cacheOptions }; - // `options.dnsCache` - if (options.dnsCache === true) { - if (!globalDnsCache) { - globalDnsCache = new cacheable_lookup_1.default(); - } - options.dnsCache = globalDnsCache; - } else if ( - !is_1.default.undefined(options.dnsCache) && - !options.dnsCache.lookup - ) { - throw new TypeError( - `Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${is_1.default( - options.dnsCache - )}` - ); + }); + + consumeStart(stream[kConsume]); + }); } - // `options.timeout` - if (is_1.default.number(options.timeout)) { - options.timeout = { request: options.timeout }; - } else if (defaults && options.timeout !== defaults.timeout) { - options.timeout = { - ...defaults.timeout, - ...options.timeout, - }; - } else { - options.timeout = { ...options.timeout }; + }); + } + + function consumeStart(consume) { + if (consume.body === null) { + return; + } + + const { _readableState: state } = consume.stream; + + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) { + consumePush(consume, state.buffer[n]); } - // `options.context` - if (!options.context) { - options.context = {}; + } else { + for (const chunk of state.buffer) { + consumePush(consume, chunk); } - // `options.hooks` - const areHooksDefault = - options.hooks === - (defaults === null || defaults === void 0 - ? void 0 - : defaults.hooks); - options.hooks = { ...options.hooks }; - for (const event of exports.knownHookEvents) { - if (event in options.hooks) { - if (is_1.default.array(options.hooks[event])) { - // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 - options.hooks[event] = [...options.hooks[event]]; - } else { - throw new TypeError( - `Parameter \`${event}\` must be an Array, got ${is_1.default( - options.hooks[event] - )}` - ); - } - } else { - options.hooks[event] = []; + } + + if (state.endEmitted) { + consumeEnd(this[kConsume]); + } else { + consume.stream.on("end", function () { + consumeEnd(this[kConsume]); + }); + } + + consume.stream.resume(); + + while (consume.stream.read() != null) { + // Loop + } + } + + /** + * @param {Buffer[]} chunks + * @param {number} length + */ + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) { + return ""; + } + const buffer = + chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + + // Skip BOM. + const start = + bufferLength > 2 && + buffer[0] === 0xef && + buffer[1] === 0xbb && + buffer[2] === 0xbf + ? 3 + : 0; + return buffer.utf8Slice(start, bufferLength); + } + + /** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) { + return new Uint8Array(0); + } + if (chunks.length === 1) { + // fast-path + return new Uint8Array(chunks[0]); + } + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + + return buffer; + } + + function consumeEnd(consume) { + const { type, body, resolve, stream, length } = consume; + + try { + if (type === "text") { + resolve(chunksDecode(body, length)); + } else if (type === "json") { + resolve(JSON.parse(chunksDecode(body, length))); + } else if (type === "arrayBuffer") { + resolve(chunksConcat(body, length).buffer); + } else if (type === "blob") { + resolve(new Blob(body, { type: stream[kContentType] })); + } else if (type === "bytes") { + resolve(chunksConcat(body, length)); + } + + 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; + } + + module.exports = { Readable: BodyReadable, chunksDecode }; + + /***/ + }, + + /***/ 7655: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + const assert = __nccwpck_require__(4589); + const { ResponseStatusCodeError } = __nccwpck_require__(8707); + + const { chunksDecode } = __nccwpck_require__(9927); + const CHUNK_LIMIT = 128 * 1024; + + async function getResolveErrorBodyCallback({ + callback, + body, + contentType, + statusCode, + statusMessage, + headers, + }) { + assert(body); + + let chunks = []; + let length = 0; + + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; } } - if (defaults && !areHooksDefault) { - for (const event of exports.knownHookEvents) { - const defaultHooks = defaults.hooks[event]; - if (defaultHooks.length > 0) { - // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 - options.hooks[event] = [ - ...defaults.hooks[event], - ...options.hooks[event], - ]; + } catch { + chunks = []; + length = 0; + // Do nothing.... + } + + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => + callback(new ResponseStatusCodeError(message, statusCode, headers)), + ); + return; + } + + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + + try { + if (isContentTypeApplicationJson(contentType)) { + payload = JSON.parse(chunksDecode(chunks, length)); + } else if (isContentTypeText(contentType)) { + payload = chunksDecode(chunks, length); + } + } catch { + // process in a callback to avoid throwing in the microtask queue + } finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => + callback( + new ResponseStatusCodeError(message, statusCode, headers, payload), + ), + ); + } + + const isContentTypeApplicationJson = (contentType) => { + return ( + contentType.length > 15 && + contentType[11] === "/" && + contentType[0] === "a" && + contentType[1] === "p" && + contentType[2] === "p" && + contentType[3] === "l" && + contentType[4] === "i" && + contentType[5] === "c" && + contentType[6] === "a" && + contentType[7] === "t" && + contentType[8] === "i" && + contentType[9] === "o" && + contentType[10] === "n" && + contentType[12] === "j" && + contentType[13] === "s" && + contentType[14] === "o" && + contentType[15] === "n" + ); + }; + + const isContentTypeText = (contentType) => { + return ( + contentType.length > 4 && + contentType[4] === "/" && + contentType[0] === "t" && + contentType[1] === "e" && + contentType[2] === "x" && + contentType[3] === "t" + ); + }; + + module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText, + }; + + /***/ + }, + + /***/ 9136: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const net = __nccwpck_require__(7030); + const assert = __nccwpck_require__(4589); + const util = __nccwpck_require__(3440); + const { InvalidArgumentError, ConnectTimeoutError } = + __nccwpck_require__(8707); + const timers = __nccwpck_require__(6603); + + function noop() {} + + 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 || process.env.UNDICI_NO_FG) + ) { + 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; } - } - } - // DNS options - if ("family" in options) { - deprecation_warning_1.default( - '"options.family" was never documented, please use "options.dnsLookupIpVersion"' - ); - } - // HTTPS options - if ( - defaults === null || defaults === void 0 ? void 0 : defaults.https - ) { - options.https = { ...defaults.https, ...options.https }; - } - if ("rejectUnauthorized" in options) { - deprecation_warning_1.default( - '"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"' - ); + + const ref = this._sessionCache.get(key); + if (ref !== undefined && ref.deref() === undefined) { + this._sessionCache.delete(key); + } + }); } - if ("checkServerIdentity" in options) { - deprecation_warning_1.default( - '"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"' - ); + + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; } - if ("ca" in options) { - deprecation_warning_1.default( - '"options.ca" was never documented, please use "options.https.certificateAuthority"' - ); + + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; + } + + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); } - if ("key" in options) { - deprecation_warning_1.default( - '"options.key" was never documented, please use "options.https.key"' - ); + }; + } else { + SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = new Map(); } - if ("cert" in options) { - deprecation_warning_1.default( - '"options.cert" was never documented, please use "options.https.certificate"' - ); + + get(sessionKey) { + return this._sessionCache.get(sessionKey); } - if ("passphrase" in options) { - deprecation_warning_1.default( - '"options.passphrase" was never documented, please use "options.https.passphrase"' - ); + + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; + } + + if (this._sessionCache.size >= this._maxCachedSessions) { + // remove the oldest session + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + + this._sessionCache.set(sessionKey, session); } - if ("pfx" in options) { - deprecation_warning_1.default( - '"options.pfx" was never documented, please use "options.https.pfx"' - ); + }; + } + + function buildConnector({ + allowH2, + maxCachedSessions, + socketPath, + timeout, + session: customSession, + ...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__(1692); + } + servername = + servername || + options.servername || + util.getServerName(host) || + null; + + const sessionKey = servername || hostname; + assert(sessionKey); + + const session = + customSession || sessionCache.get(sessionKey) || null; + + port = port || 443; + + 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, + 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"); + + port = port || 80; + + socket = net.connect({ + highWaterMark: 64 * 1024, // Same as nodejs fs streams. + ...options, + localAddress, + port, + host: hostname, + }); } - // Other options - if ("followRedirects" in options) { - throw new TypeError( - "The `followRedirects` option does not exist. Use `followRedirect` instead." - ); + + // 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); } - if (options.agent) { - for (const key in options.agent) { - if (key !== "http" && key !== "https" && key !== "http2") { - throw new TypeError( - `Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${key}\`` - ); + + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { + timeout, + hostname, + port, + }); + + socket + .setNoDelay(true) + .once( + protocol === "https:" ? "secureConnect" : "connect", + function () { + queueMicrotask(clearConnectTimeout); + + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }, + ) + .on("error", function (err) { + queueMicrotask(clearConnectTimeout); + + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + + return socket; + }; + } + + /** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ + const setupConnectTimeout = + process.platform === "win32" + ? (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop; } + + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + // setImmediate is added to make sure that we prioritize socket error events over timeouts + s1 = setImmediate(() => { + // Windows needs an extra setImmediate probably due to implementation differences in the socket logic + s2 = setImmediate(() => + onConnectTimeout(socketWeakRef.deref(), opts), + ); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; } - } - options.maxRedirects = - (_e = options.maxRedirects) !== null && _e !== void 0 ? _e : 0; - // Set non-enumerable properties - exports.setNonEnumerableProperties([defaults, rawOptions], options); - return normalize_arguments_1.default(options, defaults); - } - _lockWrite() { - const onLockedWrite = () => { - throw new TypeError("The payload has been already provided"); - }; - this.write = onLockedWrite; - this.end = onLockedWrite; + : (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop; + } + + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + // setImmediate is added to make sure that we prioritize socket error events over timeouts + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + + /** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ + function onConnectTimeout(socket, opts) { + // The socket could be already garbage collected + if (socket == null) { + return; } - _unlockWrite() { - this.write = super.write; - this.end = super.end; + + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { + message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + } else { + message += ` (attempted address: ${opts.hostname}:${opts.port},`; } - async _finalizeBody() { - const { options } = this; - const { headers } = options; - const isForm = !is_1.default.undefined(options.form); - const isJSON = !is_1.default.undefined(options.json); - const isBody = !is_1.default.undefined(options.body); - const hasPayload = isForm || isJSON || isBody; - const cannotHaveBody = - exports.withoutBody.has(options.method) && - !(options.method === "GET" && options.allowGetBody); - this._cannotHaveBody = cannotHaveBody; - if (hasPayload) { - if (cannotHaveBody) { - throw new TypeError( - `The \`${options.method}\` method cannot be used with a body` - ); - } - if ( - [isBody, isForm, isJSON].filter((isTrue) => isTrue).length > 1 - ) { - throw new TypeError( - "The `body`, `json` and `form` options are mutually exclusive" - ); - } - if ( - isBody && - !(options.body instanceof stream_1.Readable) && - !is_1.default.string(options.body) && - !is_1.default.buffer(options.body) && - !is_form_data_1.default(options.body) - ) { - throw new TypeError( - "The `body` option must be a stream.Readable, string or Buffer" - ); - } - if (isForm && !is_1.default.object(options.form)) { - throw new TypeError("The `form` option must be an Object"); - } - { - // Serialize body - const noContentType = !is_1.default.string( - headers["content-type"] - ); - if (isBody) { - // Special case for https://github.com/form-data/form-data - if (is_form_data_1.default(options.body) && noContentType) { - headers[ - "content-type" - ] = `multipart/form-data; boundary=${options.body.getBoundary()}`; - } - this[kBody] = options.body; - } else if (isForm) { - if (noContentType) { - headers["content-type"] = "application/x-www-form-urlencoded"; - } - this[kBody] = new url_1.URLSearchParams( - options.form - ).toString(); - } else { - if (noContentType) { - headers["content-type"] = "application/json"; - } - this[kBody] = options.stringifyJson(options.json); - } - const uploadBodySize = await get_body_size_1.default( - this[kBody], - options.headers - ); - // See 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. For example, a Content-Length header - // field is normally sent in a POST request even when the value is 0 - // (indicating an empty payload body). 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. - if ( - is_1.default.undefined(headers["content-length"]) && - is_1.default.undefined(headers["transfer-encoding"]) - ) { - if ( - !cannotHaveBody && - !is_1.default.undefined(uploadBodySize) - ) { - headers["content-length"] = String(uploadBodySize); - } - } - } - } else if (cannotHaveBody) { - this._lockWrite(); - } else { - this._unlockWrite(); - } - this[kBodySize] = Number(headers["content-length"]) || undefined; - } - async _onResponseBase(response) { - const { options } = this; - const { url } = options; - this[kOriginalResponse] = response; - if (options.decompress) { - response = decompressResponse(response); - } - const statusCode = response.statusCode; - const typedResponse = response; - typedResponse.statusMessage = typedResponse.statusMessage - ? typedResponse.statusMessage - : http.STATUS_CODES[statusCode]; - typedResponse.url = options.url.toString(); - typedResponse.requestUrl = this.requestUrl; - typedResponse.redirectUrls = this.redirects; - typedResponse.request = this; - typedResponse.isFromCache = response.fromCache || false; - typedResponse.ip = this.ip; - typedResponse.retryCount = this.retryCount; - this[kIsFromCache] = typedResponse.isFromCache; - this[kResponseSize] = - Number(response.headers["content-length"]) || undefined; - this[kResponse] = response; - response.once("end", () => { - this[kResponseSize] = this[kDownloadedSize]; - this.emit("downloadProgress", this.downloadProgress); - }); - response.once("error", (error) => { - // Force clean-up, because some packages don't do this. - // TODO: Fix decompress-response - response.destroy(); - this._beforeError(new ReadError(error, this)); - }); - response.once("aborted", () => { - this._beforeError( - new ReadError( - { - name: "Error", - message: "The server aborted pending request", - code: "ECONNRESET", - }, - this - ) + + message += ` timeout: ${opts.timeout}ms)`; + + util.destroy(socket, new ConnectTimeoutError(message)); + } + + module.exports = buildConnector; + + /***/ + }, + + /***/ 735: /***/ (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, + }; + + /***/ + }, + + /***/ 2414: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const diagnosticsChannel = __nccwpck_require__(3053); + const util = __nccwpck_require__(7975); + + const undiciDebugLog = util.debuglog("undici"); + const fetchDebuglog = util.debuglog("fetch"); + const websocketDebuglog = util.debuglog("websocket"); + let isClientSet = false; + const channels = { + // Client + beforeConnect: diagnosticsChannel.channel( + "undici:client:beforeConnect", + ), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + // Request + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + // WebSocket + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel( + "undici:websocket:socket_error", + ), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong"), + }; + + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + + // Track all Client events + diagnosticsChannel + .channel("undici:client:beforeConnect") + .subscribe((evt) => { + const { + connectParams: { version, protocol, port, host }, + } = evt; + debuglog( + "connecting to %s using %s%s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version, ); }); - this.emit("downloadProgress", this.downloadProgress); - const rawCookies = response.headers["set-cookie"]; - if (is_1.default.object(options.cookieJar) && rawCookies) { - let promises = rawCookies.map(async (rawCookie) => - options.cookieJar.setCookie(rawCookie, url.toString()) + + diagnosticsChannel + .channel("undici:client:connected") + .subscribe((evt) => { + const { + connectParams: { version, protocol, port, host }, + } = evt; + debuglog( + "connected to %s using %s%s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version, ); - if (options.ignoreInvalidCookies) { - promises = promises.map(async (p) => p.catch(() => {})); - } - try { - await Promise.all(promises); - } catch (error) { - this._beforeError(error); - return; - } - } - if ( - options.followRedirect && - response.headers.location && - redirectCodes.has(statusCode) - ) { - // We're being redirected, we don't care about the response. - // It'd be best to abort the request, but we can't because - // we would have to sacrifice the TCP connection. We don't want that. - response.resume(); - if (this[kRequest]) { - this[kCancelTimeouts](); - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete this[kRequest]; - this[kUnproxyEvents](); - } - const shouldBeGet = - statusCode === 303 && - options.method !== "GET" && - options.method !== "HEAD"; - if (shouldBeGet || !options.methodRewriting) { - // Server responded with "see other", indicating that the resource exists at another location, - // and the client should request it from that location via GET or HEAD. - options.method = "GET"; - if ("body" in options) { - delete options.body; - } - if ("json" in options) { - delete options.json; - } - if ("form" in options) { - delete options.form; - } - this[kBody] = undefined; - delete options.headers["content-length"]; - } - if (this.redirects.length >= options.maxRedirects) { - this._beforeError(new MaxRedirectsError(this)); - return; - } - try { - // Do not remove. See https://github.com/sindresorhus/got/pull/214 - const redirectBuffer = Buffer.from( - response.headers.location, - "binary" - ).toString(); - // Handles invalid URLs. See https://github.com/sindresorhus/got/issues/604 - const redirectUrl = new url_1.URL(redirectBuffer, url); - const redirectString = redirectUrl.toString(); - decodeURI(redirectString); - // Redirecting to a different site, clear sensitive data. - if ( - redirectUrl.hostname !== url.hostname || - redirectUrl.port !== url.port - ) { - if ("host" in options.headers) { - delete options.headers.host; - } - if ("cookie" in options.headers) { - delete options.headers.cookie; - } - if ("authorization" in options.headers) { - delete options.headers.authorization; - } - if (options.username || options.password) { - options.username = ""; - options.password = ""; - } - } else { - redirectUrl.username = options.username; - redirectUrl.password = options.password; - } - this.redirects.push(redirectString); - options.url = redirectUrl; - for (const hook of options.hooks.beforeRedirect) { - // eslint-disable-next-line no-await-in-loop - await hook(options, typedResponse); - } - this.emit("redirect", typedResponse, options); - await this._makeRequest(); - } catch (error) { - this._beforeError(error); - return; - } - return; - } - if ( - options.isStream && - options.throwHttpErrors && - !is_response_ok_1.isResponseOk(typedResponse) - ) { - this._beforeError(new HTTPError(typedResponse)); - return; - } - response.on("readable", () => { - if (this[kTriggerRead]) { - this._read(); - } - }); - this.on("resume", () => { - response.resume(); }); - this.on("pause", () => { - response.pause(); + + diagnosticsChannel + .channel("undici:client:connectError") + .subscribe((evt) => { + const { + connectParams: { version, protocol, port, host }, + error, + } = evt; + debuglog( + "connection to %s using %s%s errored - %s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version, + error.message, + ); }); - response.once("end", () => { - this.push(null); + + diagnosticsChannel + .channel("undici:client:sendHeaders") + .subscribe((evt) => { + const { + request: { method, path, origin }, + } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); }); - this.emit("response", response); - for (const destination of this[kServerResponsesPiped]) { - if (destination.headersSent) { - continue; - } - // eslint-disable-next-line guard-for-in - for (const key in response.headers) { - const isAllowed = options.decompress - ? key !== "content-encoding" - : true; - const value = response.headers[key]; - if (isAllowed) { - destination.setHeader(key, value); - } - } - destination.statusCode = statusCode; - } - } - async _onResponse(response) { - try { - await this._onResponseBase(response); - } catch (error) { - /* istanbul ignore next: better safe than sorry */ - this._beforeError(error); - } - } - _onRequest(request) { - const { options } = this; - const { timeout, url } = options; - http_timer_1.default(request); - this[kCancelTimeouts] = timed_out_1.default(request, timeout, url); - const responseEventName = options.cache - ? "cacheableResponse" - : "response"; - request.once(responseEventName, (response) => { - void this._onResponse(response); + + // Track Request events + diagnosticsChannel + .channel("undici:request:headers") + .subscribe((evt) => { + const { + request: { method, path, origin }, + response: { statusCode }, + } = evt; + debuglog( + "received response to %s %s/%s - HTTP %d", + method, + origin, + path, + statusCode, + ); }); - request.once("error", (error) => { - var _a; - // Force clean-up, because some packages (e.g. nock) don't do this. - request.destroy(); - // Node.js <= 12.18.2 mistakenly emits the response `end` first. - (_a = request.res) === null || _a === void 0 - ? void 0 - : _a.removeAllListeners("end"); - error = - error instanceof timed_out_1.TimeoutError - ? new TimeoutError(error, this.timings, this) - : new RequestError(error.message, error, this); - this._beforeError(error); + + diagnosticsChannel + .channel("undici:request:trailers") + .subscribe((evt) => { + const { + request: { method, path, origin }, + } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); }); - this[kUnproxyEvents] = proxy_events_1.default( - request, - this, - proxiedRequestEvents + + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { + request: { method, path, origin }, + error, + } = evt; + debuglog( + "request to %s %s/%s errored - %s", + method, + origin, + path, + error.message, ); - this[kRequest] = request; - this.emit("uploadProgress", this.uploadProgress); - // Send body - const body = this[kBody]; - const currentRequest = this.redirects.length === 0 ? this : request; - if (is_1.default.nodeStream(body)) { - body.pipe(currentRequest); - body.once("error", (error) => { - this._beforeError(new UploadError(error, this)); + }); + + isClientSet = true; + } + + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled + ? undiciDebugLog + : websocketDebuglog; + diagnosticsChannel + .channel("undici:client:beforeConnect") + .subscribe((evt) => { + const { + connectParams: { version, protocol, port, host }, + } = evt; + debuglog( + "connecting to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version, + ); + }); + + diagnosticsChannel + .channel("undici:client:connected") + .subscribe((evt) => { + const { + connectParams: { version, protocol, port, host }, + } = evt; + debuglog( + "connected to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version, + ); + }); + + diagnosticsChannel + .channel("undici:client:connectError") + .subscribe((evt) => { + const { + connectParams: { version, protocol, port, host }, + error, + } = evt; + debuglog( + "connection to %s%s using %s%s errored - %s", + host, + port ? `:${port}` : "", + protocol, + version, + error.message, + ); + }); + + diagnosticsChannel + .channel("undici:client:sendHeaders") + .subscribe((evt) => { + const { + request: { method, path, origin }, + } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); }); - } else { - this._unlockWrite(); - if (!is_1.default.undefined(body)) { - this._writeRequest(body, undefined, () => {}); - currentRequest.end(); - this._lockWrite(); - } else if (this._cannotHaveBody || this._noPipe) { - currentRequest.end(); - this._lockWrite(); - } - } - this.emit("request", request); } - async _createCacheableRequest(url, options) { - return new Promise((resolve, reject) => { - // TODO: Remove `utils/url-to-options.ts` when `cacheable-request` is fixed - Object.assign(options, url_to_options_1.default(url)); - // `http-cache-semantics` checks this - // TODO: Fix this ignore. - // @ts-expect-error - delete options.url; - let request; - // This is ugly - const cacheRequest = cacheableStore.get(options.cache)( - options, - async (response) => { - // TODO: Fix `cacheable-response` - response._readableState.autoDestroy = false; - if (request) { - (await request).emit("cacheableResponse", response); - } - resolve(response); - } + + // Track all WebSocket events + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { + address: { address, port }, + } = evt; + websocketDebuglog( + "connection opened %s%s", + address, + port ? `:${port}` : "", + ); + }); + + diagnosticsChannel + .channel("undici:websocket:close") + .subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog( + "closed connection to %s - %s %s", + websocket.url, + code, + reason, ); - // Restore options - options.url = url; - cacheRequest.once("error", reject); - cacheRequest.once("request", async (requestOrPromise) => { - request = requestOrPromise; - resolve(request); - }); }); + + diagnosticsChannel + .channel("undici:websocket:socket_error") + .subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + + module.exports = { + channels, + }; + + /***/ + }, + + /***/ 8707: /***/ (module) => { + "use strict"; + + const kUndiciError = Symbol.for("undici.error.UND_ERR"); + class UndiciError extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; } - async _makeRequest() { - var _a, _b, _c, _d, _e; - const { options } = this; - const { headers } = options; - for (const key in headers) { - if (is_1.default.undefined(headers[key])) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete headers[key]; - } else if (is_1.default.null_(headers[key])) { - throw new TypeError( - `Use \`undefined\` instead of \`null\` to delete the \`${key}\` header` - ); - } - } - if ( - options.decompress && - is_1.default.undefined(headers["accept-encoding"]) - ) { - headers["accept-encoding"] = supportsBrotli - ? "gzip, deflate, br" - : "gzip, deflate"; - } - // Set cookies - if (options.cookieJar) { - const cookieString = await options.cookieJar.getCookieString( - options.url.toString() - ); - if (is_1.default.nonEmptyString(cookieString)) { - options.headers.cookie = cookieString; - } - } - for (const hook of options.hooks.beforeRequest) { - // eslint-disable-next-line no-await-in-loop - const result = await hook(options); - if (!is_1.default.undefined(result)) { - // @ts-expect-error Skip the type mismatch to support abstract responses - options.request = () => result; - break; - } - } - if (options.body && this[kBody] !== options.body) { - this[kBody] = options.body; - } - const { agent, request, timeout, url } = options; - if (options.dnsCache && !("lookup" in options)) { - options.lookup = options.dnsCache.lookup; - } - // UNIX sockets - if (url.hostname === "unix") { - const matches = /(?.+?):(?.+)/.exec( - `${url.pathname}${url.search}` - ); - if ( - matches === null || matches === void 0 ? void 0 : matches.groups - ) { - const { socketPath, path } = matches.groups; - Object.assign(options, { - socketPath, - path, - host: "", - }); - } - } - const isHttps = url.protocol === "https:"; - // Fallback function - let fallbackFn; - if (options.http2) { - fallbackFn = http2wrapper.auto; - } else { - fallbackFn = isHttps ? https.request : http.request; - } - const realFn = - (_a = options.request) !== null && _a !== void 0 ? _a : fallbackFn; - // Cache support - const fn = options.cache ? this._createCacheableRequest : realFn; - // Pass an agent directly when HTTP2 is disabled - if (agent && !options.http2) { - options.agent = agent[isHttps ? "https" : "http"]; - } - // Prepare plain HTTP request options - options[kRequest] = realFn; - delete options.request; - // TODO: Fix this ignore. - // @ts-expect-error - delete options.timeout; - const requestOptions = options; - requestOptions.shared = - (_b = options.cacheOptions) === null || _b === void 0 - ? void 0 - : _b.shared; - requestOptions.cacheHeuristic = - (_c = options.cacheOptions) === null || _c === void 0 - ? void 0 - : _c.cacheHeuristic; - requestOptions.immutableMinTimeToLive = - (_d = options.cacheOptions) === null || _d === void 0 - ? void 0 - : _d.immutableMinTimeToLive; - requestOptions.ignoreCargoCult = - (_e = options.cacheOptions) === null || _e === void 0 - ? void 0 - : _e.ignoreCargoCult; - // If `dnsLookupIpVersion` is not present do not override `family` - if (options.dnsLookupIpVersion !== undefined) { - try { - requestOptions.family = dns_ip_version_1.dnsLookupIpVersionToFamily( - options.dnsLookupIpVersion - ); - } catch (_f) { - throw new Error("Invalid `dnsLookupIpVersion` option value"); - } - } - // HTTPS options remapping - if (options.https) { - if ("rejectUnauthorized" in options.https) { - requestOptions.rejectUnauthorized = - options.https.rejectUnauthorized; - } - if (options.https.checkServerIdentity) { - requestOptions.checkServerIdentity = - options.https.checkServerIdentity; - } - if (options.https.certificateAuthority) { - requestOptions.ca = options.https.certificateAuthority; - } - if (options.https.certificate) { - requestOptions.cert = options.https.certificate; - } - if (options.https.key) { - requestOptions.key = options.https.key; - } - if (options.https.passphrase) { - requestOptions.passphrase = options.https.passphrase; - } - if (options.https.pfx) { - requestOptions.pfx = options.https.pfx; - } - } - try { - let requestOrResponse = await fn(url, requestOptions); - if (is_1.default.undefined(requestOrResponse)) { - requestOrResponse = fallbackFn(url, requestOptions); - } - // Restore options - options.request = request; - options.timeout = timeout; - options.agent = agent; - // HTTPS options restore - if (options.https) { - if ("rejectUnauthorized" in options.https) { - delete requestOptions.rejectUnauthorized; - } - if (options.https.checkServerIdentity) { - // @ts-expect-error - This one will be removed when we remove the alias. - delete requestOptions.checkServerIdentity; - } - if (options.https.certificateAuthority) { - delete requestOptions.ca; - } - if (options.https.certificate) { - delete requestOptions.cert; - } - if (options.https.key) { - delete requestOptions.key; - } - if (options.https.passphrase) { - delete requestOptions.passphrase; - } - if (options.https.pfx) { - delete requestOptions.pfx; - } - } - if (isClientRequest(requestOrResponse)) { - this._onRequest(requestOrResponse); - // Emit the response after the stream has been ended - } else if (this.writable) { - this.once("finish", () => { - void this._onResponse(requestOrResponse); - }); - this._unlockWrite(); - this.end(); - this._lockWrite(); - } else { - void this._onResponse(requestOrResponse); - } - } catch (error) { - if (error instanceof CacheableRequest.CacheError) { - throw new CacheError(error, this); - } - throw new RequestError(error.message, error, this); - } + + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; } - async _error(error) { - try { - for (const hook of this.options.hooks.beforeError) { - // eslint-disable-next-line no-await-in-loop - error = await hook(error); - } - } catch (error_) { - error = new RequestError(error_.message, error_, this); - } - this.destroy(error); + + [kUndiciError] = true; + } + + const kConnectTimeoutError = Symbol.for( + "undici.error.UND_ERR_CONNECT_TIMEOUT", + ); + class ConnectTimeoutError extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; } - _beforeError(error) { - if (this[kStopReading]) { - return; - } - const { options } = this; - const retryCount = this.retryCount + 1; - this[kStopReading] = true; - if (!(error instanceof RequestError)) { - error = new RequestError(error.message, error, this); - } - const typedError = error; - const { response } = typedError; - void (async () => { - if (response && !response.body) { - response.setEncoding(this._readableState.encoding); - try { - response.rawBody = await get_buffer_1.default(response); - response.body = response.rawBody.toString(); - } catch (_a) {} - } - if (this.listenerCount("retry") !== 0) { - let backoff; - try { - let retryAfter; - if (response && "retry-after" in response.headers) { - retryAfter = Number(response.headers["retry-after"]); - if (Number.isNaN(retryAfter)) { - retryAfter = - Date.parse(response.headers["retry-after"]) - Date.now(); - if (retryAfter <= 0) { - retryAfter = 1; - } - } else { - retryAfter *= 1000; - } - } - backoff = await options.retry.calculateDelay({ - attemptCount: retryCount, - retryOptions: options.retry, - error: typedError, - retryAfter, - computedValue: calculate_retry_delay_1.default({ - attemptCount: retryCount, - retryOptions: options.retry, - error: typedError, - retryAfter, - computedValue: 0, - }), - }); - } catch (error_) { - void this._error( - new RequestError(error_.message, error_, this) - ); - return; - } - if (backoff) { - const retry = async () => { - try { - for (const hook of this.options.hooks.beforeRetry) { - // eslint-disable-next-line no-await-in-loop - await hook(this.options, typedError, retryCount); - } - } catch (error_) { - void this._error( - new RequestError(error_.message, error, this) - ); - return; - } - // Something forced us to abort the retry - if (this.destroyed) { - return; - } - this.destroy(); - this.emit("retry", retryCount, error); - }; - this[kRetryTimeout] = setTimeout(retry, backoff); - return; - } - } - void this._error(typedError); - })(); + + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; } - _read() { - this[kTriggerRead] = true; - const response = this[kResponse]; - if (response && !this[kStopReading]) { - // We cannot put this in the `if` above - // because `.read()` also triggers the `end` event - if (response.readableLength) { - this[kTriggerRead] = false; - } - let data; - while ((data = response.read()) !== null) { - this[kDownloadedSize] += data.length; - this[kStartedReading] = true; - const progress = this.downloadProgress; - if (progress.percent < 1) { - this.emit("downloadProgress", progress); - } - this.push(data); - } - } + + [kConnectTimeoutError] = true; + } + + const kHeadersTimeoutError = Symbol.for( + "undici.error.UND_ERR_HEADERS_TIMEOUT", + ); + class HeadersTimeoutError extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; } - // Node.js 12 has incorrect types, so the encoding must be a string - _write(chunk, encoding, callback) { - const write = () => { - this._writeRequest(chunk, encoding, callback); - }; - if (this.requestInitialized) { - write(); - } else { - this[kJobs].push(write); - } + + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; } - _writeRequest(chunk, encoding, callback) { - if (this[kRequest].destroyed) { - // Probably the `ClientRequest` instance will throw - return; - } - this._progressCallbacks.push(() => { - this[kUploadedSize] += Buffer.byteLength(chunk, encoding); - const progress = this.uploadProgress; - if (progress.percent < 1) { - this.emit("uploadProgress", progress); - } - }); - // TODO: What happens if it's from cache? Then this[kRequest] won't be defined. - this[kRequest].write(chunk, encoding, (error) => { - if (!error && this._progressCallbacks.length > 0) { - this._progressCallbacks.shift()(); - } - callback(error); - }); + + [kHeadersTimeoutError] = true; + } + + const kHeadersOverflowError = Symbol.for( + "undici.error.UND_ERR_HEADERS_OVERFLOW", + ); + class HeadersOverflowError extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; } - _final(callback) { - const endRequest = () => { - // FIX: Node.js 10 calls the write callback AFTER the end callback! - while (this._progressCallbacks.length !== 0) { - this._progressCallbacks.shift()(); - } - // We need to check if `this[kRequest]` is present, - // because it isn't when we use cache. - if (!(kRequest in this)) { - callback(); - return; - } - if (this[kRequest].destroyed) { - callback(); - return; - } - this[kRequest].end((error) => { - if (!error) { - this[kBodySize] = this[kUploadedSize]; - this.emit("uploadProgress", this.uploadProgress); - this[kRequest].emit("upload-complete"); - } - callback(error); - }); - }; - if (this.requestInitialized) { - endRequest(); - } else { - this[kJobs].push(endRequest); - } + + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; } - _destroy(error, callback) { - var _a; - this[kStopReading] = true; - // Prevent further retries - clearTimeout(this[kRetryTimeout]); - if (kRequest in this) { - this[kCancelTimeouts](); - // TODO: Remove the next `if` when these get fixed: - // - https://github.com/nodejs/node/issues/32851 - if ( - !((_a = this[kResponse]) === null || _a === void 0 - ? void 0 - : _a.complete) - ) { - this[kRequest].destroy(); - } - } - if ( - error !== null && - !is_1.default.undefined(error) && - !(error instanceof RequestError) - ) { - error = new RequestError(error.message, error, this); - } - callback(error); + + [kHeadersOverflowError] = true; + } + + const kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + class BodyTimeoutError extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; } - get _isAboutToError() { - return this[kStopReading]; + + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; } - /** - The remote IP address. - */ - get ip() { - var _a; - return (_a = this.socket) === null || _a === void 0 - ? void 0 - : _a.remoteAddress; + + [kBodyTimeoutError] = true; + } + + const kResponseStatusCodeError = Symbol.for( + "undici.error.UND_ERR_RESPONSE_STATUS_CODE", + ); + class ResponseStatusCodeError extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; } - /** - Indicates whether the request has been aborted or not. - */ - get aborted() { - var _a, _b, _c; - return ( - ((_b = - (_a = this[kRequest]) === null || _a === void 0 - ? void 0 - : _a.destroyed) !== null && _b !== void 0 - ? _b - : this.destroyed) && - !((_c = this[kOriginalResponse]) === null || _c === void 0 - ? void 0 - : _c.complete) - ); + + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; } - get socket() { - var _a, _b; - return (_b = - (_a = this[kRequest]) === null || _a === void 0 - ? void 0 - : _a.socket) !== null && _b !== void 0 - ? _b - : undefined; + + [kResponseStatusCodeError] = true; + } + + const kInvalidArgumentError = Symbol.for( + "undici.error.UND_ERR_INVALID_ARG", + ); + class InvalidArgumentError extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; } - /** - Progress event for downloading (receiving a response). - */ - get downloadProgress() { - let percent; - if (this[kResponseSize]) { - percent = this[kDownloadedSize] / this[kResponseSize]; - } else if (this[kResponseSize] === this[kDownloadedSize]) { - percent = 1; - } else { - percent = 0; - } - return { - percent, - transferred: this[kDownloadedSize], - total: this[kResponseSize], - }; + + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; } - /** - Progress event for uploading (sending a request). - */ - get uploadProgress() { - let percent; - if (this[kBodySize]) { - percent = this[kUploadedSize] / this[kBodySize]; - } else if (this[kBodySize] === this[kUploadedSize]) { - percent = 1; - } else { - percent = 0; - } - return { - percent, - transferred: this[kUploadedSize], - total: this[kBodySize], - }; + + [kInvalidArgumentError] = true; + } + + const kInvalidReturnValueError = Symbol.for( + "undici.error.UND_ERR_INVALID_RETURN_VALUE", + ); + class InvalidReturnValueError extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; } - /** - The object contains the following properties: - - `start` - Time when the request started. - - `socket` - Time when a socket was assigned to the request. - - `lookup` - Time when the DNS lookup finished. - - `connect` - Time when the socket successfully connected. - - `secureConnect` - Time when the socket securely connected. - - `upload` - Time when the request finished uploading. - - `response` - Time when the request fired `response` event. - - `end` - Time when the response fired `end` event. - - `error` - Time when the request fired `error` event. - - `abort` - Time when the request fired `abort` event. - - `phases` - - `wait` - `timings.socket - timings.start` - - `dns` - `timings.lookup - timings.socket` - - `tcp` - `timings.connect - timings.lookup` - - `tls` - `timings.secureConnect - timings.connect` - - `request` - `timings.upload - (timings.secureConnect || timings.connect)` - - `firstByte` - `timings.response - timings.upload` - - `download` - `timings.end - timings.response` - - `total` - `(timings.end || timings.error || timings.abort) - timings.start` + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } - If something has not been measured yet, it will be `undefined`. + [kInvalidReturnValueError] = true; + } - __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch. - */ - get timings() { - var _a; - return (_a = this[kRequest]) === null || _a === void 0 - ? void 0 - : _a.timings; + const kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + class AbortError extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; } - /** - Whether the response was retrieved from the cache. - */ - get isFromCache() { - return this[kIsFromCache]; + + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; } - pipe(destination, options) { - if (this[kStartedReading]) { - throw new Error( - "Failed to pipe. The response has been emitted already." - ); - } - if (destination instanceof http_1.ServerResponse) { - this[kServerResponsesPiped].add(destination); - } - return super.pipe(destination, options); + + [kAbortError] = true; + } + + const kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + class RequestAbortedError extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; } - unpipe(destination) { - if (destination instanceof http_1.ServerResponse) { - this[kServerResponsesPiped].delete(destination); - } - super.unpipe(destination); - return this; + + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; } + + [kRequestAbortedError] = true; } - exports["default"] = Request; - /***/ - }, + const kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + class InformationalError extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } - /***/ 4993: /***/ (__unused_webpack_module, exports) => { - "use strict"; + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.dnsLookupIpVersionToFamily = exports.isDnsLookupIpVersion = void 0; - const conversionTable = { - auto: 0, - ipv4: 4, - ipv6: 6, - }; - exports.isDnsLookupIpVersion = (value) => { - return value in conversionTable; - }; - exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => { - if (exports.isDnsLookupIpVersion(dnsLookupIpVersion)) { - return conversionTable[dnsLookupIpVersion]; + [kInformationalError] = true; + } + + const kRequestContentLengthMismatchError = Symbol.for( + "undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH", + ); + class RequestContentLengthMismatchError extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = + message || + "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; } - throw new Error("Invalid DNS lookup IP version"); - }; - /***/ - }, + static [Symbol.hasInstance](instance) { + return ( + instance && instance[kRequestContentLengthMismatchError] === true + ); + } - /***/ 4564: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + [kRequestContentLengthMismatchError] = true; + } - Object.defineProperty(exports, "__esModule", { value: true }); - const fs_1 = __nccwpck_require__(7147); - const util_1 = __nccwpck_require__(3837); - const is_1 = __nccwpck_require__(7678); - const is_form_data_1 = __nccwpck_require__(40); - const statAsync = util_1.promisify(fs_1.stat); - exports["default"] = async (body, headers) => { - if (headers && "content-length" in headers) { - return Number(headers["content-length"]); + const kResponseContentLengthMismatchError = Symbol.for( + "undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH", + ); + class ResponseContentLengthMismatchError extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = + message || + "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; } - if (!body) { - return 0; + + static [Symbol.hasInstance](instance) { + return ( + instance && instance[kResponseContentLengthMismatchError] === true + ); } - if (is_1.default.string(body)) { - return Buffer.byteLength(body); + + [kResponseContentLengthMismatchError] = true; + } + + const kClientDestroyedError = Symbol.for( + "undici.error.UND_ERR_DESTROYED", + ); + class ClientDestroyedError extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; } - if (is_1.default.buffer(body)) { - return body.length; + + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; } - if (is_form_data_1.default(body)) { - return util_1.promisify(body.getLength.bind(body))(); + + [kClientDestroyedError] = true; + } + + const kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + class ClientClosedError extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; } - if (body instanceof fs_1.ReadStream) { - const { size } = await statAsync(body.path); - if (size === 0) { - return undefined; - } - return size; + + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; } - return undefined; - }; - /***/ - }, + [kClientClosedError] = true; + } - /***/ 4500: /***/ (__unused_webpack_module, exports) => { - "use strict"; + const kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + class SocketError extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } - Object.defineProperty(exports, "__esModule", { value: true }); - // TODO: Update https://github.com/sindresorhus/get-stream - const getBuffer = async (stream) => { - const chunks = []; - let length = 0; - for await (const chunk of stream) { - chunks.push(chunk); - length += Buffer.byteLength(chunk); + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; } - if (Buffer.isBuffer(chunks[0])) { - return Buffer.concat(chunks, length); + + [kSocketError] = true; + } + + const kNotSupportedError = Symbol.for( + "undici.error.UND_ERR_NOT_SUPPORTED", + ); + class NotSupportedError extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; } - return Buffer.from(chunks.join("")); - }; - exports["default"] = getBuffer; - /***/ - }, + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } - /***/ 40: /***/ (__unused_webpack_module, exports, __nccwpck_require__) => { - "use strict"; + [kNotSupportedError] = true; + } - Object.defineProperty(exports, "__esModule", { value: true }); - const is_1 = __nccwpck_require__(7678); - exports["default"] = (body) => - is_1.default.nodeStream(body) && - is_1.default.function_(body.getBoundary); + const kBalancedPoolMissingUpstreamError = Symbol.for( + "undici.error.UND_ERR_BPL_MISSING_UPSTREAM", + ); + class BalancedPoolMissingUpstreamError extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = + message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } - /***/ - }, + static [Symbol.hasInstance](instance) { + return ( + instance && instance[kBalancedPoolMissingUpstreamError] === true + ); + } - /***/ 9298: /***/ (__unused_webpack_module, exports) => { - "use strict"; + [kBalancedPoolMissingUpstreamError] = true; + } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.isResponseOk = void 0; - exports.isResponseOk = (response) => { - const { statusCode } = response; - const limitStatusCode = response.request.options.followRedirect - ? 299 - : 399; - return ( - (statusCode >= 200 && statusCode <= limitStatusCode) || - statusCode === 304 - ); + const kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + class HTTPParserError extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : undefined; + this.data = data ? data.toString() : undefined; + } + + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + + [kHTTPParserError] = true; + } + + const kResponseExceededMaxSizeError = Symbol.for( + "undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE", + ); + class ResponseExceededMaxSizeError extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + + [kResponseExceededMaxSizeError] = true; + } + + const kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + class RequestRetryError extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + + [kRequestRetryError] = true; + } + + const kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + class ResponseError extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + + [kResponseError] = true; + } + + const kSecureProxyConnectionError = Symbol.for( + "undici.error.UND_ERR_PRX_TLS", + ); + class SecureProxyConnectionError extends UndiciError { + constructor(cause, message, options) { + super(message, { cause, ...(options ?? {}) }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + + [kSecureProxyConnectionError] = true; + } + + const kMessageSizeExceededError = Symbol.for( + "undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED", + ); + class MessageSizeExceededError extends UndiciError { + constructor(message) { + super(message); + this.name = "MessageSizeExceededError"; + this.message = message || "Max decompressed message size exceeded"; + this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"; + } + + static [Symbol.hasInstance](instance) { + return instance && instance[kMessageSizeExceededError] === true; + } + + get [kMessageSizeExceededError]() { + return true; + } + } + + module.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError, + MessageSizeExceededError, }; /***/ }, - /***/ 9219: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ + /***/ 4655: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, ) => { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - /* istanbul ignore file: deprecated */ - const url_1 = __nccwpck_require__(7310); - const keys = [ - "protocol", - "host", - "hostname", - "port", - "pathname", - "search", - ]; - exports["default"] = (origin, options) => { - var _a, _b; - if (options.path) { - if (options.pathname) { - throw new TypeError( - "Parameters `path` and `pathname` are mutually exclusive." - ); - } - if (options.search) { - throw new TypeError( - "Parameters `path` and `search` are mutually exclusive." + const { InvalidArgumentError, NotSupportedError } = + __nccwpck_require__(8707); + const assert = __nccwpck_require__(4589); + const { + isValidHTTPToken, + isValidHeaderValue, + isStream, + destroy, + isBuffer, + isFormDataLike, + isIterable, + isBlobLike, + buildURL, + validateHandler, + getServerName, + normalizedMethodRecords, + } = __nccwpck_require__(3440); + const { channels } = __nccwpck_require__(2414); + const { headerNameLowerCasedRecord } = __nccwpck_require__(735); + + // Verifies that a given path is valid does not contain control chars \x00 to \x20 + const invalidPathRegex = /[^\u0021-\u00ff]/; + + const kHandler = Symbol("handler"); + + class Request { + constructor( + origin, + { + path, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue, + servername, + }, + 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.test(path)) { + throw new InvalidArgumentError("invalid request path"); } - if (options.searchParams) { - throw new TypeError( - "Parameters `path` and `searchParams` are mutually exclusive." - ); + + if (typeof method !== "string") { + throw new InvalidArgumentError("method must be a string"); + } else if ( + normalizedMethodRecords[method] === undefined && + !isValidHTTPToken(method) + ) { + throw new InvalidArgumentError("invalid request method"); } - } - if (options.search && options.searchParams) { - throw new TypeError( - "Parameters `search` and `searchParams` are mutually exclusive." - ); - } - if (!origin) { - if (!options.protocol) { - throw new TypeError("No URL protocol specified"); + + if (upgrade && typeof upgrade !== "string") { + throw new InvalidArgumentError("upgrade must be a string"); } - origin = `${options.protocol}//${ - (_b = - (_a = options.hostname) !== null && _a !== void 0 - ? _a - : options.host) !== null && _b !== void 0 - ? _b - : "" - }`; - } - const url = new url_1.URL(origin); - if (options.path) { - const searchIndex = options.path.indexOf("?"); - if (searchIndex === -1) { - options.pathname = options.path; - } else { - options.pathname = options.path.slice(0, searchIndex); - options.search = options.path.slice(searchIndex + 1); + + if (upgrade && !isValidHeaderValue(upgrade)) { + throw new InvalidArgumentError("invalid upgrade header"); } - delete options.path; - } - for (const key of keys) { - if (options[key]) { - url[key] = options[key].toString(); + + if ( + headersTimeout != null && + (!Number.isFinite(headersTimeout) || headersTimeout < 0) + ) { + throw new InvalidArgumentError("invalid headersTimeout"); } - } - return url; - }; - /***/ - }, + if ( + bodyTimeout != null && + (!Number.isFinite(bodyTimeout) || bodyTimeout < 0) + ) { + throw new InvalidArgumentError("invalid bodyTimeout"); + } - /***/ 3021: /***/ (__unused_webpack_module, exports) => { - "use strict"; + if (reset != null && typeof reset !== "boolean") { + throw new InvalidArgumentError("invalid reset"); + } - Object.defineProperty(exports, "__esModule", { value: true }); - function default_1(from, to, events) { - const fns = {}; - for (const event of events) { - fns[event] = (...args) => { - to.emit(event, ...args); - }; - from.on(event, fns[event]); - } - return () => { - for (const event of events) { - from.off(event, fns[event]); + if (expectContinue != null && typeof expectContinue !== "boolean") { + throw new InvalidArgumentError("invalid expectContinue"); } - }; - } - exports["default"] = default_1; - /***/ - }, + this.headersTimeout = headersTimeout; - /***/ 2454: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + this.bodyTimeout = bodyTimeout; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.TimeoutError = void 0; - const net = __nccwpck_require__(1808); - const unhandle_1 = __nccwpck_require__(1593); - const reentry = Symbol("reentry"); - const noop = () => {}; - class TimeoutError extends Error { - constructor(threshold, event) { - super(`Timeout awaiting '${event}' for ${threshold}ms`); - this.event = event; - this.name = "TimeoutError"; - this.code = "ETIMEDOUT"; - } - } - exports.TimeoutError = TimeoutError; - exports["default"] = (request, delays, options) => { - if (reentry in request) { - return noop; - } - request[reentry] = true; - const cancelers = []; - const { once, unhandleAll } = unhandle_1.default(); - const addTimeout = (delay, callback, event) => { - var _a; - const timeout = setTimeout(callback, delay, delay, event); - (_a = timeout.unref) === null || _a === void 0 - ? void 0 - : _a.call(timeout); - const cancel = () => { - clearTimeout(timeout); - }; - cancelers.push(cancel); - return cancel; - }; - const { host, hostname } = options; - const timeoutHandler = (delay, event) => { - request.destroy(new TimeoutError(delay, event)); - }; - const cancelTimeouts = () => { - for (const cancel of cancelers) { - cancel(); - } - unhandleAll(); - }; - request.once("error", (error) => { - cancelTimeouts(); - // Save original behavior - /* istanbul ignore next */ - if (request.listenerCount("error") === 0) { - throw error; - } - }); - request.once("close", cancelTimeouts); - once(request, "response", (response) => { - once(response, "end", cancelTimeouts); - }); - if (typeof delays.request !== "undefined") { - addTimeout(delays.request, timeoutHandler, "request"); - } - if (typeof delays.socket !== "undefined") { - const socketTimeoutHandler = () => { - timeoutHandler(delays.socket, "socket"); - }; - request.setTimeout(delays.socket, socketTimeoutHandler); - // `request.setTimeout(0)` causes a memory leak. - // We can just remove the listener and forget about the timer - it's unreffed. - // See https://github.com/sindresorhus/got/issues/690 - cancelers.push(() => { - request.removeListener("timeout", socketTimeoutHandler); - }); - } - once(request, "socket", (socket) => { - var _a; - const { socketPath } = request; - /* istanbul ignore next: hard to test */ - if (socket.connecting) { - const hasPath = Boolean( - socketPath !== null && socketPath !== void 0 - ? socketPath - : net.isIP( - (_a = - hostname !== null && hostname !== void 0 - ? hostname - : host) !== null && _a !== void 0 - ? _a - : "" - ) !== 0 - ); - if ( - typeof delays.lookup !== "undefined" && - !hasPath && - typeof socket.address().address === "undefined" - ) { - const cancelTimeout = addTimeout( - delays.lookup, - timeoutHandler, - "lookup" - ); - once(socket, "lookup", cancelTimeout); + this.throwOnError = throwOnError === true; + + this.method = method; + + this.abort = null; + + if (body == null) { + this.body = null; + } else if (isStream(body)) { + this.body = body; + + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); } - if (typeof delays.connect !== "undefined") { - const timeConnect = () => - addTimeout(delays.connect, timeoutHandler, "connect"); - if (hasPath) { - once(socket, "connect", timeConnect()); + + this.errorHandler = (err) => { + if (this.abort) { + this.abort(err); } else { - once(socket, "lookup", (error) => { - if (error === null) { - once(socket, "connect", timeConnect()); - } - }); + this.error = err; } + }; + this.body.on("error", this.errorHandler); + } else if (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 ( + isFormDataLike(body) || + isIterable(body) || + 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 ? 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 ( - typeof delays.secureConnect !== "undefined" && - options.protocol === "https:" - ) { - once(socket, "connect", () => { - const cancelTimeout = addTimeout( - delays.secureConnect, - timeoutHandler, - "secureConnect" - ); - once(socket, "secureConnect", cancelTimeout); - }); + for (let i = 0; i < headers.length; i += 2) { + processHeader(this, headers[i], headers[i + 1]); } - } - if (typeof delays.send !== "undefined") { - const timeRequest = () => - addTimeout(delays.send, timeoutHandler, "send"); - /* istanbul ignore next: hard to test */ - if (socket.connecting) { - once(socket, "connect", () => { - once(request, "upload-complete", timeRequest()); - }); + } else if (headers && typeof headers === "object") { + if (headers[Symbol.iterator]) { + for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) { + throw new InvalidArgumentError( + "headers must be in key-value pair format", + ); + } + processHeader(this, header[0], header[1]); + } } else { - once(request, "upload-complete", timeRequest()); + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) { + processHeader(this, keys[i], headers[keys[i]]); + } } - } - }); - if (typeof delays.response !== "undefined") { - once(request, "upload-complete", () => { - const cancelTimeout = addTimeout( - delays.response, - timeoutHandler, - "response" + } else if (headers != null) { + throw new InvalidArgumentError( + "headers must be an object or an array", ); - once(request, "response", cancelTimeout); - }); + } + + validateHandler(handler, method, upgrade); + + this.servername = servername || getServerName(this.host); + + this[kHandler] = handler; + + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }); + } } - return cancelTimeouts; - }; - /***/ - }, + onBodySent(chunk) { + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + } - /***/ 1593: /***/ (__unused_webpack_module, exports) => { - "use strict"; + onRequestSent() { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }); + } - Object.defineProperty(exports, "__esModule", { value: true }); - // When attaching listeners, it's very easy to forget about them. - // Especially if you do error handling and set timeouts. - // So instead of checking if it's proper to throw an error on every timeout ever, - // use this simple tool which will remove all listeners you have attached. - exports["default"] = () => { - const handlers = []; - return { - once(origin, event, fn) { - origin.once(event, fn); - handlers.push({ origin, event, fn }); - }, - unhandleAll() { - for (const handler of handlers) { - const { origin, event, fn } = handler; - origin.removeListener(event, fn); + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); } - handlers.length = 0; - }, - }; - }; + } + } - /***/ - }, + onConnect(abort) { + assert(!this.aborted); + assert(!this.completed); - /***/ 8026: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + if (this.error) { + abort(this.error); + } else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } - Object.defineProperty(exports, "__esModule", { value: true }); - const is_1 = __nccwpck_require__(7678); - exports["default"] = (url) => { - // Cast to URL - url = url; - const options = { - protocol: url.protocol, - hostname: - is_1.default.string(url.hostname) && url.hostname.startsWith("[") - ? url.hostname.slice(1, -1) - : url.hostname, - host: url.host, - hash: url.hash, - search: url.search, - pathname: url.pathname, - href: url.href, - path: `${url.pathname || ""}${url.search || ""}`, - }; - if (is_1.default.string(url.port) && url.port.length > 0) { - options.port = Number(url.port); + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); } - if (url.username || url.password) { - options.auth = `${url.username || ""}:${url.password || ""}`; + + onHeaders(statusCode, headers, resume, 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, + resume, + statusText, + ); + } catch (err) { + this.abort(err); + } } - return options; - }; - /***/ - }, + onData(chunk) { + assert(!this.aborted); + assert(!this.completed); - /***/ 7288: /***/ (__unused_webpack_module, exports) => { - "use strict"; + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } - Object.defineProperty(exports, "__esModule", { value: true }); - class WeakableMap { - constructor() { - this.weakMap = new WeakMap(); - this.map = new Map(); + onUpgrade(statusCode, headers, socket) { + assert(!this.aborted); + assert(!this.completed); + + return this[kHandler].onUpgrade(statusCode, headers, socket); } - set(key, value) { - if (typeof key === "object") { - this.weakMap.set(key, value); - } else { - this.map.set(key, value); + + 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) { + // TODO (fix): This might be a bad idea? + this.onError(err); } } - get(key) { - if (typeof key === "object") { - return this.weakMap.get(key); + + onError(error) { + this.onFinally(); + + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }); } - return this.map.get(key); + + if (this.aborted) { + return; + } + this.aborted = true; + + return this[kHandler].onError(error); } - has(key) { - if (typeof key === "object") { - return this.weakMap.has(key); + + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; } - return this.map.has(key); + + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + + addHeader(key, value) { + processHeader(this, key, value); + return this; } } - exports["default"] = WeakableMap; - /***/ - }, + function processHeader(request, key, val) { + if (val && typeof val === "object" && !Array.isArray(val)) { + throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === undefined) { + return; + } - /***/ 4337: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + let headerName = headerNameLowerCasedRecord[key]; - 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 __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if ( - p !== "default" && - !Object.prototype.hasOwnProperty.call(exports, p) - ) - __createBinding(exports, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.defaultHandler = void 0; - const is_1 = __nccwpck_require__(7678); - const as_promise_1 = __nccwpck_require__(6056); - const create_rejection_1 = __nccwpck_require__(6457); - const core_1 = __nccwpck_require__(94); - const deep_freeze_1 = __nccwpck_require__(285); - const errors = { - RequestError: as_promise_1.RequestError, - CacheError: as_promise_1.CacheError, - ReadError: as_promise_1.ReadError, - HTTPError: as_promise_1.HTTPError, - MaxRedirectsError: as_promise_1.MaxRedirectsError, - TimeoutError: as_promise_1.TimeoutError, - ParseError: as_promise_1.ParseError, - CancelError: as_promise_1.CancelError, - UnsupportedProtocolError: as_promise_1.UnsupportedProtocolError, - UploadError: as_promise_1.UploadError, - }; - // The `delay` package weighs 10KB (!) - const delay = async (ms) => - new Promise((resolve) => { - setTimeout(resolve, ms); - }); - const { normalizeArguments } = core_1.default; - const mergeOptions = (...sources) => { - let mergedOptions; - for (const source of sources) { - mergedOptions = normalizeArguments(undefined, source, mergedOptions); + if (headerName === undefined) { + headerName = key.toLowerCase(); + if ( + headerNameLowerCasedRecord[headerName] === undefined && + !isValidHTTPToken(headerName) + ) { + throw new InvalidArgumentError("invalid header key"); + } } - return mergedOptions; - }; - const getPromiseOrStream = (options) => - options.isStream - ? new core_1.default(undefined, options) - : as_promise_1.default(options); - const isGotInstance = (value) => - "defaults" in value && "options" in value.defaults; - const aliases = ["get", "post", "put", "patch", "head", "delete"]; - exports.defaultHandler = (options, next) => next(options); - const callInitHooks = (hooks, options) => { - if (hooks) { - for (const hook of hooks) { - hook(options); + + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) { + if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + arr.push(val[i]); + } else if (val[i] === null) { + arr.push(""); + } else if (typeof val[i] === "object") { + throw new InvalidArgumentError(`invalid ${key} header`); + } else { + arr.push(`${val[i]}`); + } } + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + } else if (val === null) { + val = ""; + } else { + val = `${val}`; } - }; - const create = (defaults) => { - // Proxy properties from next handlers - defaults._rawHandlers = defaults.handlers; - defaults.handlers = defaults.handlers.map((fn) => (options, next) => { - // This will be assigned by assigning result - let root; - const result = fn(options, (newOptions) => { - root = next(newOptions); - return root; - }); - if (result !== root && !options.isStream && root) { - const typedResult = result; - const { - then: promiseThen, - catch: promiseCatch, - finally: promiseFianlly, - } = typedResult; - Object.setPrototypeOf(typedResult, Object.getPrototypeOf(root)); - Object.defineProperties( - typedResult, - Object.getOwnPropertyDescriptors(root) - ); - // These should point to the new promise - // eslint-disable-next-line promise/prefer-await-to-then - typedResult.then = promiseThen; - typedResult.catch = promiseCatch; - typedResult.finally = promiseFianlly; + + if (headerName === "host") { + if (request.host !== null) { + throw new InvalidArgumentError("duplicate host header"); } - return result; - }); - // Got interface - const got = (url, options = {}, _defaults) => { - var _a, _b; - let iteration = 0; - const iterateHandlers = (newOptions) => { - return defaults.handlers[iteration++]( - newOptions, - iteration === defaults.handlers.length - ? getPromiseOrStream - : iterateHandlers - ); - }; - // TODO: Remove this in Got 12. - if (is_1.default.plainObject(url)) { - const mergedOptions = { - ...url, - ...options, - }; - core_1.setNonEnumerableProperties([url, options], mergedOptions); - options = mergedOptions; - url = undefined; + if (typeof val !== "string") { + throw new InvalidArgumentError("invalid host header"); } - try { - // Call `init` hooks - let initHookError; - try { - callInitHooks(defaults.options.hooks.init, options); - callInitHooks( - (_a = options.hooks) === null || _a === void 0 - ? void 0 - : _a.init, - options - ); - } catch (error) { - initHookError = error; - } - // Normalize options & call handlers - const normalizedOptions = normalizeArguments( - url, - options, - _defaults !== null && _defaults !== void 0 - ? _defaults - : defaults.options - ); - normalizedOptions[core_1.kIsNormalizedAlready] = true; - if (initHookError) { - throw new as_promise_1.RequestError( - initHookError.message, - initHookError, - normalizedOptions - ); - } - return iterateHandlers(normalizedOptions); - } catch (error) { - if (options.isStream) { - throw error; - } else { - return create_rejection_1.default( - error, - defaults.options.hooks.beforeError, - (_b = options.hooks) === null || _b === void 0 - ? void 0 - : _b.beforeError - ); - } - } - }; - got.extend = (...instancesOrOptions) => { - const optionsArray = [defaults.options]; - let handlers = [...defaults._rawHandlers]; - let isMutableDefaults; - for (const value of instancesOrOptions) { - if (isGotInstance(value)) { - optionsArray.push(value.defaults.options); - handlers.push(...value.defaults._rawHandlers); - isMutableDefaults = value.defaults.mutableDefaults; - } else { - optionsArray.push(value); - if ("handlers" in value) { - handlers.push(...value.handlers); - } - isMutableDefaults = value.mutableDefaults; - } - } - handlers = handlers.filter( - (handler) => handler !== exports.defaultHandler - ); - if (handlers.length === 0) { - handlers.push(exports.defaultHandler); + // Consumed by Client + request.host = val; + } else if (headerName === "content-length") { + if (request.contentLength !== null) { + throw new InvalidArgumentError("duplicate content-length header"); } - return create({ - options: mergeOptions(...optionsArray), - handlers, - mutableDefaults: Boolean(isMutableDefaults), - }); - }; - // Pagination - const paginateEach = async function* (url, options) { - // TODO: Remove this `@ts-expect-error` when upgrading to TypeScript 4. - // Error: Argument of type 'Merge> | undefined' is not assignable to parameter of type 'Options | undefined'. - // @ts-expect-error - let normalizedOptions = normalizeArguments( - url, - options, - defaults.options - ); - normalizedOptions.resolveBodyOnly = false; - const pagination = normalizedOptions.pagination; - if (!is_1.default.object(pagination)) { - throw new TypeError("`options.pagination` must be implemented"); + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) { + throw new InvalidArgumentError("invalid content-length header"); } - const all = []; - let { countLimit } = pagination; - let numberOfRequests = 0; - while (numberOfRequests < pagination.requestLimit) { - if (numberOfRequests !== 0) { - // eslint-disable-next-line no-await-in-loop - await delay(pagination.backoff); - } - // @ts-expect-error FIXME! - // TODO: Throw when result is not an instance of Response - // eslint-disable-next-line no-await-in-loop - const result = await got(undefined, undefined, normalizedOptions); - // eslint-disable-next-line no-await-in-loop - const parsed = await pagination.transform(result); - const current = []; - for (const item of parsed) { - if (pagination.filter(item, all, current)) { - if (!pagination.shouldContinue(item, all, current)) { - return; - } - yield item; - if (pagination.stackAllItems) { - all.push(item); - } - current.push(item); - if (--countLimit <= 0) { - return; - } - } - } - const optionsToMerge = pagination.paginate(result, all, current); - if (optionsToMerge === false) { - return; - } - if (optionsToMerge === result.request.options) { - normalizedOptions = result.request.options; - } else if (optionsToMerge !== undefined) { - normalizedOptions = normalizeArguments( - undefined, - optionsToMerge, - normalizedOptions - ); - } - numberOfRequests++; + } else if ( + request.contentType === null && + headerName === "content-type" + ) { + request.contentType = val; + request.headers.push(key, val); + } else if ( + headerName === "transfer-encoding" || + headerName === "keep-alive" || + headerName === "upgrade" + ) { + throw new InvalidArgumentError(`invalid ${headerName} header`); + } else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") { + throw new InvalidArgumentError("invalid connection header"); } - }; - got.paginate = paginateEach; - got.paginate.all = async (url, options) => { - const results = []; - for await (const item of paginateEach(url, options)) { - results.push(item); + + if (value === "close") { + request.reset = true; } - return results; - }; - // For those who like very descriptive names - got.paginate.each = paginateEach; - // Stream API - got.stream = (url, options) => got(url, { ...options, isStream: true }); - // Shortcuts - for (const method of aliases) { - got[method] = (url, options) => got(url, { ...options, method }); - got.stream[method] = (url, options) => { - return got(url, { ...options, method, isStream: true }); - }; + } else if (headerName === "expect") { + throw new NotSupportedError("expect header not supported"); + } else { + request.headers.push(key, val); } - Object.assign(got, errors); - Object.defineProperty(got, "defaults", { - value: defaults.mutableDefaults - ? defaults - : deep_freeze_1.default(defaults), - writable: defaults.mutableDefaults, - configurable: defaults.mutableDefaults, - enumerable: true, - }); - got.mergeOptions = mergeOptions; - return got; - }; - exports["default"] = create; - __exportStar(__nccwpck_require__(2613), exports); + } + + module.exports = Request; /***/ }, - /***/ 3061: /***/ function (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 __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if ( - p !== "default" && - !Object.prototype.hasOwnProperty.call(exports, p) - ) - __createBinding(exports, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - const url_1 = __nccwpck_require__(7310); - const create_1 = __nccwpck_require__(4337); - const defaults = { - options: { - method: "GET", - retry: { - limit: 2, - methods: ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE"], - statusCodes: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], - errorCodes: [ - "ETIMEDOUT", - "ECONNRESET", - "EADDRINUSE", - "ECONNREFUSED", - "EPIPE", - "ENOTFOUND", - "ENETUNREACH", - "EAI_AGAIN", - ], - maxRetryAfter: undefined, - calculateDelay: ({ computedValue }) => computedValue, - }, - timeout: {}, - headers: { - "user-agent": "got (https://github.com/sindresorhus/got)", - }, - hooks: { - init: [], - beforeRequest: [], - beforeRedirect: [], - beforeRetry: [], - beforeError: [], - afterResponse: [], - }, - cache: undefined, - dnsCache: undefined, - decompress: true, - throwHttpErrors: true, - followRedirect: true, - isStream: false, - responseType: "text", - resolveBodyOnly: false, - maxRedirects: 10, - prefixUrl: "", - methodRewriting: true, - ignoreInvalidCookies: false, - context: {}, - // TODO: Set this to `true` when Got 12 gets released - http2: false, - allowGetBody: false, - https: undefined, - pagination: { - transform: (response) => { - if (response.request.options.responseType === "json") { - return response.body; - } - return JSON.parse(response.body); - }, - paginate: (response) => { - if (!Reflect.has(response.headers, "link")) { - return false; - } - const items = response.headers.link.split(","); - let next; - for (const item of items) { - const parsed = item.split(";"); - if (parsed[1].includes("next")) { - next = parsed[0].trimStart().trim(); - next = next.slice(1, -1); - break; - } - } - if (next) { - const options = { - url: new url_1.URL(next), - }; - return options; - } - return false; - }, - filter: () => true, - shouldContinue: () => true, - countLimit: Infinity, - backoff: 0, - requestLimit: 10000, - stackAllItems: true, - }, - parseJson: (text) => JSON.parse(text), - stringifyJson: (object) => JSON.stringify(object), - cacheOptions: {}, - }, - handlers: [create_1.defaultHandler], - mutableDefaults: false, + /***/ 6443: /***/ (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"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent"), }; - const got = create_1.default(defaults); - exports["default"] = got; - // For CommonJS default export support - module.exports = got; - module.exports["default"] = got; - module.exports.__esModule = true; // Workaround for TS issue: https://github.com/sindresorhus/got/pull/1267 - __exportStar(__nccwpck_require__(4337), exports); - __exportStar(__nccwpck_require__(6056), exports); /***/ }, - /***/ 2613: /***/ (__unused_webpack_module, exports) => { + /***/ 7752: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - - /***/ - }, + const { wellknownHeaderNames, headerNameLowerCasedRecord } = + __nccwpck_require__(735); + + class TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === undefined || index >= key.length) { + throw new TypeError("Unreachable"); + } + const code = (this.code = key.charCodeAt(index)); + // check code is ascii string + if (code > 0x7f) { + throw new TypeError("key must be ascii string"); + } + if (key.length !== ++index) { + this.middle = new TstNode(key, value, index); + } else { + this.value = value; + } + } - /***/ 285: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) { + throw new TypeError("Unreachable"); + } + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + // check code is ascii string + if (code > 0x7f) { + throw new TypeError("key must be ascii string"); + } + if (node.code === code) { + if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) { + node = node.middle; + } else { + node.middle = new TstNode(key, value, index); + break; + } + } else if (node.code < code) { + if (node.left !== null) { + node = node.left; + } else { + node.left = new TstNode(key, value, index); + break; + } + } else if (node.right !== null) { + node = node.right; + } else { + node.right = new TstNode(key, value, index); + break; + } + } + } - Object.defineProperty(exports, "__esModule", { value: true }); - const is_1 = __nccwpck_require__(7678); - function deepFreeze(object) { - for (const value of Object.values(object)) { - if (is_1.default.plainObject(value) || is_1.default.array(value)) { - deepFreeze(value); + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + // A-Z + // First check if it is bigger than 0x5a. + // Lowercase letters have higher char codes than uppercase ones. + // Also we assume that headers will mostly contain lowercase characters. + if (code <= 0x5a && code >= 0x41) { + // Lowercase for uppercase. + code |= 32; + } + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) { + // Returns Node since it is the last key. + return node; + } + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } } + return null; } - return Object.freeze(object); } - exports["default"] = deepFreeze; - /***/ - }, + class TernarySearchTree { + /** @type {TstNode | null} */ + node = null; - /***/ 397: /***/ (__unused_webpack_module, exports) => { - "use strict"; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) { + this.node = new TstNode(key, value, 0); + } else { + this.node.add(key, value); + } + } - Object.defineProperty(exports, "__esModule", { value: true }); - const alreadyWarned = new Set(); - exports["default"] = (message) => { - if (alreadyWarned.has(message)) { - return; + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; } - alreadyWarned.add(message); - // @ts-expect-error Missing types. - process.emitWarning(`Got: ${message}`, { - type: "DeprecationWarning", - }); + } + + const tree = new TernarySearchTree(); + + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + + module.exports = { + TernarySearchTree, + tree, }; /***/ }, - /***/ 1002: /***/ (module) => { + /***/ 3440: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { "use strict"; - // rfc7231 6.1 - const statusCodeCacheableByDefault = new Set([ - 200, - 203, - 204, - 206, - 300, - 301, - 308, - 404, - 405, - 410, - 414, - 501, - ]); + const assert = __nccwpck_require__(4589); + const { kDestroyed, kBodyUsed, kListeners, kBody } = + __nccwpck_require__(6443); + const { IncomingMessage } = __nccwpck_require__(7067); + const stream = __nccwpck_require__(7075); + const net = __nccwpck_require__(7030); + const { Blob } = __nccwpck_require__(4573); + const nodeUtil = __nccwpck_require__(7975); + const { stringify } = __nccwpck_require__(1792); + const { EventEmitter: EE } = __nccwpck_require__(8474); + const { InvalidArgumentError } = __nccwpck_require__(8707); + const { headerNameLowerCasedRecord } = __nccwpck_require__(735); + const { tree } = __nccwpck_require__(7752); + + const [nodeMajor, nodeMinor] = process.versions.node + .split(".") + .map((v) => Number(v)); + + class BodyAsyncIterable { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + } - // This implementation does not understand partial responses (206) - const understoodStatuses = new Set([ - 200, - 203, - 204, - 300, - 301, - 302, - 303, - 307, - 308, - 404, - 405, - 410, - 414, - 501, - ]); + function wrapRequestBody(body) { + if (isStream(body)) { + // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp + // so that it can be dispatched again? + // TODO (fix): Do we need 100-expect support to provide a way to do this properly? + if (bodyLength(body) === 0) { + body.on("data", function () { + assert(false); + }); + } - const errorStatusCodes = new Set([500, 502, 503, 504]); + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE.prototype.on.call(body, "data", function () { + this[kBodyUsed] = true; + }); + } - const hopByHopHeaders = { - date: true, // included, because we add Age update Date - connection: true, - "keep-alive": true, - "proxy-authenticate": true, - "proxy-authorization": true, - te: true, - trailer: true, - "transfer-encoding": true, - upgrade: true, - }; + return body; + } else if (body && typeof body.pipeTo === "function") { + // TODO (fix): We can't access ReadableStream internal state + // to determine whether or not it has been disturbed. This is just + // a workaround. + return new BodyAsyncIterable(body); + } else if ( + body && + typeof body !== "string" && + !ArrayBuffer.isView(body) && + isIterable(body) + ) { + // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + return new BodyAsyncIterable(body); + } else { + return body; + } + } - const excludedFromRevalidationUpdate = { - // Since the old body is reused, it doesn't make sense to change properties of the body - "content-length": true, - "content-encoding": true, - "transfer-encoding": true, - "content-range": true, - }; + function nop() {} - function toNumberOrZero(s) { - const n = parseInt(s, 10); - return isFinite(n) ? n : 0; + function isStream(obj) { + return ( + obj && + typeof obj === "object" && + typeof obj.pipe === "function" && + typeof obj.on === "function" + ); } - // RFC 5861 - function isErrorResponse(response) { - // consider undefined response as faulty - if (!response) { + // based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) + function isBlobLike(object) { + if (object === null) { + return false; + } else if (object instanceof Blob) { return true; + } else if (typeof object !== "object") { + return false; + } else { + const sTag = object[Symbol.toStringTag]; + + return ( + (sTag === "Blob" || sTag === "File") && + (("stream" in object && typeof object.stream === "function") || + ("arrayBuffer" in object && + typeof object.arrayBuffer === "function")) + ); } - return errorStatusCodes.has(response.status); } - function parseCacheControl(header) { - const cc = {}; - if (!header) return cc; - - // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), - // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale - const parts = header.trim().split(/,/); - for (const part of parts) { - const [k, v] = part.split(/=/, 2); - cc[k.trim()] = - v === undefined ? true : v.trim().replace(/^"|"$/g, ""); + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) { + throw new Error( + 'Query params cannot be passed when url already contains "?" or "#".', + ); } - return cc; - } + const stringified = stringify(queryParams); - function formatCacheControl(cc) { - let parts = []; - for (const k in cc) { - const v = cc[k]; - parts.push(v === true ? k : k + "=" + v); - } - if (!parts.length) { - return undefined; + if (stringified) { + url += "?" + stringified; } - return parts.join(", "); - } - module.exports = class CachePolicy { - constructor( - req, - res, - { - shared, - cacheHeuristic, - immutableMinTimeToLive, - ignoreCargoCult, - _fromObject, - } = {} - ) { - if (_fromObject) { - this._fromObject(_fromObject); - return; - } - - if (!res || !res.headers) { - throw Error("Response headers missing"); - } - this._assertRequestHasHeaders(req); + return url; + } - this._responseTime = this.now(); - this._isShared = shared !== false; - this._cacheHeuristic = - undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE - this._immutableMinTtl = - undefined !== immutableMinTimeToLive - ? immutableMinTimeToLive - : 24 * 3600 * 1000; + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } - this._status = "status" in res ? res.status : 200; - this._resHeaders = res.headers; - this._rescc = parseCacheControl(res.headers["cache-control"]); - this._method = "method" in req ? req.method : "GET"; - this._url = req.url; - this._host = req.headers.host; - this._noAuthorization = !req.headers.authorization; - this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used - this._reqcc = parseCacheControl(req.headers["cache-control"]); + function isHttpOrHttpsPrefixed(value) { + return ( + value != null && + value[0] === "h" && + value[1] === "t" && + value[2] === "t" && + value[3] === "p" && + (value[4] === ":" || (value[4] === "s" && value[5] === ":")) + ); + } - // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching, - // so there's no point stricly adhering to the blindly copy&pasted directives. - if ( - ignoreCargoCult && - "pre-check" in this._rescc && - "post-check" in this._rescc - ) { - delete this._rescc["pre-check"]; - delete this._rescc["post-check"]; - delete this._rescc["no-cache"]; - delete this._rescc["no-store"]; - delete this._rescc["must-revalidate"]; - this._resHeaders = Object.assign({}, this._resHeaders, { - "cache-control": formatCacheControl(this._rescc), - }); - delete this._resHeaders.expires; - delete this._resHeaders.pragma; - } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); - // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive - // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1). - if ( - res.headers["cache-control"] == null && - /no-cache/.test(res.headers.pragma) - ) { - this._rescc["no-cache"] = true; + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError( + "Invalid URL protocol: the URL must start with `http:` or `https:`.", + ); } - } - - now() { - return Date.now(); - } - storable() { - // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it. - return !!( - !this._reqcc["no-store"] && - // A cache MUST NOT store a response to any request, unless: - // The request method is understood by the cache and defined as being cacheable, and - ("GET" === this._method || - "HEAD" === this._method || - ("POST" === this._method && this._hasExplicitExpiration())) && - // the response status code is understood by the cache, and - understoodStatuses.has(this._status) && - // the "no-store" cache directive does not appear in request or response header fields, and - !this._rescc["no-store"] && - // the "private" response directive does not appear in the response, if the cache is shared, and - (!this._isShared || !this._rescc.private) && - // the Authorization header field does not appear in the request, if the cache is shared, - (!this._isShared || - this._noAuthorization || - this._allowsStoringAuthenticated()) && - // the response either: - // contains an Expires header field, or - (this._resHeaders.expires || - // contains a max-age response directive, or - // contains a s-maxage response directive and the cache is shared, or - // contains a public response directive. - this._rescc["max-age"] || - (this._isShared && this._rescc["s-maxage"]) || - this._rescc.public || - // has a status code that is defined as cacheable by default - statusCodeCacheableByDefault.has(this._status)) - ); + return url; } - _hasExplicitExpiration() { - // 4.2.1 Calculating Freshness Lifetime - return ( - (this._isShared && this._rescc["s-maxage"]) || - this._rescc["max-age"] || - this._resHeaders.expires + if (!url || typeof url !== "object") { + throw new InvalidArgumentError( + "Invalid URL: The URL argument must be a non-null object.", ); } - _assertRequestHasHeaders(req) { - if (!req || !req.headers) { - throw Error("Request headers missing"); + if (!(url instanceof URL)) { + if ( + url.port != null && + url.port !== "" && + isValidPort(url.port) === false + ) { + throw new InvalidArgumentError( + "Invalid URL: port must be a valid integer or a string representation of an integer.", + ); } - } - satisfiesWithoutRevalidation(req) { - this._assertRequestHasHeaders(req); + if (url.path != null && typeof url.path !== "string") { + throw new InvalidArgumentError( + "Invalid URL path: the path must be a string or null/undefined.", + ); + } - // When presented with a request, a cache MUST NOT reuse a stored response, unless: - // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive, - // unless the stored response is successfully validated (Section 4.3), and - const requestCC = parseCacheControl(req.headers["cache-control"]); - if (requestCC["no-cache"] || /no-cache/.test(req.headers.pragma)) { - return false; + if (url.pathname != null && typeof url.pathname !== "string") { + throw new InvalidArgumentError( + "Invalid URL pathname: the pathname must be a string or null/undefined.", + ); } - if (requestCC["max-age"] && this.age() > requestCC["max-age"]) { - 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.", + ); } - if ( - requestCC["min-fresh"] && - this.timeToLive() < 1000 * requestCC["min-fresh"] - ) { - 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.", + ); } - // the stored response is either: - // fresh, or allowed to be served stale - if (this.stale()) { - const allowsStale = - requestCC["max-stale"] && - !this._rescc["must-revalidate"] && - (true === requestCC["max-stale"] || - requestCC["max-stale"] > this.age() - this.maxAge()); - if (!allowsStale) { - return false; - } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError( + "Invalid URL protocol: the URL must start with `http:` or `https:`.", + ); } - return this._requestMatches(req, false); - } + 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 || ""}`; - _requestMatches(req, allowHeadMethod) { - // The presented effective request URI and that of the stored response match, and - return ( - (!this._url || this._url === req.url) && - this._host === req.headers.host && - // the request method associated with the stored response allows it to be used for the presented request, and - (!req.method || - this._method === req.method || - (allowHeadMethod && "HEAD" === req.method)) && - // selecting header fields nominated by the stored response (if any) match those presented, and - this._varyMatches(req) - ); + if (origin[origin.length - 1] === "/") { + origin = origin.slice(0, origin.length - 1); + } + + if (path && path[0] !== "/") { + path = `/${path}`; + } + // new URL(path, origin) is unsafe when `path` contains an absolute URL + // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: + // If first parameter is a relative URL, second param is required, and will be used as the base URL. + // If first parameter is an absolute URL, a given second param will be ignored. + return new URL(`${origin}${path}`); } - _allowsStoringAuthenticated() { - // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage. - return ( - this._rescc["must-revalidate"] || - this._rescc.public || - this._rescc["s-maxage"] + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError( + "Invalid URL protocol: the URL must start with `http:` or `https:`.", ); } - _varyMatches(req) { - if (!this._resHeaders.vary) { - return true; - } + return url; + } - // A Vary header field-value of "*" always fails to match - if (this._resHeaders.vary === "*") { - return false; - } + function parseOrigin(url) { + url = parseURL(url); - const fields = this._resHeaders.vary - .trim() - .toLowerCase() - .split(/\s*,\s*/); - for (const name of fields) { - if (req.headers[name] !== this._reqHeaders[name]) return false; - } - return true; + if (url.pathname !== "/" || url.search || url.hash) { + throw new InvalidArgumentError("invalid url"); } - _copyWithoutHopByHopHeaders(inHeaders) { - const headers = {}; - for (const name in inHeaders) { - if (hopByHopHeaders[name]) continue; - headers[name] = inHeaders[name]; - } - // 9.1. Connection - if (inHeaders.connection) { - const tokens = inHeaders.connection.trim().split(/\s*,\s*/); - for (const name of tokens) { - delete headers[name]; - } - } - if (headers.warning) { - const warnings = headers.warning.split(/,/).filter((warning) => { - return !/^\s*1[0-9][0-9]/.test(warning); - }); - if (!warnings.length) { - delete headers.warning; - } else { - headers.warning = warnings.join(",").trim(); - } - } - return headers; - } + return url; + } - responseHeaders() { - const headers = this._copyWithoutHopByHopHeaders(this._resHeaders); - const age = this.age(); + function getHostname(host) { + if (host[0] === "[") { + const idx = host.indexOf("]"); - // A cache SHOULD generate 113 warning if it heuristically chose a freshness - // lifetime greater than 24 hours and the response's age is greater than 24 hours. - if ( - age > 3600 * 24 && - !this._hasExplicitExpiration() && - this.maxAge() > 3600 * 24 - ) { - headers.warning = - (headers.warning ? `${headers.warning}, ` : "") + - '113 - "rfc7234 5.5.4"'; - } - headers.age = `${Math.round(age)}`; - headers.date = new Date(this.now()).toUTCString(); - return headers; + assert(idx !== -1); + return host.substring(1, idx); } - /** - * Value of the Date response header or current time if Date was invalid - * @return timestamp - */ - date() { - const serverDate = Date.parse(this._resHeaders.date); - if (isFinite(serverDate)) { - return serverDate; - } - return this._responseTime; - } + const idx = host.indexOf(":"); + if (idx === -1) return host; - /** - * Value of the Age header, in seconds, updated for the current time. - * May be fractional. - * - * @return Number - */ - age() { - let age = this._ageValue(); + return host.substring(0, idx); + } - const residentTime = (this.now() - this._responseTime) / 1000; - return age + residentTime; + // 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; } - _ageValue() { - return toNumberOrZero(this._resHeaders.age); + assert(typeof host === "string"); + + const servername = getHostname(host); + if (net.isIP(servername)) { + return ""; } - /** - * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`. - * - * For an up-to-date value, see `timeToLive()`. - * - * @return Number - */ - maxAge() { - if (!this.storable() || this._rescc["no-cache"]) { - return 0; - } + return servername; + } - // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default - // so this implementation requires explicit opt-in via public header - if ( - this._isShared && - this._resHeaders["set-cookie"] && - !this._rescc.public && - !this._rescc.immutable - ) { - return 0; - } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } - if (this._resHeaders.vary === "*") { - return 0; - } + function isAsyncIterable(obj) { + return !!( + obj != null && typeof obj[Symbol.asyncIterator] === "function" + ); + } - if (this._isShared) { - if (this._rescc["proxy-revalidate"]) { - return 0; - } - // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field. - if (this._rescc["s-maxage"]) { - return toNumberOrZero(this._rescc["s-maxage"]); - } - } + function isIterable(obj) { + return !!( + obj != null && + (typeof obj[Symbol.iterator] === "function" || + typeof obj[Symbol.asyncIterator] === "function") + ); + } - // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field. - if (this._rescc["max-age"]) { - return toNumberOrZero(this._rescc["max-age"]); - } + 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; + } - const defaultMinTtl = this._rescc.immutable - ? this._immutableMinTtl - : 0; + function isDestroyed(body) { + return ( + body && + !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)) + ); + } - const serverDate = this.date(); - if (this._resHeaders.expires) { - const expires = Date.parse(this._resHeaders.expires); - // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). - if (Number.isNaN(expires) || expires < serverDate) { - return 0; - } - return Math.max(defaultMinTtl, (expires - serverDate) / 1000); - } + function destroy(stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) { + return; + } - if (this._resHeaders["last-modified"]) { - const lastModified = Date.parse(this._resHeaders["last-modified"]); - if (isFinite(lastModified) && serverDate > lastModified) { - return Math.max( - defaultMinTtl, - ((serverDate - lastModified) / 1000) * this._cacheHeuristic - ); - } + if (typeof stream.destroy === "function") { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { + // See: https://github.com/nodejs/node/pull/38505/files + stream.socket = null; } - return defaultMinTtl; + stream.destroy(err); + } else if (err) { + queueMicrotask(() => { + stream.emit("error", err); + }); } - timeToLive() { - const age = this.maxAge() - this.age(); - const staleIfErrorAge = - age + toNumberOrZero(this._rescc["stale-if-error"]); - const staleWhileRevalidateAge = - age + toNumberOrZero(this._rescc["stale-while-revalidate"]); - return ( - Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1000 - ); + if (stream.destroyed !== true) { + stream[kDestroyed] = true; } + } - stale() { - return this.maxAge() <= this.age(); + 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 typeof value === "string" + ? (headerNameLowerCasedRecord[value] ?? value.toLowerCase()) + : (tree.lookup(value) ?? value.toString("latin1").toLowerCase()); + } + + /** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + + /** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ + function parseHeaders(headers, obj) { + if (obj === undefined) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") { + obj[key] = headersValue; + } else { + obj[key] = Array.isArray(headersValue) + ? headersValue.map((x) => x.toString("utf8")) + : headersValue.toString("utf8"); + } + } } - _useStaleIfError() { - return ( - this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > - this.age() - ); + // 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"); } - useStaleWhileRevalidate() { - return ( - this.maxAge() + - toNumberOrZero(this._rescc["stale-while-revalidate"]) > - this.age() - ); + return obj; + } + + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + + kLen = key.length; + if ( + kLen === 14 && + key[7] === "-" && + (key === "content-length" || key.toLowerCase() === "content-length") + ) { + hasContentLength = true; + } else if ( + kLen === 19 && + key[7] === "-" && + (key === "content-disposition" || + key.toLowerCase() === "content-disposition") + ) { + contentDispositionIdx = n + 1; + } + ret[n] = key; + ret[n + 1] = val; } - static fromObject(obj) { - return new this(undefined, undefined, { _fromObject: obj }); + // See https://github.com/nodejs/node/pull/46528 + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from( + ret[contentDispositionIdx], + ).toString("latin1"); } - _fromObject(obj) { - if (this._responseTime) throw Error("Reinitialized"); - if (!obj || obj.v !== 1) throw Error("Invalid serialization"); + return ret; + } - this._responseTime = obj.t; - this._isShared = obj.sh; - this._cacheHeuristic = obj.ch; - this._immutableMinTtl = - obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000; - this._status = obj.st; - this._resHeaders = obj.resh; - this._rescc = obj.rescc; - this._method = obj.m; - this._url = obj.u; - this._host = obj.h; - this._noAuthorization = obj.a; - this._reqHeaders = obj.reqh; - this._reqcc = obj.reqcc; + 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"); } - toObject() { - return { - v: 1, - t: this._responseTime, - sh: this._isShared, - ch: this._cacheHeuristic, - imm: this._immutableMinTtl, - st: this._status, - resh: this._resHeaders, - rescc: this._rescc, - m: this._method, - u: this._url, - h: this._host, - a: this._noAuthorization, - reqh: this._reqHeaders, - reqcc: this._reqcc, - }; + if (typeof handler.onConnect !== "function") { + throw new InvalidArgumentError("invalid onConnect method"); } - /** - * Headers for sending to the origin server to revalidate stale response. - * Allows server to return 304 to allow reuse of the previous response. - * - * Hop by hop headers are always stripped. - * Revalidation headers may be added or removed, depending on request. - */ - revalidationHeaders(incomingReq) { - this._assertRequestHasHeaders(incomingReq); - const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); + if (typeof handler.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); + } - // This implementation does not understand range requests - delete headers["if-range"]; + if ( + typeof handler.onBodySent !== "function" && + handler.onBodySent !== undefined + ) { + throw new InvalidArgumentError("invalid onBodySent method"); + } - if (!this._requestMatches(incomingReq, true) || !this.storable()) { - // revalidation allowed via HEAD - // not for the same resource, or wasn't allowed to be cached anyway - delete headers["if-none-match"]; - delete headers["if-modified-since"]; - return headers; + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") { + throw new InvalidArgumentError("invalid onUpgrade method"); + } + } else { + if (typeof handler.onHeaders !== "function") { + throw new InvalidArgumentError("invalid onHeaders method"); } - /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */ - if (this._resHeaders.etag) { - headers["if-none-match"] = headers["if-none-match"] - ? `${headers["if-none-match"]}, ${this._resHeaders.etag}` - : this._resHeaders.etag; + if (typeof handler.onData !== "function") { + throw new InvalidArgumentError("invalid onData method"); } - // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request. - const forbidsWeakValidators = - headers["accept-ranges"] || - headers["if-match"] || - headers["if-unmodified-since"] || - (this._method && this._method != "GET"); + if (typeof handler.onComplete !== "function") { + throw new InvalidArgumentError("invalid onComplete method"); + } + } + } - /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server. - Note: This implementation does not understand partial responses (206) */ - if (forbidsWeakValidators) { - delete headers["if-modified-since"]; + // A body is disturbed if it has been read from and it cannot + // be re-used without losing state or data. + function isDisturbed(body) { + // TODO (fix): Why is body[kBodyUsed] needed? + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } - if (headers["if-none-match"]) { - const etags = headers["if-none-match"] - .split(/,/) - .filter((etag) => { - return !/^\s*W\//.test(etag); - }); - if (!etags.length) { - delete headers["if-none-match"]; - } else { - headers["if-none-match"] = etags.join(",").trim(); + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + + function isReadable(body) { + return !!(body && stream.isReadable(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, + }; + } + + /** @type {globalThis['ReadableStream']} */ + function ReadableStreamFrom(iterable) { + // We cannot use ReadableStream.from here because it does not return a byte stream. + + let iterator; + return new ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) { + controller.enqueue(new Uint8Array(buf)); } } - } else if ( - this._resHeaders["last-modified"] && - !headers["if-modified-since"] - ) { - headers["if-modified-since"] = this._resHeaders["last-modified"]; - } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes", + }); + } - return headers; + // 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 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); + } - /** - * Creates new CachePolicy with information combined from the previews response, - * and the new revalidation response. - * - * Returns {policy, modified} where modified is a boolean indicating - * whether the response body has been modified, and old cached body can't be used. - * - * @return {Object} {policy: CachePolicy, modified: Boolean} - */ - revalidatedPolicy(request, response) { - this._assertRequestHasHeaders(request); - if (this._useStaleIfError() && isErrorResponse(response)) { - // I consider the revalidation request unsuccessful - return { - modified: false, - matches: false, - policy: this, - }; - } - if (!response || !response.headers) { - throw Error("Response headers missing"); - } + const hasToWellFormed = + typeof String.prototype.toWellFormed === "function"; + const hasIsWellFormed = + typeof String.prototype.isWellFormed === "function"; - // These aren't going to be supported exactly, since one CachePolicy object - // doesn't know about all the other cached objects. - let matches = false; - if (response.status !== undefined && response.status != 304) { - matches = false; - } else if ( - response.headers.etag && - !/^\s*W\//.test(response.headers.etag) - ) { - // "All of the stored responses with the same strong validator are selected. - // If none of the stored responses contain the same strong validator, - // then the cache MUST NOT use the new response to update any stored responses." - matches = - this._resHeaders.etag && - this._resHeaders.etag.replace(/^\s*W\//, "") === - response.headers.etag; - } else if (this._resHeaders.etag && response.headers.etag) { - // "If the new response contains a weak validator and that validator corresponds - // to one of the cache's stored responses, - // then the most recent of those matching stored responses is selected for update." - matches = - this._resHeaders.etag.replace(/^\s*W\//, "") === - response.headers.etag.replace(/^\s*W\//, ""); - } else if (this._resHeaders["last-modified"]) { - matches = - this._resHeaders["last-modified"] === - response.headers["last-modified"]; - } else { - // If the new response does not include any form of validator (such as in the case where - // a client generates an If-Modified-Since request from a source other than the Last-Modified - // response header field), and there is only one stored response, and that stored response also - // lacks a validator, then that stored response is selected for update. - if ( - !this._resHeaders.etag && - !this._resHeaders["last-modified"] && - !response.headers.etag && - !response.headers["last-modified"] - ) { - matches = true; + /** + * @param {string} val + */ + function toUSVString(val) { + return hasToWellFormed + ? `${val}`.toWellFormed() + : nodeUtil.toUSVString(val); + } + + /** + * @param {string} val + */ + // TODO: move this to webidl + function isUSVString(val) { + return hasIsWellFormed + ? `${val}`.isWellFormed() + : toUSVString(val) === `${val}`; + } + + /** + * @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; + } + + // headerCharRegex have been lifted from + // https://github.com/nodejs/node/blob/main/lib/_http_common.js + + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + + /** + * @param {string} characters + */ + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + + // 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; + } + + function addListener(obj, name, listener) { + const listeners = (obj[kListeners] ??= []); + listeners.push([name, listener]); + obj.on(name, listener); + return obj; + } + + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) { + obj.removeListener(name, listener); + } + obj[kListeners] = null; + } + + function errorRequest(client, request, err) { + try { + request.onError(err); + assert(request.aborted); + } catch (err) { + client.emit("error", err); + } + } + + const kEnumerableProperty = Object.create(null); + kEnumerableProperty.enumerable = true; + + const normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT", + }; + + const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH", + }; + + // Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + + module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"], + wrapRequestBody, + }; + + /***/ + }, + + /***/ 7405: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { InvalidArgumentError } = __nccwpck_require__(8707); + const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = + __nccwpck_require__(6443); + const DispatcherBase = __nccwpck_require__(1841); + const Pool = __nccwpck_require__(628); + const Client = __nccwpck_require__(3701); + const util = __nccwpck_require__(3440); + const createRedirectInterceptor = __nccwpck_require__(5092); + + 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 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 + } = {}) { + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); } - if (!matches) { - return { - policy: new this.constructor(request, response), - // Client receiving 304 without body, even if it's invalid/mismatched has no option - // but to reuse a cached body. We don't have a good way to tell clients to do - // error recovery in such case. - modified: response.status != 304, - matches: false, - }; + if ( + connect != null && + typeof connect !== "function" && + typeof connect !== "object" + ) { + throw new InvalidArgumentError( + "connect must be a function or an object", + ); } - // use other header fields provided in the 304 (Not Modified) response to replace all instances - // of the corresponding header fields in the stored response. - const headers = {}; - for (const k in this._resHeaders) { - headers[k] = - k in response.headers && !excludedFromRevalidationUpdate[k] - ? response.headers[k] - : this._resHeaders[k]; + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { + throw new InvalidArgumentError( + "maxRedirections must be a positive number", + ); } - const newResponse = Object.assign({}, response, { - status: this._status, - method: this._method, - headers, - }); - return { - policy: new this.constructor(request, newResponse, { - shared: this._isShared, - cacheHeuristic: this._cacheHeuristic, - immutableMinTimeToLive: this._immutableMinTtl, - }), - modified: false, - matches: true, + super(options); + + if (connect && typeof connect !== "function") { + connect = { ...connect }; + } + + this[kInterceptors] = + 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[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); }; } - }; + + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) { + 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.", + ); + } + + let dispatcher = this[kClients].get(key); + + 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 introduces a tiny memory leak, as dispatchers are never removed from the map. + // TODO(mcollina): remove te timer when the client/pool do not have any more + // active connections. + this[kClients].set(key, dispatcher); + } + + return dispatcher.dispatch(opts, handler); + } + + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) { + closePromises.push(client.close()); + } + this[kClients].clear(); + + await Promise.all(closePromises); + } + + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) { + destroyPromises.push(client.destroy(err)); + } + this[kClients].clear(); + + await Promise.all(destroyPromises); + } + } + + module.exports = Agent; /***/ }, - /***/ 9898: /***/ ( + /***/ 837: /***/ ( module, __unused_webpack_exports, - __nccwpck_require__ + __nccwpck_require__, ) => { "use strict"; - const EventEmitter = __nccwpck_require__(2361); - const tls = __nccwpck_require__(4404); - const http2 = __nccwpck_require__(5158); - const QuickLRU = __nccwpck_require__(9273); + const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = + __nccwpck_require__(8707); + const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher, + } = __nccwpck_require__(2128); + const Pool = __nccwpck_require__(628); + const { kUrl, kInterceptors } = __nccwpck_require__(6443); + const { parseOrigin } = __nccwpck_require__(3440); + const kFactory = Symbol("factory"); - const kCurrentStreamsCount = Symbol("currentStreamsCount"); - const kRequest = Symbol("request"); - const kOriginSet = Symbol("cachedOriginSet"); - const kGracefullyClosing = Symbol("gracefullyClosing"); + 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"); - const nameKeys = [ - // `http2.connect()` options - "maxDeflateDynamicTableSize", - "maxSessionMemory", - "maxHeaderListPairs", - "maxOutstandingPings", - "maxReservedRemoteStreams", - "maxSendHeaderBlockLength", - "paddingStrategy", + /** + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; - // `tls.connect()` options - "localAddress", - "path", - "rejectUnauthorized", - "minDHSize", + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } - // `tls.createSecureContext()` options - "ca", - "cert", - "clientCertEngine", - "ciphers", - "key", - "pfx", - "servername", - "minVersion", - "maxVersion", - "secureProtocol", - "crl", - "honorCipherOrder", - "ecdhCurve", - "dhparam", - "secureOptions", - "sessionIdContext", - ]; + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } - const getSortedIndex = (array, value, compare) => { - let low = 0; - let high = array.length; + class BalancedPool extends PoolBase { + constructor( + upstreams = [], + { factory = defaultFactory, ...opts } = {}, + ) { + super(); - while (low < high) { - const mid = (low + high) >>> 1; + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; - /* istanbul ignore next */ - if (compare(array[mid], value)) { - // This never gets called because we use descending sort. Better to have this anyway. - low = mid + 1; - } else { - high = mid; + 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?.BalancedPool && + Array.isArray(opts.interceptors.BalancedPool) + ? opts.interceptors.BalancedPool + : []; + this[kFactory] = factory; + + for (const upstream of upstreams) { + this.addUpstream(upstream); } + this._updateBalancedPoolStats(); } - return low; - }; + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; - const compareSessions = (a, b) => { - return ( - a.remoteSettings.maxConcurrentStreams > - b.remoteSettings.maxConcurrentStreams - ); - }; + 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]), + ); - // See https://tools.ietf.org/html/rfc8336 - const closeCoveredSessions = (where, session) => { - // Clients SHOULD NOT emit new requests on any connection whose Origin - // Set is a proper subset of another connection's Origin Set, and they - // SHOULD close it once all outstanding requests are satisfied. - for (const coveredSession of where) { + 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() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) { + result = getGreatestCommonDivisor( + this[kClients][i][kWeight], + result, + ); + } + + this[kGreatestCommonDivisor] = result; + } + + 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; + + /***/ + }, + + /***/ 637: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + /* global WebAssembly */ + + const assert = __nccwpck_require__(4589); + const util = __nccwpck_require__(3440); + const { channels } = __nccwpck_require__(2414); + const timers = __nccwpck_require__(6603); + const { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError, + } = __nccwpck_require__(8707); + const { + kUrl, + kReset, + kClient, + kParser, + kBlocking, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kMaxRequests, + kCounter, + kMaxResponseSize, + kOnError, + kResume, + kHTTPContext, + } = __nccwpck_require__(6443); + + const constants = __nccwpck_require__(2824); + const EMPTY_BUF = Buffer.alloc(0); + const FastBuffer = Buffer[Symbol.species]; + const addListener = util.addListener; + const removeAllListeners = util.removeAllListeners; + const kIdleSocketValidation = Symbol("kIdleSocketValidation"); + const kIdleSocketValidationTimeout = Symbol( + "kIdleSocketValidationTimeout", + ); + const kSocketUsed = Symbol("kSocketUsed"); + + let extractBody; + + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID + ? __nccwpck_require__(3870) + : undefined; + + let mod; + try { + mod = await WebAssembly.compile(__nccwpck_require__(3434)); + } catch (e) { + /* istanbul ignore next */ + + // We could check if the error was caused by the simd option not + // being enabled, but the occurring of this other error + // * https://github.com/emscripten-core/emscripten/issues/11495 + // got me to remove that check to avoid breaking Node 12. + mod = await WebAssembly.compile( + llhttpWasmData || __nccwpck_require__(3870), + ); + } + + 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(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(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert(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(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(currentParser.ptr === p); + return ( + currentParser.onHeadersComplete( + statusCode, + Boolean(upgrade), + Boolean(shouldKeepAlive), + ) || 0 + ); + }, + wasm_on_body: (p, at, len) => { + assert(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(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 USE_NATIVE_TIMER = 0; + const USE_FAST_TIMER = 1; + + // Use fast timers for headers and body to take eventual event loop + // latency into account. + const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER; + const TIMEOUT_BODY = 4 | USE_FAST_TIMER; + + // Use native timers to ignore event loop latency for keep-alive + // handling. + const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; + + 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(delay, type) { + // If the existing timer and the new timer are of different timer type + // (fast or native) or have different delay, we need to clear the existing + // timer and set a new one. + if ( + delay !== this.timeoutValue || + (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) + ) { + // If a timeout is already set, clear it with clearTimeout of the fast + // timer implementation, as it can clear fast and native timers. + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + + if (delay) { + if (type & USE_FAST_TIMER) { + this.timeout = timers.setFastTimeout( + onParserTimeout, + delay, + new WeakRef(this), + ); + } else { + this.timeout = setTimeout( + onParserTimeout, + delay, + new WeakRef(this), + ); + this.timeout.unref(); + } + } + + this.timeoutValue = delay; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + + this.timeoutType = type; + } + + 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(); + } + } + + 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; + } + 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); + + // 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.OK) { + const body = data.subarray(offset); + + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(body); + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(body); + } else { + throw this.createError(ret, body); + } + } + } catch (err) { + util.destroy(socket, err); + } + } + + finish() { + assert(currentParser === null); + assert(this.ptr != null); + assert(!this.paused); + + const { llhttp } = this; + + let ret; + + try { + currentParser = this; + ret = llhttp.llhttp_finish(this.ptr); + } finally { + currentParser = null; + } + + if (ret === constants.ERROR.OK) { + return null; + } + + if ( + ret === constants.ERROR.PAUSED || + ret === constants.ERROR.PAUSED_UPGRADE + ) { + this.paused = true; + return null; + } + + return this.createError(ret, EMPTY_BUF); + } + + createError(ret, data) { + const { llhttp, contentLength, bytesRead } = this; + + if (contentLength && bytesRead !== parseInt(contentLength, 10)) { + return new ResponseContentLengthMismatchError(); + } + + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = + "Response does not match the HTTP/1.1 protocol (" + + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + + ")"; + } + + return new HTTPParserError(message, constants.ERROR[ret], data); + } + + destroy() { + assert(this.ptr != null); + assert(currentParser == null); + + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + + this.timeout && 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; + } + + if (client[kRunning] === 0) { + util.destroy( + socket, + new SocketError("bad response", util.getSocketInfo(socket)), + ); + return -1; + } + + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { + return -1; + } + request.onResponseStarted(); + } + + 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) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") { + this.keepAlive += buf.toString(); + } else if (headerName === "connection") { + this.connection += buf.toString(); + } + } else if ( + key.length === 14 && + util.bufferToLowerCasedHeaderName(key) === "content-length" + ) { + this.contentLength += buf.toString(); + } + + this.trackHeader(buf.length); + } + + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()); + } + } + + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + + assert(upgrade); + assert(client[kSocket] === socket); + assert(!socket.destroyed); + assert(!this.paused); + assert((headers.length & 1) === 0); + + const request = client[kQueue][client[kRunningIdx]]; + assert(request); + assert(request.upgrade || request.method === "CONNECT"); + + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + + this.headers = []; + this.headersSize = 0; + + socket.unshift(head); + + socket[kParser].destroy(); + socket[kParser] = null; + + socket[kClient] = null; + socket[kError] = null; + + removeAllListeners(socket); + + client[kSocket] = null; + client[kHTTPContext] = null; // TODO (fix): This is hacky... + 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); + } + + client[kResume](); + } + + 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; + } + + if (client[kRunning] === 0) { + util.destroy( + socket, + new SocketError("bad response", util.getSocketInfo(socket)), + ); + return -1; + } + + const request = client[kQueue][client[kRunningIdx]]; + + /* istanbul ignore next: difficult to make a test case for */ + if (!request) { + return -1; + } + + assert(!this.upgrade); + assert(this.statusCode < 200); + + if (statusCode === 100) { + util.destroy( + socket, + new SocketError("bad response", util.getSocketInfo(socket)), + ); + return -1; + } + + /* this can only happen if server is misbehaving */ + if (upgrade && !request.upgrade) { + util.destroy( + socket, + new SocketError("bad upgrade", util.getSocketInfo(socket)), + ); + return -1; + } + + assert(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(); + } + } + + if (request.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 & 1) === 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; + } + } 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; + } + + if (request.method === "HEAD") { + return 1; + } + + if (statusCode < 200) { + return 1; + } + + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + + return pause ? constants.ERROR.PAUSED : 0; + } + + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + + if (socket.destroyed) { + return -1; + } + + const request = client[kQueue][client[kRunningIdx]]; + assert(request); + + assert(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + + 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; + } + } + + onMessageComplete() { + const { + client, + socket, + statusCode, + upgrade, + headers, + contentLength, + bytesRead, + shouldKeepAlive, + } = this; + + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1; + } + + if (upgrade) { + return; + } + + assert(statusCode >= 100); + assert((this.headers.length & 1) === 0); + + const request = client[kQueue][client[kRunningIdx]]; + assert(request); + + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + + this.headers = []; + this.headersSize = 0; + + if (statusCode < 200) { + return; + } + + /* istanbul ignore next: should be handled by llhttp? */ + if ( + request.method !== "HEAD" && + contentLength && + bytesRead !== parseInt(contentLength, 10) + ) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + + request.onComplete(headers); + + client[kQueue][client[kRunningIdx]++] = null; + socket[kSocketUsed] = true; + + if (socket[kWriting]) { + assert(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] == null || 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(() => client[kResume]()); + } else { + client[kResume](); + } + } + } + + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if ( + !socket[kWriting] || + socket.writableNeedDrain || + client[kRunning] > 1 + ) { + assert(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) { + util.destroy(socket, new BodyTimeoutError()); + } + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + + async function connectH1(client, socket) { + client[kSocket] = socket; + + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kIdleSocketValidation] = 0; + socket[kIdleSocketValidationTimeout] = null; + socket[kSocketUsed] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + + addListener(socket, "error", function (err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + + const parser = this[kParser]; + + // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded + // to the user. + if ( + err.code === "ECONNRESET" && + parser.statusCode && + !parser.shouldKeepAlive + ) { + const parserErr = parser.finish(); + if (parserErr) { + this[kError] = parserErr; + this[kClient][kOnError](parserErr); + } + return; + } + + this[kError] = err; + + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function () { + const parser = this[kParser]; + + if (parser) { + parser.readMore(); + } + }); + addListener(socket, "end", function () { + const parser = this[kParser]; + + if (parser.statusCode && !parser.shouldKeepAlive) { + const parserErr = parser.finish(); + if (parserErr) { + util.destroy(this, parserErr); + } + return; + } + + util.destroy( + this, + new SocketError("other side closed", util.getSocketInfo(this)), + ); + }); + addListener(socket, "close", function () { + const client = this[kClient]; + const parser = this[kParser]; + + clearIdleSocketValidation(this); + + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + this[kError] = parser.finish() || this[kError]; + } + + this[kParser].destroy(); + this[kParser] = null; + } + + const err = + this[kError] || new SocketError("closed", util.getSocketInfo(this)); + + client[kSocket] = null; + client[kHTTPContext] = null; // TODO (fix): This is hacky... + + if (client.destroyed) { + assert(client[kPending] === 0); + + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } 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; + + util.errorRequest(client, request, err); + } + + client[kPendingIdx] = client[kRunningIdx]; + + assert(client[kRunning] === 0); + + client.emit("disconnect", client[kUrl], [client], err); + + client[kResume](); + }); + + let closed = false; + socket.on("close", () => { + closed = true; + }); + + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) { + queueMicrotask(callback); + } else { + socket.destroy(err).on("close", callback); + } + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if ( + socket[kWriting] || + socket[kReset] || + socket[kBlocking] || + socket[kIdleSocketValidation] === 1 + ) { + return true; + } + + if (request) { + if (client[kRunning] > 0 && !request.idempotent) { + // Non-idempotent request cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return true; + } + + if ( + client[kRunning] > 0 && + (request.upgrade || request.method === "CONNECT") + ) { + // Don't dispatch an upgrade until all preceding requests have completed. + // A misbehaving server might upgrade the connection before all pipelined + // request has completed. + return true; + } + + if ( + client[kRunning] > 0 && + util.bodyLength(request.body) !== 0 && + (util.isStream(request.body) || + util.isAsyncIterable(request.body) || + util.isFormDataLike(request.body)) + ) { + // Request with stream or iterator body can error while other requests + // are inflight and indirectly error those as well. + // Ensure this doesn't happen by waiting for inflight + // to complete before dispatching. + + // Request with stream or iterator body cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return true; + } + } + + return false; + }, + }; + } + + function clearIdleSocketValidation(socket) { + if (socket[kIdleSocketValidationTimeout]) { + clearTimeout(socket[kIdleSocketValidationTimeout]); + socket[kIdleSocketValidationTimeout] = null; + } + + socket[kIdleSocketValidation] = 0; + } + + function scheduleIdleSocketValidation(client, socket) { + socket[kIdleSocketValidation] = 1; + socket[kIdleSocketValidationTimeout] = setTimeout(() => { + socket[kIdleSocketValidationTimeout] = null; + socket[kIdleSocketValidation] = 2; + + if (client[kSocket] === socket && !socket.destroyed) { + client[kResume](); + } + }, 0); + socket[kIdleSocketValidationTimeout].unref?.(); + } + + /** + * @param {import('./client.js')} client + */ + function resumeH1(client) { + const socket = client[kSocket]; + + if (socket && !socket.destroyed) { + 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[kRunning] === 0 && + client[kPending] > 0 && + socket[kSocketUsed] + ) { + if (socket[kIdleSocketValidation] === 0) { + scheduleIdleSocketValidation(client, socket); + socket[kParser].readMore(); + if (socket.destroyed) { + return; + } + return; + } + + if (socket[kIdleSocketValidation] === 1) { + socket[kParser].readMore(); + if (socket.destroyed) { + return; + } + return; + } + } + + if (client[kRunning] === 0) { + socket[kParser].readMore(); + if (socket.destroyed) { + return; + } + } + + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { + socket[kParser].setTimeout( + client[kKeepAliveTimeoutValue], + TIMEOUT_KEEP_ALIVE, + ); + } + } 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); + } + } + } + } + + // 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 writeH1(client, request) { + const { method, path, host, upgrade, blocking, reset } = request; + + let { body, headers, contentLength } = request; + + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + + const expectsPayload = + method === "PUT" || + method === "POST" || + method === "PATCH" || + method === "QUERY" || + method === "PROPFIND" || + method === "PROPPATCH"; + + if (util.isFormDataLike(body)) { + if (!extractBody) { + extractBody = __nccwpck_require__(4492).extractBody; + } + + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) { + headers.push("content-type", contentType); + } + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if ( + util.isBlobLike(body) && + request.contentType == null && + body.type + ) { + headers.push("content-type", body.type); + } + + if (body && typeof body.read === "function") { + // Try to read EOF in order to get length. + body.read(0); + } + + const bodyLength = util.bodyLength(body); + + contentLength = bodyLength ?? contentLength; + + if (contentLength === null) { + contentLength = request.contentLength; + } + + if (contentLength === 0 && !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null; + } + + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if ( + shouldSendContentLength(method) && + contentLength > 0 && + request.contentLength !== null && + request.contentLength !== contentLength + ) { + if (client[kStrictContentLength]) { + util.errorRequest( + client, + request, + new RequestContentLengthMismatchError(), + ); + return false; + } + + process.emitWarning(new RequestContentLengthMismatchError()); + } + + const socket = client[kSocket]; + clearIdleSocketValidation(socket); + + const abort = (err) => { + if (request.aborted || request.completed) { + return; + } + + util.errorRequest(client, request, err || new RequestAbortedError()); + + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + + try { + request.onConnect(abort); + } catch (err) { + util.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 (Array.isArray(headers)) { + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + header += `${key}: ${val[i]}\r\n`; + } + } else { + header += `${key}: ${val}\r\n`; + } + } + } + + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }); + } + + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) { + writeBuffer( + abort, + null, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ); + } else if (util.isBuffer(body)) { + writeBuffer( + abort, + body, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable( + abort, + body.stream(), + client, + request, + socket, + contentLength, + header, + expectsPayload, + ); + } else { + writeBlob( + abort, + body, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ); + } + } else if (util.isStream(body)) { + writeStream( + abort, + body, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ); + } else if (util.isIterable(body)) { + writeIterable( + abort, + body, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ); + } else { + assert(false); + } + + return true; + } + + function writeStream( + abort, + body, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ) { + assert( + contentLength !== 0 || client[kRunning] === 0, + "stream body cannot be pipelined", + ); + + let finished = false; + + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header, + }); + + const onData = function (chunk) { + if (finished) { + return; + } + + try { + if (!writer.write(chunk) && this.pause) { + this.pause(); + } + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function () { + if (finished) { + return; + } + + if (body.resume) { + body.resume(); + } + }; + const onClose = function () { + // 'close' might be emitted *before* 'error' for + // broken streams. Wait a tick to avoid this case. + queueMicrotask(() => { + // It's only safe to remove 'error' listener after + // 'close'. + body.removeListener("error", onFinished); + }); + + if (!finished) { + 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("close", onClose); + + if (!err) { + try { + writer.end(); + } catch (er) { + err = er; + } + } + + 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", onClose); + + if (body.resume) { + body.resume(); + } + + socket.on("drain", onDrain).on("error", onFinished); + + if (body.errorEmitted ?? body.errored) { + setImmediate(() => onFinished(body.errored)); + } else if (body.endEmitted ?? body.readableEnded) { + setImmediate(() => onFinished(null)); + } + + if (body.closeEmitted ?? body.closed) { + setImmediate(onClose); + } + } + + function writeBuffer( + abort, + body, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ) { + try { + if (!body) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + } else { + assert( + contentLength === null, + "no body must not have content length", + ); + socket.write(`${header}\r\n`, "latin1"); + } + } 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); + + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + } + request.onRequestSent(); + + client[kResume](); + } catch (err) { + abort(err); + } + } + + async function writeBlob( + abort, + body, + client, + request, + socket, + contentLength, + header, + expectsPayload, + ) { + assert( + contentLength === body.size, + "blob body must have content length", + ); + + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + + const buffer = Buffer.from(await body.arrayBuffer()); + + socket.cork(); + socket.write( + `${header}content-length: ${contentLength}\r\n\r\n`, + "latin1", + ); + socket.write(buffer); + socket.uncork(); + + request.onBodySent(buffer); + request.onRequestSent(); + + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + + client[kResume](); + } catch (err) { + abort(err); + } + } + + async function writeIterable( + abort, + 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; + } + }); + + socket.on("close", onDrain).on("drain", onDrain); + + const writer = new AsyncWriter({ + abort, + 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]; + } + + if (!writer.write(chunk)) { + await waitForDrain(); + } + } + + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + + class AsyncWriter { + constructor({ + abort, + 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; + this.abort = abort; + + socket[kWriting] = true; + } + + write(chunk) { + const { + socket, + request, + contentLength, + client, + bytesWritten, + expectsPayload, + header, + } = this; + + if (socket[kError]) { + throw socket[kError]; + } + + if (socket.destroyed) { + return false; + } + + const len = Buffer.byteLength(chunk); + if (!len) { + return true; + } + + // We should defer writing chunks. + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } + + process.emitWarning(new RequestContentLengthMismatchError()); + } + + socket.cork(); + + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + } else { + socket.write( + `${header}content-length: ${contentLength}\r\n\r\n`, + "latin1", + ); + } + } + + if (contentLength === null) { + socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + } + + this.bytesWritten += len; + + const ret = socket.write(chunk); + + socket.uncork(); + + request.onBodySent(chunk); + + if (!ret) { + if ( + socket[kParser].timeout && + socket[kParser].timeoutType === TIMEOUT_HEADERS + ) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + } + + return ret; + } + + end() { + const { + socket, + contentLength, + client, + bytesWritten, + expectsPayload, + header, + request, + } = this; + request.onRequestSent(); + + socket[kWriting] = false; + + if (socket[kError]) { + throw socket[kError]; + } + + if (socket.destroyed) { + return; + } + + if (bytesWritten === 0) { + if (expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD send a Content-Length in a request message when + // no Transfer-Encoding is sent and the request method defines a meaning + // for an enclosed payload body. + + socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + } else { + socket.write(`${header}\r\n`, "latin1"); + } + } else if (contentLength === null) { + socket.write("\r\n0\r\n\r\n", "latin1"); + } + + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } else { + process.emitWarning(new RequestContentLengthMismatchError()); + } + } + + if ( + socket[kParser].timeout && + socket[kParser].timeoutType === TIMEOUT_HEADERS + ) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + + client[kResume](); + } + + destroy(err) { + const { socket, client, abort } = this; + + socket[kWriting] = false; + + if (err) { + assert( + client[kRunning] <= 1, + "pipeline should only contain this request", + ); + abort(err); + } + } + } + + module.exports = connectH1; + + /***/ + }, + + /***/ 8788: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const assert = __nccwpck_require__(4589); + const { pipeline } = __nccwpck_require__(7075); + const util = __nccwpck_require__(3440); + const { + RequestContentLengthMismatchError, + RequestAbortedError, + SocketError, + InformationalError, + } = __nccwpck_require__(8707); + const { + kUrl, + kReset, + kClient, + kRunning, + kPending, + kQueue, + kPendingIdx, + kRunningIdx, + kError, + kSocket, + kStrictContentLength, + kOnError, + kMaxConcurrentStreams, + kHTTP2Session, + kResume, + kSize, + kHTTPContext, + } = __nccwpck_require__(6443); + + const kOpenStreams = Symbol("open streams"); + + let extractBody; + + // Experimental + let h2ExperimentalWarned = false; + + /** @type {import('http2')} */ + let http2; + try { + http2 = __nccwpck_require__(2467); + } 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; + + function parseH2Headers(headers) { + const result = []; + + for (const [name, value] of Object.entries(headers)) { + // h2 may concat the header value by array + // e.g. Set-Cookie + if (Array.isArray(value)) { + for (const subvalue of value) { + // we need to provide each header value of header name + // because the headers handler expect name-value pair + result.push(Buffer.from(name), Buffer.from(subvalue)); + } + } else { + result.push(Buffer.from(name), Buffer.from(value)); + } + } + + return result; + } + + async function connectH2(client, socket) { + client[kSocket] = socket; + + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning( + "H2 support is experimental, expect them to change at any time.", + { + code: "UNDICI-H2", + }, + ); + } + + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams], + }); + + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function () { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + + const err = + this[kSocket][kError] || + this[kError] || + new SocketError("closed", util.getSocketInfo(socket)); + + client[kHTTP2Session] = null; + + if (client.destroyed) { + assert(client[kPending] === 0); + + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + }); + + session.unref(); + + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + + util.addListener(socket, "error", function (err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + + this[kError] = err; + + this[kClient][kOnError](err); + }); + + util.addListener(socket, "end", function () { + util.destroy( + this, + new SocketError("other side closed", util.getSocketInfo(this)), + ); + }); + + util.addListener(socket, "close", function () { + const err = + this[kError] || new SocketError("closed", util.getSocketInfo(this)); + + client[kSocket] = null; + + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + } + + client[kPendingIdx] = client[kRunningIdx]; + + assert(client[kRunning] === 0); + + client.emit("disconnect", client[kUrl], [client], err); + + client[kResume](); + }); + + let closed = false; + socket.on("close", () => { + closed = true; + }); + + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) { + queueMicrotask(callback); + } else { + // Destroying the socket will trigger the session close + socket.destroy(err).on("close", callback); + } + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + }, + }; + } + + function resumeH2(client) { + const socket = client[kSocket]; + + if (socket?.destroyed === false) { + if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + } + + function onHttp2SessionError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError( + `HTTP/2: "frameError" received - type ${type}, code ${code}`, + ); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + + function onHttp2SessionEnd() { + const err = new SocketError( + "other side closed", + util.getSocketInfo(this[kSocket]), + ); + this.destroy(err); + util.destroy(this[kSocket], err); + } + + /** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ + function onHTTP2GoAway(code) { + // We cannot recover, so best to close the session and the socket + const err = + this[kError] || + new SocketError( + `HTTP/2: "GOAWAY" frame received with code ${code}`, + util.getSocketInfo(this), + ); + const client = this[kClient]; + + client[kSocket] = null; + client[kHTTPContext] = null; + + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + + util.destroy(this[kSocket], err); + + // Fail head of pipeline. + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + + assert(client[kRunning] === 0); + + client.emit("disconnect", client[kUrl], [client], err); + + client[kResume](); + } + + // 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 writeH2(client, request) { + const session = client[kHTTP2Session]; + const { + method, + path, + host, + upgrade, + expectContinue, + signal, + headers: reqHeaders, + } = request; + let { body } = request; + + if (upgrade) { + util.errorRequest( + client, + request, + new Error("Upgrade not supported for H2"), + ); + return false; + } + + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (headers[key]) { + headers[key] += `,${val[i]}`; + } else { + headers[key] = val[i]; + } + } + } else { + headers[key] = val; + } + } + + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream; + + const { hostname, port } = client[kUrl]; + + headers[HTTP2_HEADER_AUTHORITY] = + host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + + const abort = (err) => { + if (request.aborted || request.completed) { + return; + } + + err = err || new RequestAbortedError(); + + util.errorRequest(client, request, err); + + if (stream != null) { + util.destroy(stream, err); + } + + // We do not destroy the socket as we can continue using the session + // the stream get's destroyed and the session remains to create new streams + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + + try { + // We are already connected, streams are pending. + // We can call on connect, and wait for abort + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + + if (request.aborted) { + return false; + } + + if (method === "CONNECT") { + session.ref(); + // We are already connected, streams are pending, first request + // will create a new stream. We trigger a request to create the stream and wait until + // `ready` event is triggered + // We disabled endStream to allow the user to write to the stream + stream = session.request(headers, { endStream: false, signal }); + + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else { + stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + } + + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + + return true; + } + + // https://tools.ietf.org/html/rfc7540#section-8.3 + // :path and :scheme headers must be omitted when sending CONNECT + + headers[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 (util.isFormDataLike(body)) { + extractBody ??= __nccwpck_require__(4492).extractBody; + + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + + body = bodyStream.stream; + contentLength = bodyStream.length; + } + + if (contentLength == null) { + contentLength = request.contentLength; + } + + if (contentLength === 0 || !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null; + } + + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if ( + shouldSendContentLength(method) && + contentLength > 0 && + request.contentLength != null && + request.contentLength !== contentLength + ) { + if (client[kStrictContentLength]) { + util.errorRequest( + client, + request, + new RequestContentLengthMismatchError(), + ); + return false; + } + + 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" || body === null; + 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 streams open + ++session[kOpenStreams]; + + stream.once("response", (headers) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + + // Due to the stream nature, it is possible we face a race condition + // where the stream has been assigned, but the request has been aborted + // the request remains in-flight and headers hasn't been received yet + // for those scenarios, best effort is to destroy the stream immediately + // as there's no value to keep it open. + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + + if ( + request.onHeaders( + Number(statusCode), + parseH2Headers(realHeaders), + stream.resume.bind(stream), + "", + ) === false + ) { + stream.pause(); + } + + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) { + stream.pause(); + } + }); + }); + + stream.once("end", () => { + // When state is null, it means we haven't consumed body and the stream still do not have + // a state. + // Present specially when using pipeline or stream + if (stream.state?.state == null || stream.state.state < 6) { + request.onComplete([]); + } + + if (session[kOpenStreams] === 0) { + // Stream is closed or half-closed-remote (6), decrement counter and cleanup + // It does not have sense to continue working with the stream as we do not + // have yet RST_STREAM support on client-side + + session.unref(); + } + + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) { + session.unref(); + } + }); + + stream.once("error", function (err) { + abort(err); + }); + + stream.once("frameError", (type, code) => { + abort( + new InformationalError( + `HTTP/2: "frameError" received - type ${type}, code ${code}`, + ), + ); + }); + + // stream.on('aborted', () => { + // // TODO(HTTP/2): Support aborted + // }) + + // stream.on('timeout', () => { + // // TODO(HTTP/2): Support timeout + // }) + + // stream.on('push', headers => { + // // TODO(HTTP/2): Support push + // }) + + // stream.on('trailers', headers => { + // // TODO(HTTP/2): Support trailers + // }) + + return true; + + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body || contentLength === 0) { + writeBuffer( + abort, + stream, + null, + client, + request, + client[kSocket], + contentLength, + expectsPayload, + ); + } else if (util.isBuffer(body)) { + writeBuffer( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload, + ); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable( + abort, + stream, + body.stream(), + client, + request, + client[kSocket], + contentLength, + expectsPayload, + ); + } else { + writeBlob( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload, + ); + } + } else if (util.isStream(body)) { + writeStream( + abort, + client[kSocket], + expectsPayload, + stream, + body, + client, + request, + contentLength, + ); + } else if (util.isIterable(body)) { + writeIterable( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload, + ); + } else { + assert(false); + } + } + } + + function writeBuffer( + abort, + h2stream, + body, + client, + request, + socket, + contentLength, + expectsPayload, + ) { + try { + if (body != null && util.isBuffer(body)) { + assert( + contentLength === body.byteLength, + "buffer body must have content length", + ); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + + request.onBodySent(body); + } + + if (!expectsPayload) { + socket[kReset] = true; + } + + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + + function writeStream( + abort, + socket, + expectsPayload, + h2stream, + body, + client, + request, + contentLength, + ) { + assert( + contentLength !== 0 || client[kRunning] === 0, + "stream body cannot be pipelined", + ); + + // For HTTP/2, is enough to pipe the stream + const pipe = pipeline(body, h2stream, (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + + if (!expectsPayload) { + socket[kReset] = true; + } + + client[kResume](); + } + }); + + util.addListener(pipe, "data", onPipeData); + + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + + async function writeBlob( + abort, + h2stream, + body, + client, + request, + socket, + contentLength, + expectsPayload, + ) { + assert( + contentLength === body.size, + "blob body must have content length", + ); + + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + + const buffer = Buffer.from(await body.arrayBuffer()); + + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + + request.onBodySent(buffer); + request.onRequestSent(); + + if (!expectsPayload) { + socket[kReset] = true; + } + + client[kResume](); + } catch (err) { + abort(err); + } + } + + async function writeIterable( + abort, + h2stream, + body, + client, + request, + socket, + contentLength, + 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; + } + }); + + 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]; + } + + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) { + await waitForDrain(); + } + } + + h2stream.end(); + + request.onRequestSent(); + + if (!expectsPayload) { + socket[kReset] = true; + } + + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + + module.exports = connectH2; + + /***/ + }, + + /***/ 3701: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + // @ts-check + + const assert = __nccwpck_require__(4589); + const net = __nccwpck_require__(7030); + const http = __nccwpck_require__(7067); + const util = __nccwpck_require__(3440); + const { channels } = __nccwpck_require__(2414); + const Request = __nccwpck_require__(4655); + const DispatcherBase = __nccwpck_require__(1841); + const { InvalidArgumentError, InformationalError, ClientDestroyedError } = + __nccwpck_require__(8707); + const buildConnector = __nccwpck_require__(9136); + const { + kUrl, + kServerName, + kClient, + kBusy, + kConnect, + kResuming, + kRunning, + kPending, + kSize, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kOnError, + kHTTPContext, + kMaxConcurrentStreams, + kResume, + } = __nccwpck_require__(6443); + const connectH1 = __nccwpck_require__(637); + const connectH2 = __nccwpck_require__(8788); + let deprecatedInterceptorWarned = false; + + const kClosedResolve = Symbol("kClosedResolve"); + + const noop = () => {}; + + function getPipelining(client) { + return ( + client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 + ); + } + + /** + * @type {import('../../types/client.js').default} + */ + class Client extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').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 + maxConcurrentStreams, + allowH2, + webSocket, + } = {}, + ) { + super({ webSocket }); + + 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 positive integer, greater than 0", + ); + } + + if (typeof connect !== "function") { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(autoSelectFamily + ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } + : undefined), + ...connect, + }); + } + + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning( + "Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", + { + code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED", + }, + ); + } + } else { + this[kInterceptors] = [ + createRedirectInterceptor({ maxRedirections }), + ]; + } + + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect; + 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 ? 2e3 : 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[kMaxConcurrentStreams] = + maxConcurrentStreams != null ? maxConcurrentStreams : 100; // Max peerConcurrentStreams for a Node h2 server + this[kHTTPContext] = null; + + // kQueue is built up of 3 sections separated by + // the kRunningIdx and kPendingIdx indices. + // | complete | running | pending | + // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length + // kRunningIdx points to the first running element. + // kPendingIdx points to the first pending element. + // This implements a fast queue with an amortized + // time of O(1). + + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + + get pipelining() { + return this[kPipelining]; + } + + set pipelining(value) { + this[kPipelining] = value; + this[kResume](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[kHTTPContext] && + !this[kConnecting] && + !this[kHTTPContext].destroyed + ); + } + + get [kBusy]() { + return Boolean( + this[kHTTPContext]?.busy(null) || + this[kSize] >= (getPipelining(this) || 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 = new Request(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; + queueMicrotask(() => resume(this)); + } else { + this[kResume](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]) { + this[kClosedResolve] = resolve; + } else { + resolve(null); + } + }); + } + + 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]; + util.errorRequest(this, request, err); + } + + const callback = () => { + if (this[kClosedResolve]) { + // TODO (fix): Should we error here with ClientDestroyedError? + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else { + queueMicrotask(callback); + } + + this[kResume](); + }); + } + } + + const createRedirectInterceptor = __nccwpck_require__(5092); + + 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. + + assert(client[kPendingIdx] === client[kRunningIdx]); + + const requests = client[kQueue].splice(client[kRunningIdx]); + + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert(client[kSize] === 0); + } + } + + /** + * @param {Client} client + * @returns + */ + async function connect(client) { + assert(!client[kConnecting]); + assert(!client[kHTTPContext]); + + 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; + } + + client[kConnecting] = true; + + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress], + }, + connector: client[kConnector], + }); + } + + 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); + } + }, + ); + }); + + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + + assert(socket); + + try { + client[kHTTPContext] = + socket.alpnProtocol === "h2" + ? await connectH2(client, socket) + : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + + client[kConnecting] = false; + + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + 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, + protocol, + port, + version: client[kHTTPContext]?.version, + 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 request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else { + onError(client, err); + } + + client.emit("connectionError", client[kUrl], [client], err); + } + + client[kResume](); + } + + 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; + } + + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + + if (client[kHTTPContext]) { + client[kHTTPContext].resume(); + } + + if (client[kBusy]) { + client[kNeedDrain] = 2; + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else { + emitDrain(client); + } + continue; + } + + if (client[kPending] === 0) { + return; + } + + if (client[kRunning] >= (getPipelining(client) || 1)) { + return; + } + + const request = client[kQueue][client[kPendingIdx]]; + + if ( + client[kUrl].protocol === "https:" && + client[kServerName] !== request.servername + ) { + if (client[kRunning] > 0) { + return; + } + + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy( + new InformationalError("servername changed"), + () => { + client[kHTTPContext] = null; + resume(client); + }, + ); + } + + if (client[kConnecting]) { + return; + } + + if (!client[kHTTPContext]) { + connect(client); + return; + } + + if (client[kHTTPContext].destroyed) { + return; + } + + if (client[kHTTPContext].busy(request)) { + return; + } + + if (!request.aborted && client[kHTTPContext].write(request)) { + client[kPendingIdx]++; + } else { + client[kQueue].splice(client[kPendingIdx], 1); + } + } + } + + module.exports = Client; + + /***/ + }, + + /***/ 1841: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const Dispatcher = __nccwpck_require__(883); + const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = + __nccwpck_require__(8707); + const { + kDestroy, + kClose, + kClosed, + kDestroyed, + kDispatch, + kInterceptors, + } = __nccwpck_require__(6443); + + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + const kWebSocketOptions = Symbol("webSocketOptions"); + + class DispatcherBase extends Dispatcher { + constructor(opts) { + super(); + + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + + get webSocketOptions() { + return { + maxFragments: this[kWebSocketOptions].maxFragments ?? 131072, + maxPayloadSize: + this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024, + }; + } + + 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 === undefined) { + return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(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); + } + }; + + // Should not error. + this[kClose]() + .then(() => this.destroy()) + .then(() => { + queueMicrotask(onClosed); + }); + } + + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err + ? /* istanbul ignore next: should never error */ reject(err) + : resolve(data); + }); + }); + } + + if (typeof callback !== "function") { + throw new 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); + } + }; + + // 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); + } + + 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, handler); + } + + dispatch(opts, handler) { + if (!handler || typeof handler !== "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, handler); + } catch (err) { + if (typeof handler.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); + } + + handler.onError(err); + + return false; + } + } + } + + module.exports = DispatcherBase; + + /***/ + }, + + /***/ 883: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const EventEmitter = __nccwpck_require__(8474); + + class Dispatcher extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + + close() { + throw new Error("not implemented"); + } + + destroy() { + throw new Error("not implemented"); + } + + compose(...args) { + // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + + for (const interceptor of interceptors) { + if (interceptor == null) { + continue; + } + + if (typeof interceptor !== "function") { + throw new TypeError( + `invalid interceptor, expected function received ${typeof interceptor}`, + ); + } + + dispatch = interceptor(dispatch); + + if ( + dispatch == null || + typeof dispatch !== "function" || + dispatch.length !== 2 + ) { + throw new TypeError("invalid interceptor"); + } + } + + return new ComposedDispatcher(this, dispatch); + } + } + + class ComposedDispatcher extends Dispatcher { + #dispatcher = null; + #dispatch = null; + + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + + dispatch(...args) { + this.#dispatch(...args); + } + + close(...args) { + return this.#dispatcher.close(...args); + } + + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + } + + module.exports = Dispatcher; + + /***/ + }, + + /***/ 3137: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const DispatcherBase = __nccwpck_require__(1841); + const { + kClose, + kDestroy, + kClosed, + kDestroyed, + kDispatch, + kNoProxyAgent, + kHttpProxyAgent, + kHttpsProxyAgent, + } = __nccwpck_require__(6443); + const ProxyAgent = __nccwpck_require__(6672); + const Agent = __nccwpck_require__(7405); + + const DEFAULT_PORTS = { + "http:": 80, + "https:": 443, + }; + + let experimentalWarned = false; + + class EnvHttpProxyAgent extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + + constructor(opts = {}) { + super(); + this.#opts = opts; + + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning( + "EnvHttpProxyAgent is experimental, expect them to change at any time.", + { + code: "UNDICI-EHPA", + }, + ); + } + + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + + this[kNoProxyAgent] = new Agent(agentOpts); + + const HTTP_PROXY = + httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) { + this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY, + }); + } else { + this[kHttpProxyAgent] = this[kNoProxyAgent]; + } + + const HTTPS_PROXY = + httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) { + this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY, + }); + } else { + this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + } + + this.#parseNoProxy(); + } + + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + const agent = this.#getProxyAgentForUrl(url); + return agent.dispatch(opts, handler); + } + + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) { + await this[kHttpProxyAgent].close(); + } + if (!this[kHttpsProxyAgent][kClosed]) { + await this[kHttpsProxyAgent].close(); + } + } + + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) { + await this[kHttpProxyAgent].destroy(err); + } + if (!this[kHttpsProxyAgent][kDestroyed]) { + await this[kHttpsProxyAgent].destroy(err); + } + } + + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) { + return this[kNoProxyAgent]; + } + if (protocol === "https:") { + return this[kHttpsProxyAgent]; + } + return this[kHttpProxyAgent]; + } + + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) { + this.#parseNoProxy(); + } + + if (this.#noProxyEntries.length === 0) { + return true; // Always proxy if NO_PROXY is not set or empty. + } + if (this.#noProxyValue === "*") { + return false; // Never proxy if wildcard is set. + } + + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) { + continue; // Skip if ports don't match. + } + if (!/^[.*]/.test(entry.hostname)) { + // No wildcards, so don't proxy only if there is not an exact match. + if (hostname === entry.hostname) { + return false; + } + } else { + // Don't proxy if the hostname ends with the no_proxy host. + if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) { + return false; + } + } + } + + return true; + } + + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) { + continue; + } + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0, + }); + } + + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + + get #noProxyChanged() { + if (this.#opts.noProxy !== undefined) { + return false; + } + return this.#noProxyValue !== this.#noProxyEnv; + } + + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + } + + module.exports = EnvHttpProxyAgent; + + /***/ + }, + + /***/ 4660: /***/ (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(); + } + + isEmpty() { + return this.head.isEmpty(); + } + + push(data) { + if (this.head.isFull()) { + // Head is full: Creates a new queue, sets the old queue's `.next` to it, + // and sets it as the new main queue. + this.head = this.head.next = new FixedCircularBuffer(); + } + this.head.push(data); + } + + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + // If there is another queue, it forms the new tail. + this.tail = tail.next; + } + return next; + } + }; + + /***/ + }, + + /***/ 2128: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const DispatcherBase = __nccwpck_require__(1841); + const FixedQueue = __nccwpck_require__(4660); + const { + kConnected, + kSize, + kRunning, + kPending, + kQueued, + kBusy, + kFree, + kUrl, + kClose, + kDestroy, + kDispatch, + } = __nccwpck_require__(6443); + const PoolStats = __nccwpck_require__(3246); + + 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(opts) { + super(opts); + + 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[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + + 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()) { + await Promise.all(this[kClients].map((c) => c.close())); + } else { + await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + } + + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) { + break; + } + item.handler.onError(err); + } + + await 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](); + } + + 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]) { + queueMicrotask(() => { + 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, + ); + } + } + + module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher, + }; + + /***/ + }, + + /***/ 3246: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = + __nccwpck_require__(6443); + 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; + + /***/ + }, + + /***/ 628: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = + __nccwpck_require__(2128); + const Client = __nccwpck_require__(3701); + const { InvalidArgumentError } = __nccwpck_require__(8707); + const util = __nccwpck_require__(3440); + const { kUrl, kInterceptors } = __nccwpck_require__(6443); + const buildConnector = __nccwpck_require__(9136); + + 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 + } = {}, + ) { + 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 ( + connect != null && + typeof connect !== "function" && + typeof connect !== "object" + ) { + throw new InvalidArgumentError( + "connect must be a function or an object", + ); + } + + if (typeof connect !== "function") { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(autoSelectFamily + ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } + : undefined), + ...connect, + }); + } + + super(options); + + this[kInterceptors] = + 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; + + this.on("connectionError", (origin, targets, error) => { + // If a connection error occurs, we remove the client from the pool, + // and emit a connectionError event. They will not be re-used. + // Fixes https://github.com/nodejs/undici/issues/3895 + for (const target of targets) { + // Do not use kRemoveClient here, as it will close the client, + // but the client cannot be closed in this state. + const idx = this[kClients].indexOf(target); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } + } + }); + } + + [kGetDispatcher]() { + for (const client of this[kClients]) { + if (!client[kNeedDrain]) { + return client; + } + } + + if ( + !this[kConnections] || + this[kClients].length < this[kConnections] + ) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + } + + module.exports = Pool; + + /***/ + }, + + /***/ 6672: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = + __nccwpck_require__(6443); + const { URL } = __nccwpck_require__(3136); + const Agent = __nccwpck_require__(7405); + const Pool = __nccwpck_require__(628); + const DispatcherBase = __nccwpck_require__(1841); + const { + InvalidArgumentError, + RequestAbortedError, + SecureProxyConnectionError, + } = __nccwpck_require__(8707); + const buildConnector = __nccwpck_require__(9136); + const Client = __nccwpck_require__(3701); + + 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"); + const kTunnelProxy = Symbol("tunnel proxy"); + + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + + const noop = () => {}; + + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) { + return new Client(origin, opts); + } + return new Pool(origin, opts); + } + + class Http1ProxyWrapper extends DispatcherBase { + #client; + + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) { + throw new InvalidArgumentError("Proxy URL is mandatory"); + } + + this[kProxyHeaders] = headers; + if (factory) { + this.#client = factory(proxyUrl, { connect }); + } else { + this.#client = new Client(proxyUrl, { connect }); + } + } + + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function (statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") { + handler.onError( + new InvalidArgumentError( + "Proxy Authentication Required (407)", + ), + ); + } + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + + // Rewrite request as an HTTP1 Proxy request, without tunneling. + const { origin, path = "/", headers = {} } = opts; + + opts.path = origin + path; + + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL(origin); + headers.host = host; + } + opts.headers = { ...this[kProxyHeaders], ...headers }; + + return this.#client[kDispatch](opts, handler); + } + + async [kClose]() { + return this.#client.close(); + } + + async [kDestroy](err) { + return this.#client.destroy(err); + } + } + + class ProxyAgent extends DispatcherBase { + constructor(opts) { + super(); + + if ( + !opts || + (typeof opts === "object" && !(opts instanceof URL) && !opts.uri) + ) { + throw new InvalidArgumentError("Proxy uri is mandatory"); + } + + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") { + throw new InvalidArgumentError( + "Proxy opts.clientFactory must be a function.", + ); + } + + const { proxyTunnel = true } = opts; + + const url = this.#getUrl(opts); + const { + href, + origin, + port, + protocol, + username, + password, + hostname: proxyHostname, + } = url; + + this[kProxy] = { uri: href, protocol }; + this[kInterceptors] = + opts.interceptors?.ProxyAgent && + Array.isArray(opts.interceptors.ProxyAgent) + ? opts.interceptors.ProxyAgent + : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + + 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")}`; + } + + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin, options) => { + const { protocol } = new URL(origin); + if ( + !this[kTunnelProxy] && + protocol === "http:" && + this[kProxy].protocol === "http:" + ) { + return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory, + }); + } + return agentFactory(origin, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts, callback) => { + let requestedPath = opts.host; + if (!opts.port) { + requestedPath += `:${defaultProtocolPort(opts.protocol)}`; + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host: opts.host, + }, + servername: this[kProxyTls]?.servername || proxyHostname, + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback( + new RequestAbortedError( + `Proxy response (${statusCode}) !== 200 when HTTP Tunneling`, + ), + ); + } + if (opts.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) { + servername = this[kRequestTls].servername; + } else { + servername = opts.servername; + } + this[kConnectEndpoint]( + { ...opts, servername, httpSocket: socket }, + callback, + ); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + // Throw a custom error to avoid loop in client.js#connect + callback(new SecureProxyConnectionError(err)); + } else { + callback(err); + } + } + }, + }); + } + + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL(opts.origin); + headers.host = host; + } + + return this[kAgent].dispatch( + { + ...opts, + headers, + }, + handler, + ); + } + + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") { + return new URL(opts); + } else if (opts instanceof URL) { + return opts; + } else { + return new URL(opts.uri); + } + } + + 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]; + } + + 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", + ); + } + } + + module.exports = ProxyAgent; + + /***/ + }, + + /***/ 50: /***/ (module, __unused_webpack_exports, __nccwpck_require__) => { + "use strict"; + + const Dispatcher = __nccwpck_require__(883); + const RetryHandler = __nccwpck_require__(7816); + + class RetryAgent extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + + dispatch(opts, handler) { + const retry = new RetryHandler( + { + ...opts, + retryOptions: this.#options, + }, + { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler, + }, + ); + return this.#agent.dispatch(opts, retry); + } + + close() { + return this.#agent.close(); + } + + destroy() { + return this.#agent.destroy(); + } + } + + module.exports = RetryAgent; + + /***/ + }, + + /***/ 2581: /***/ ( + 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__(8707); + const Agent = __nccwpck_require__(7405); + + 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, + }; + + /***/ + }, + + /***/ 8155: /***/ (module) => { + "use strict"; + + module.exports = class DecoratorHandler { + #handler; + + constructor(handler) { + if (typeof handler !== "object" || handler === null) { + throw new TypeError("handler must be an object"); + } + this.#handler = handler; + } + + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + + onError(...args) { + return this.#handler.onError?.(...args); + } + + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + + onData(...args) { + return this.#handler.onData?.(...args); + } + + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); + } + }; + + /***/ + }, + + /***/ 8754: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const util = __nccwpck_require__(3440); + const { kBodyUsed } = __nccwpck_require__(6443); + const assert = __nccwpck_require__(4589); + const { InvalidArgumentError } = __nccwpck_require__(8707); + const EE = __nccwpck_require__(8474); + + const redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; + + const kBody = Symbol("body"); + + class BodyAsyncIterable { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + } + + class RedirectHandler { + constructor(dispatch, maxRedirections, opts, handler) { + if ( + maxRedirections != null && + (!Number.isInteger(maxRedirections) || maxRedirections < 0) + ) { + throw new InvalidArgumentError( + "maxRedirections must be a positive number", + ); + } + + 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 = []; + this.redirectionLimitReached = false; + + 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); + }); + } + + 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" + ) { + // 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); + } + } + + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + + onError(error) { + this.handler.onError(error); + } + + onHeaders(statusCode, headers, resume, statusText) { + this.location = + this.history.length >= this.maxRedirections || + util.isDisturbed(this.opts.body) + ? null + : parseLocation(statusCode, headers); + + if ( + this.opts.throwOnMaxRedirect && + this.history.length >= this.maxRedirections + ) { + if (this.request) { + this.request.abort(new Error("max redirects")); + } + + this.redirectionLimitReached = true; + this.abort(new Error("max redirects")); + return; + } + + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)); + } + + if (!this.location) { + return this.handler.onHeaders( + statusCode, + headers, + resume, + statusText, + ); + } + + const { origin, 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; + } + } + + 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 explicitly 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); + } + } + + onComplete(trailers) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 + + TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections + and neither are useful if present. + + See comment on onData method above for more detailed information. + */ + + this.location = null; + this.abort = null; + + this.dispatch(this.opts, this); + } else { + this.handler.onComplete(trailers); + } + } + + onBodySent(chunk) { + if (this.handler.onBodySent) { + this.handler.onBodySent(chunk); + } + } + } + + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) { + return null; + } + + for (let i = 0; i < headers.length; i += 2) { + if ( + headers[i].length === 8 && + util.headerNameToString(headers[i]) === "location" + ) { + return headers[i + 1]; + } + } + } + + // 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]); + } + } + } 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"); + } + return ret; + } + + module.exports = RedirectHandler; + + /***/ + }, + + /***/ 7816: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const assert = __nccwpck_require__(4589); + + const { kRetryHandlerDefaultRetry } = __nccwpck_require__(6443); + const { RequestRetryError } = __nccwpck_require__(8707); + const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = + __nccwpck_require__(3440); + + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + + 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, body: wrapRequestBody(opts.body) }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1000, // 30s, + minTimeout: 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", + "UND_ERR_SOCKET", + ], + }; + + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + + // Handle possible onConnect duplication + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) { + this.abort(reason); + } else { + this.reason = reason; + } + }); + } + + onRequestSent() { + if (this.handler.onRequestSent) { + this.handler.onRequestSent(); + } + } + + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket); + } + } + + 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, + minTimeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods, + } = retryOptions; + const { counter } = state; + + // Any code that is not a Undici's originated and allowed to retry + if ( + code && + code !== "UND_ERR_REQ_RETRY" && + !errorCodes.includes(code) + ) { + cb(err); + return; + } + + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + + // If a set of status code are provided and the current status code is not in the list + if ( + statusCode != null && + Array.isArray(statusCodes) && + !statusCodes.includes(statusCode) + ) { + cb(err); + return; + } + + // If we reached the max number of retries + if (counter > maxRetries) { + cb(err); + return; + } + + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) + ? calculateRetryAfterHeader(retryAfterHeader) + : retryAfterHeader * 1e3; // Retry-After is in seconds + } + + const retryTimeout = + retryAfterHeader > 0 + ? Math.min(retryAfterHeader, maxTimeout) + : Math.min( + minTimeout * timeoutFactor ** (counter - 1), + maxTimeout, + ); + + setTimeout(() => cb(null), retryTimeout); + } + + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + + this.retryCount += 1; + + if (statusCode >= 300) { + if (this.retryOpts.statusCodes.includes(statusCode) === false) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage, + ); + } else { + this.abort( + new RequestRetryError("Request failed", statusCode, { + headers, + data: { + count: this.retryCount, + }, + }), + ); + return false; + } + } + + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null; + + // Only Partial Content 206 supposed to provide Content-Range, + // any other status code that partially consumed the payload + // should not be retry because it would result in downstream + // wrongly concatanete multiple responses. + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort( + new RequestRetryError( + "server does not support the range header and the payload was partially consumed", + statusCode, + { + headers, + data: { count: this.retryCount }, + }, + ), + ); + return false; + } + + const contentRange = parseRangeHeader(headers["content-range"]); + // If no content range + if (!contentRange) { + this.abort( + new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount }, + }), + ); + return false; + } + + // Let's start with a weak etag check + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount }, + }), + ); + return false; + } + + const { start, size, end = size - 1 } = contentRange; + + assert(this.start === start, "content-range mismatch"); + assert( + this.end == null || this.end === end, + "content-range mismatch", + ); + + this.resume = resume; + return true; + } + + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = parseRangeHeader(headers["content-range"]); + + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage, + ); + } + + const { start, size, end = size - 1 } = range; + assert( + start != null && Number.isFinite(start), + "content-range mismatch", + ); + assert( + end != null && Number.isFinite(end), + "invalid content-length", + ); + + this.start = start; + this.end = end; + } + + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = + contentLength != null ? Number(contentLength) - 1 : null; + } + + 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; + + // Weak etags are not useful for comparison nor cache + // for instance not safe to assume if the response is byte-per-byte + // equal + if (this.etag != null && this.etag.startsWith("W/")) { + this.etag = null; + } + + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage, + ); + } + + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { 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); + } + + // We reconcile in case of a mix between network errors + // and server error response + if (this.retryCount - this.retryCountCheckpoint > 0) { + // We count the difference between the last checkpoint and the current retry count + this.retryCount = + this.retryCountCheckpoint + + (this.retryCount - this.retryCountCheckpoint); + } else { + this.retryCount += 1; + } + + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount }, + opts: { retryOptions: this.retryOpts, ...this.opts }, + }, + onRetry.bind(this), + ); + + function onRetry(err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err); + } + + if (this.start !== 0) { + const headers = { + range: `bytes=${this.start}-${this.end ?? ""}`, + }; + + // Weak etag check - weak etags will make comparison algorithms never match + if (this.etag != null) { + headers["if-match"] = this.etag; + } + + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers, + }, + }; + } + + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } + } + } + + module.exports = RetryHandler; + + /***/ + }, + + /***/ 379: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { isIP } = __nccwpck_require__(7030); + const { lookup } = __nccwpck_require__(610); + const DecoratorHandler = __nccwpck_require__(8155); + const { InvalidArgumentError, InformationalError } = + __nccwpck_require__(8707); + const maxInt = Math.pow(2, 31) - 1; + + class DNSInstance { + #maxTTL = 0; + #maxItems = 0; + #records = new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + + get full() { + return this.#records.size === this.#maxItems; + } + + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + + // If full, we just return the origin + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems, + }; + + // If no IPs we lookup + if (ips == null) { + this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + + const ip = this.pick(origin, records, newOpts.affinity); + + let port; + if (typeof ip.port === "number") { + port = `:${ip.port}`; + } else if (origin.port !== "") { + port = `:${origin.port}`; + } else { + port = ""; + } + + cb( + null, + `${origin.protocol}//${ + ip.family === 6 ? `[${ip.address}]` : ip.address + }${port}`, + ); + }); + } else { + // If there's IPs we pick + const ip = this.pick(origin, ips, newOpts.affinity); + + // If no IPs we lookup - deleting old records + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + + let port; + if (typeof ip.port === "number") { + port = `:${ip.port}`; + } else if (origin.port !== "") { + port = `:${origin.port}`; + } else { + port = ""; + } + + cb( + null, + `${origin.protocol}//${ + ip.family === 6 ? `[${ip.address}]` : ip.address + }${port}`, + ); + } + } + + #defaultLookup(origin, opts, cb) { + lookup( + origin.hostname, + { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first", + }, + (err, addresses) => { + if (err) { + return cb(err); + } + + const results = new Map(); + + for (const addr of addresses) { + // On linux we found duplicates, we attempt to remove them with + // the latest record + results.set(`${addr.address}:${addr.family}`, addr); + } + + cb(null, results.values()); + }, + ); + } + + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + + let family; + if (this.dualStack) { + if (affinity == null) { + // Balance between ip families + if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + } + + if (records[affinity] != null && records[affinity].ips.length > 0) { + family = records[affinity]; + } else { + family = records[affinity === 4 ? 6 : 4]; + } + } else { + family = records[affinity]; + } + + // If no IPs we return null + if (family == null || family.ips.length === 0) { + return ip; + } + + if (family.offset == null || family.offset === maxInt) { + family.offset = 0; + } else { + family.offset++; + } + + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + + if (ip == null) { + return ip; + } + + if (Date.now() - ip.timestamp > ip.ttl) { + // record TTL is already in ms + // We delete expired records + // It is possible that they have different TTL, so we manage them individually + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + + return ip; + } + + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { 4: null, 6: null } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") { + // The record TTL is expected to be in ms + record.ttl = Math.min(record.ttl, this.#maxTTL); + } else { + record.ttl = this.#maxTTL; + } + + const familyRecords = records.records[record.family] ?? { ips: [] }; + + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + + this.#records.set(origin.hostname, records); + } + + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + } + + class DNSDispatchHandler extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + + constructor(state, { origin, handler, dispatch }, opts) { + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + + onError(err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": { + if (this.#state.dualStack) { + // We delete the record and retry + this.#state.runLookup( + this.#origin, + this.#opts, + (err, newOrigin) => { + if (err) { + return this.#handler.onError(err); + } + + const dispatchOpts = { + ...this.#opts, + origin: newOrigin, + }; + + this.#dispatch(dispatchOpts, this); + }, + ); + + // if dual-stack disabled, we error out + return; + } + + this.#handler.onError(err); + return; + } + case "ENOTFOUND": + this.#state.deleteRecord(this.#origin); + // eslint-disable-next-line no-fallthrough + default: + this.#handler.onError(err); + break; + } + } + } + + module.exports = (interceptorOpts) => { + if ( + interceptorOpts?.maxTTL != null && + (typeof interceptorOpts?.maxTTL !== "number" || + interceptorOpts?.maxTTL < 0) + ) { + throw new InvalidArgumentError( + "Invalid maxTTL. Must be a positive number", + ); + } + + if ( + interceptorOpts?.maxItems != null && + (typeof interceptorOpts?.maxItems !== "number" || + interceptorOpts?.maxItems < 1) + ) { + throw new InvalidArgumentError( + "Invalid maxItems. Must be a positive number and greater than zero", + ); + } + + if ( + interceptorOpts?.affinity != null && + interceptorOpts?.affinity !== 4 && + interceptorOpts?.affinity !== 6 + ) { + throw new InvalidArgumentError( + "Invalid affinity. Must be either 4 or 6", + ); + } + + if ( + interceptorOpts?.dualStack != null && + typeof interceptorOpts?.dualStack !== "boolean" + ) { + throw new InvalidArgumentError( + "Invalid dualStack. Must be a boolean", + ); + } + + if ( + interceptorOpts?.lookup != null && + typeof interceptorOpts?.lookup !== "function" + ) { + throw new InvalidArgumentError("Invalid lookup. Must be a function"); + } + + if ( + interceptorOpts?.pick != null && + typeof interceptorOpts?.pick !== "function" + ) { + throw new InvalidArgumentError("Invalid pick. Must be a function"); + } + + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) { + affinity = interceptorOpts?.affinity ?? null; + } else { + affinity = interceptorOpts?.affinity ?? 4; + } + + const opts = { + maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity, + }; + + const instance = new DNSInstance(opts); + + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = + origDispatchOpts.origin.constructor === URL + ? origDispatchOpts.origin + : new URL(origDispatchOpts.origin); + + if (isIP(origin.hostname) !== 0) { + return dispatch(origDispatchOpts, handler); + } + + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) { + return handler.onError(err); + } + + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, // For SNI on TLS + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers, + }, + }; + + dispatch( + dispatchOpts, + instance.getHandler( + { origin, dispatch, handler }, + origDispatchOpts, + ), + ); + }); + + return true; + }; + }; + }; + + /***/ + }, + + /***/ 8060: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const util = __nccwpck_require__(3440); + const { InvalidArgumentError, RequestAbortedError } = + __nccwpck_require__(8707); + const DecoratorHandler = __nccwpck_require__(8155); + + class DumpHandler extends DecoratorHandler { + #maxSize = 1024 * 1024; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + + constructor({ maxSize }, handler) { + super(handler); + + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { + throw new InvalidArgumentError( + "maxSize must be a number greater than 0", + ); + } + + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; + } + + onConnect(abort) { + this.#abort = abort; + + this.#handler.onConnect(this.#customAbort.bind(this)); + } + + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; + } + + // TODO: will require adjustment after new hooks are out + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = util.parseHeaders(rawHeaders); + const contentLength = headers["content-length"]; + + if (contentLength != null && contentLength > this.#maxSize) { + throw new RequestAbortedError( + `Response size (${contentLength}) larger than maxSize (${ + this.#maxSize + })`, + ); + } + + if (this.#aborted) { + return true; + } + + return this.#handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage, + ); + } + + onError(err) { + if (this.#dumped) { + return; + } + + err = this.#reason ?? err; + + this.#handler.onError(err); + } + + onData(chunk) { + this.#size = this.#size + chunk.length; + + if (this.#size >= this.#maxSize) { + this.#dumped = true; + + if (this.#aborted) { + this.#handler.onError(this.#reason); + } else { + this.#handler.onComplete([]); + } + } + + return true; + } + + onComplete(trailers) { + if (this.#dumped) { + return; + } + + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + + this.#handler.onComplete(trailers); + } + } + + function createDumpInterceptor( + { maxSize: defaultMaxSize } = { + maxSize: 1024 * 1024, + }, + ) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + + const dumpHandler = new DumpHandler( + { maxSize: dumpMaxSize }, + handler, + ); + + return dispatch(opts, dumpHandler); + }; + }; + } + + module.exports = createDumpInterceptor; + + /***/ + }, + + /***/ 5092: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const RedirectHandler = __nccwpck_require__(8754); + + 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; + + /***/ + }, + + /***/ 1514: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const RedirectHandler = __nccwpck_require__(8754); + + module.exports = (opts) => { + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch) => { + return function redirectInterceptor(opts, handler) { + const { maxRedirections = globalMaxRedirections, ...baseOpts } = + opts; + + if (!maxRedirections) { + return dispatch(opts, handler); + } + + const redirectHandler = new RedirectHandler( + dispatch, + maxRedirections, + opts, + handler, + ); + + return dispatch(baseOpts, redirectHandler); + }; + }; + }; + + /***/ + }, + + /***/ 2026: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const RetryHandler = __nccwpck_require__(7816); + + module.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch( + opts, + new RetryHandler( + { + ...opts, + retryOptions: { ...globalOpts, ...opts.retryOptions }, + }, + { + handler, + dispatch, + }, + ), + ); + }; + }; + }; + + /***/ + }, + + /***/ 2824: /***/ ( + __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__(172); + // 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 + + /***/ + }, + + /***/ 3870: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { Buffer } = __nccwpck_require__(4573); + + module.exports = Buffer.from( + "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK07MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtXACAAQRhqQgA3AwAgAEIANwMAIABBOGpCADcDACAAQTBqQgA3AwAgAEEoakIANwMAIABBIGpCADcDACAAQRBqQgA3AwAgAEEIakIANwMAIABB3QE2AhwLBgAgABAyC5otAQt/IwBBEGsiCiQAQaTQACgCACIJRQRAQeTTACgCACIFRQRAQfDTAEJ/NwIAQejTAEKAgISAgIDAADcCAEHk0wAgCkEIakFwcUHYqtWqBXMiBTYCAEH40wBBADYCAEHI0wBBADYCAAtBzNMAQYDUBDYCAEGc0ABBgNQENgIAQbDQACAFNgIAQazQAEF/NgIAQdDTAEGArAM2AgADQCABQcjQAGogAUG80ABqIgI2AgAgAiABQbTQAGoiAzYCACABQcDQAGogAzYCACABQdDQAGogAUHE0ABqIgM2AgAgAyACNgIAIAFB2NAAaiABQczQAGoiAjYCACACIAM2AgAgAUHU0ABqIAI2AgAgAUEgaiIBQYACRw0AC0GM1ARBwasDNgIAQajQAEH00wAoAgA2AgBBmNAAQcCrAzYCAEGk0ABBiNQENgIAQcz/B0E4NgIAQYjUBCEJCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFNBEBBjNAAKAIAIgZBECAAQRNqQXBxIABBC0kbIgRBA3YiAHYiAUEDcQRAAkAgAUEBcSAAckEBcyICQQN0IgBBtNAAaiIBIABBvNAAaigCACIAKAIIIgNGBEBBjNAAIAZBfiACd3E2AgAMAQsgASADNgIIIAMgATYCDAsgAEEIaiEBIAAgAkEDdCICQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIEDBELQZTQACgCACIIIARPDQEgAQRAAkBBAiAAdCICQQAgAmtyIAEgAHRxaCIAQQN0IgJBtNAAaiIBIAJBvNAAaigCACICKAIIIgNGBEBBjNAAIAZBfiAAd3EiBjYCAAwBCyABIAM2AgggAyABNgIMCyACIARBA3I2AgQgAEEDdCIAIARrIQUgACACaiAFNgIAIAIgBGoiBCAFQQFyNgIEIAgEQCAIQXhxQbTQAGohAEGg0AAoAgAhAwJ/QQEgCEEDdnQiASAGcUUEQEGM0AAgASAGcjYCACAADAELIAAoAggLIgEgAzYCDCAAIAM2AgggAyAANgIMIAMgATYCCAsgAkEIaiEBQaDQACAENgIAQZTQACAFNgIADBELQZDQACgCACILRQ0BIAtoQQJ0QbzSAGooAgAiACgCBEF4cSAEayEFIAAhAgNAAkAgAigCECIBRQRAIAJBFGooAgAiAUUNAQsgASgCBEF4cSAEayIDIAVJIQIgAyAFIAIbIQUgASAAIAIbIQAgASECDAELCyAAKAIYIQkgACgCDCIDIABHBEBBnNAAKAIAGiADIAAoAggiATYCCCABIAM2AgwMEAsgAEEUaiICKAIAIgFFBEAgACgCECIBRQ0DIABBEGohAgsDQCACIQcgASIDQRRqIgIoAgAiAQ0AIANBEGohAiADKAIQIgENAAsgB0EANgIADA8LQX8hBCAAQb9/Sw0AIABBE2oiAUFwcSEEQZDQACgCACIIRQ0AQQAgBGshBQJAAkACQAJ/QQAgBEGAAkkNABpBHyAEQf///wdLDQAaIARBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmoLIgZBAnRBvNIAaigCACICRQRAQQAhAUEAIQMMAQtBACEBIARBGSAGQQF2a0EAIAZBH0cbdCEAQQAhAwNAAkAgAigCBEF4cSAEayIHIAVPDQAgAiEDIAciBQ0AQQAhBSACIQEMAwsgASACQRRqKAIAIgcgByACIABBHXZBBHFqQRBqKAIAIgJGGyABIAcbIQEgAEEBdCEAIAINAAsLIAEgA3JFBEBBACEDQQIgBnQiAEEAIABrciAIcSIARQ0DIABoQQJ0QbzSAGooAgAhAQsgAUUNAQsDQCABKAIEQXhxIARrIgIgBUkhACACIAUgABshBSABIAMgABshAyABKAIQIgAEfyAABSABQRRqKAIACyIBDQALCyADRQ0AIAVBlNAAKAIAIARrTw0AIAMoAhghByADIAMoAgwiAEcEQEGc0AAoAgAaIAAgAygCCCIBNgIIIAEgADYCDAwOCyADQRRqIgIoAgAiAUUEQCADKAIQIgFFDQMgA0EQaiECCwNAIAIhBiABIgBBFGoiAigCACIBDQAgAEEQaiECIAAoAhAiAQ0ACyAGQQA2AgAMDQtBlNAAKAIAIgMgBE8EQEGg0AAoAgAhAQJAIAMgBGsiAkEQTwRAIAEgBGoiACACQQFyNgIEIAEgA2ogAjYCACABIARBA3I2AgQMAQsgASADQQNyNgIEIAEgA2oiACAAKAIEQQFyNgIEQQAhAEEAIQILQZTQACACNgIAQaDQACAANgIAIAFBCGohAQwPC0GY0AAoAgAiAyAESwRAIAQgCWoiACADIARrIgFBAXI2AgRBpNAAIAA2AgBBmNAAIAE2AgAgCSAEQQNyNgIEIAlBCGohAQwPC0EAIQEgBAJ/QeTTACgCAARAQezTACgCAAwBC0Hw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBDGpBcHFB2KrVqgVzNgIAQfjTAEEANgIAQcjTAEEANgIAQYCABAsiACAEQccAaiIFaiIGQQAgAGsiB3EiAk8EQEH80wBBMDYCAAwPCwJAQcTTACgCACIBRQ0AQbzTACgCACIIIAJqIQAgACABTSAAIAhLcQ0AQQAhAUH80wBBMDYCAAwPC0HI0wAtAABBBHENBAJAAkAgCQRAQczTACEBA0AgASgCACIAIAlNBEAgACABKAIEaiAJSw0DCyABKAIIIgENAAsLQQAQMyIAQX9GDQUgAiEGQejTACgCACIBQQFrIgMgAHEEQCACIABrIAAgA2pBACABa3FqIQYLIAQgBk8NBSAGQf7///8HSw0FQcTTACgCACIDBEBBvNMAKAIAIgcgBmohASABIAdNDQYgASADSw0GCyAGEDMiASAARw0BDAcLIAYgA2sgB3EiBkH+////B0sNBCAGEDMhACAAIAEoAgAgASgCBGpGDQMgACEBCwJAIAYgBEHIAGpPDQAgAUF/Rg0AQezTACgCACIAIAUgBmtqQQAgAGtxIgBB/v///wdLBEAgASEADAcLIAAQM0F/RwRAIAAgBmohBiABIQAMBwtBACAGaxAzGgwECyABIgBBf0cNBQwDC0EAIQMMDAtBACEADAoLIABBf0cNAgtByNMAQcjTACgCAEEEcjYCAAsgAkH+////B0sNASACEDMhAEEAEDMhASAAQX9GDQEgAUF/Rg0BIAAgAU8NASABIABrIgYgBEE4ak0NAQtBvNMAQbzTACgCACAGaiIBNgIAQcDTACgCACABSQRAQcDTACABNgIACwJAAkACQEGk0AAoAgAiAgRAQczTACEBA0AgACABKAIAIgMgASgCBCIFakYNAiABKAIIIgENAAsMAgtBnNAAKAIAIgFBAEcgACABT3FFBEBBnNAAIAA2AgALQQAhAUHQ0wAgBjYCAEHM0wAgADYCAEGs0ABBfzYCAEGw0ABB5NMAKAIANgIAQdjTAEEANgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBeCAAa0EPcSIBIABqIgIgBkE4ayIDIAFrIgFBAXI2AgRBqNAAQfTTACgCADYCAEGY0AAgATYCAEGk0AAgAjYCACAAIANqQTg2AgQMAgsgACACTQ0AIAIgA0kNACABKAIMQQhxDQBBeCACa0EPcSIAIAJqIgNBmNAAKAIAIAZqIgcgAGsiAEEBcjYCBCABIAUgBmo2AgRBqNAAQfTTACgCADYCAEGY0AAgADYCAEGk0AAgAzYCACACIAdqQTg2AgQMAQsgAEGc0AAoAgBJBEBBnNAAIAA2AgALIAAgBmohA0HM0wAhAQJAAkACQANAIAMgASgCAEcEQCABKAIIIgENAQwCCwsgAS0ADEEIcUUNAQtBzNMAIQEDQCABKAIAIgMgAk0EQCADIAEoAgRqIgUgAksNAwsgASgCCCEBDAALAAsgASAANgIAIAEgASgCBCAGajYCBCAAQXggAGtBD3FqIgkgBEEDcjYCBCADQXggA2tBD3FqIgYgBCAJaiIEayEBIAIgBkYEQEGk0AAgBDYCAEGY0ABBmNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEDAgLQaDQACgCACAGRgRAQaDQACAENgIAQZTQAEGU0AAoAgAgAWoiADYCACAEIABBAXI2AgQgACAEaiAANgIADAgLIAYoAgQiBUEDcUEBRw0GIAVBeHEhCCAFQf8BTQRAIAVBA3YhAyAGKAIIIgAgBigCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBwsgAiAANgIIIAAgAjYCDAwGCyAGKAIYIQcgBiAGKAIMIgBHBEAgACAGKAIIIgI2AgggAiAANgIMDAULIAZBFGoiAigCACIFRQRAIAYoAhAiBUUNBCAGQRBqIQILA0AgAiEDIAUiAEEUaiICKAIAIgUNACAAQRBqIQIgACgCECIFDQALIANBADYCAAwEC0F4IABrQQ9xIgEgAGoiByAGQThrIgMgAWsiAUEBcjYCBCAAIANqQTg2AgQgAiAFQTcgBWtBD3FqQT9rIgMgAyACQRBqSRsiA0EjNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAc2AgAgA0EQakHU0wApAgA3AgAgA0HM0wApAgA3AghB1NMAIANBCGo2AgBB0NMAIAY2AgBBzNMAIAA2AgBB2NMAQQA2AgAgA0EkaiEBA0AgAUEHNgIAIAUgAUEEaiIBSw0ACyACIANGDQAgAyADKAIEQX5xNgIEIAMgAyACayIFNgIAIAIgBUEBcjYCBCAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIDcUUEQEGM0AAgASADcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEGQ0AAoAgAiA0EBIAF0IgZxRQRAIAAgAjYCAEGQ0AAgAyAGcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQMCQANAIAMiACgCBEF4cSAFRg0BIAFBHXYhAyABQQF0IQEgACADQQRxakEQaiIGKAIAIgMNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAtBmNAAKAIAIgEgBE0NAEGk0AAoAgAiACAEaiICIAEgBGsiAUEBcjYCBEGY0AAgATYCAEGk0AAgAjYCACAAIARBA3I2AgQgAEEIaiEBDAgLQQAhAUH80wBBMDYCAAwHC0EAIQALIAdFDQACQCAGKAIcIgJBAnRBvNIAaiIDKAIAIAZGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAdBEEEUIAcoAhAgBkYbaiAANgIAIABFDQELIAAgBzYCGCAGKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAGQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAIaiEBIAYgCGoiBigCBCEFCyAGIAVBfnE2AgQgASAEaiABNgIAIAQgAUEBcjYCBCABQf8BTQRAIAFBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASABQQN2dCIBcUUEQEGM0AAgASACcjYCACAADAELIAAoAggLIgEgBDYCDCAAIAQ2AgggBCAANgIMIAQgATYCCAwBC0EfIQUgAUH///8HTQRAIAFBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmohBQsgBCAFNgIcIARCADcCECAFQQJ0QbzSAGohAEGQ0AAoAgAiAkEBIAV0IgNxRQRAIAAgBDYCAEGQ0AAgAiADcjYCACAEIAA2AhggBCAENgIIIAQgBDYCDAwBCyABQRkgBUEBdmtBACAFQR9HG3QhBSAAKAIAIQACQANAIAAiAigCBEF4cSABRg0BIAVBHXYhACAFQQF0IQUgAiAAQQRxakEQaiIDKAIAIgANAAsgAyAENgIAIAQgAjYCGCAEIAQ2AgwgBCAENgIIDAELIAIoAggiACAENgIMIAIgBDYCCCAEQQA2AhggBCACNgIMIAQgADYCCAsgCUEIaiEBDAILAkAgB0UNAAJAIAMoAhwiAUECdEG80gBqIgIoAgAgA0YEQCACIAA2AgAgAA0BQZDQACAIQX4gAXdxIgg2AgAMAgsgB0EQQRQgBygCECADRhtqIAA2AgAgAEUNAQsgACAHNgIYIAMoAhAiAQRAIAAgATYCECABIAA2AhgLIANBFGooAgAiAUUNACAAQRRqIAE2AgAgASAANgIYCwJAIAVBD00EQCADIAQgBWoiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBAwBCyADIARqIgIgBUEBcjYCBCADIARBA3I2AgQgAiAFaiAFNgIAIAVB/wFNBEAgBUF4cUG00ABqIQACf0GM0AAoAgAiAUEBIAVBA3Z0IgVxRQRAQYzQACABIAVyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRBvNIAaiEAQQEgAXQiBCAIcUUEQCAAIAI2AgBBkNAAIAQgCHI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEEAkADQCAEIgAoAgRBeHEgBUYNASABQR12IQQgAUEBdCEBIAAgBEEEcWpBEGoiBigCACIEDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLIANBCGohAQwBCwJAIAlFDQACQCAAKAIcIgFBAnRBvNIAaiICKAIAIABGBEAgAiADNgIAIAMNAUGQ0AAgC0F+IAF3cTYCAAwCCyAJQRBBFCAJKAIQIABGG2ogAzYCACADRQ0BCyADIAk2AhggACgCECIBBEAgAyABNgIQIAEgAzYCGAsgAEEUaigCACIBRQ0AIANBFGogATYCACABIAM2AhgLAkAgBUEPTQRAIAAgBCAFaiIBQQNyNgIEIAAgAWoiASABKAIEQQFyNgIEDAELIAAgBGoiByAFQQFyNgIEIAAgBEEDcjYCBCAFIAdqIAU2AgAgCARAIAhBeHFBtNAAaiEBQaDQACgCACEDAn9BASAIQQN2dCICIAZxRQRAQYzQACACIAZyNgIAIAEMAQsgASgCCAsiAiADNgIMIAEgAzYCCCADIAE2AgwgAyACNgIIC0Gg0AAgBzYCAEGU0AAgBTYCAAsgAEEIaiEBCyAKQRBqJAAgAQtDACAARQRAPwBBEHQPCwJAIABB//8DcQ0AIABBAEgNACAAQRB2QAAiAEF/RgRAQfzTAEEwNgIAQX8PCyAAQRB0DwsACwvcPyIAQYAICwkBAAAAAgAAAAMAQZQICwUEAAAABQBBpAgLCQYAAAAHAAAACABB3AgLii1JbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AFJlc3BvbnNlIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zAFVzZXIgY2FsbGJhY2sgZXJyb3IAYG9uX3Jlc2V0YCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfaGVhZGVyYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9iZWdpbmAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3N0YXR1c19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3ZlcnNpb25fY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl91cmxfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXRob2RfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfZmllbGRfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fbmFtZWAgY2FsbGJhY2sgZXJyb3IAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzZXJ2ZXIASW52YWxpZCBoZWFkZXIgdmFsdWUgY2hhcgBJbnZhbGlkIGhlYWRlciBmaWVsZCBjaGFyAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdmVyc2lvbgBJbnZhbGlkIG1pbm9yIHZlcnNpb24ASW52YWxpZCBtYWpvciB2ZXJzaW9uAEV4cGVjdGVkIHNwYWNlIGFmdGVyIHZlcnNpb24ARXhwZWN0ZWQgQ1JMRiBhZnRlciB2ZXJzaW9uAEludmFsaWQgSFRUUCB2ZXJzaW9uAEludmFsaWQgaGVhZGVyIHRva2VuAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdXJsAEludmFsaWQgY2hhcmFjdGVycyBpbiB1cmwAVW5leHBlY3RlZCBzdGFydCBjaGFyIGluIHVybABEb3VibGUgQCBpbiB1cmwARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgARHVwbGljYXRlIENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhciBpbiB1cmwgcGF0aABDb250ZW50LUxlbmd0aCBjYW4ndCBiZSBwcmVzZW50IHdpdGggVHJhbnNmZXItRW5jb2RpbmcASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgc2l6ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl92YWx1ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlZCB2YWx1ZQBQYXVzZWQgYnkgb25faGVhZGVyc19jb21wbGV0ZQBJbnZhbGlkIEVPRiBzdGF0ZQBvbl9yZXNldCBwYXVzZQBvbl9jaHVua19oZWFkZXIgcGF1c2UAb25fbWVzc2FnZV9iZWdpbiBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fdmFsdWUgcGF1c2UAb25fc3RhdHVzX2NvbXBsZXRlIHBhdXNlAG9uX3ZlcnNpb25fY29tcGxldGUgcGF1c2UAb25fdXJsX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXNzYWdlX2NvbXBsZXRlIHBhdXNlAG9uX21ldGhvZF9jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfZmllbGRfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUgcGF1c2UAVW5leHBlY3RlZCBzcGFjZSBhZnRlciBzdGFydCBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAFBhdXNlIG9uIENPTk5FQ1QvVXBncmFkZQBQYXVzZSBvbiBQUkkvVXBncmFkZQBFeHBlY3RlZCBIVFRQLzIgQ29ubmVjdGlvbiBQcmVmYWNlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fbWV0aG9kAEV4cGVjdGVkIHNwYWNlIGFmdGVyIG1ldGhvZABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl9maWVsZABQYXVzZWQASW52YWxpZCB3b3JkIGVuY291bnRlcmVkAEludmFsaWQgbWV0aG9kIGVuY291bnRlcmVkAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2NoZW1hAFJlcXVlc3QgaGFzIGludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYABTV0lUQ0hfUFJPWFkAVVNFX1BST1hZAE1LQUNUSVZJVFkAVU5QUk9DRVNTQUJMRV9FTlRJVFkAQ09QWQBNT1ZFRF9QRVJNQU5FTlRMWQBUT09fRUFSTFkATk9USUZZAEZBSUxFRF9ERVBFTkRFTkNZAEJBRF9HQVRFV0FZAFBMQVkAUFVUAENIRUNLT1VUAEdBVEVXQVlfVElNRU9VVABSRVFVRVNUX1RJTUVPVVQATkVUV09SS19DT05ORUNUX1RJTUVPVVQAQ09OTkVDVElPTl9USU1FT1VUAExPR0lOX1RJTUVPVVQATkVUV09SS19SRUFEX1RJTUVPVVQAUE9TVABNSVNESVJFQ1RFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX0xPQURfQkFMQU5DRURfUkVRVUVTVABCQURfUkVRVUVTVABIVFRQX1JFUVVFU1RfU0VOVF9UT19IVFRQU19QT1JUAFJFUE9SVABJTV9BX1RFQVBPVABSRVNFVF9DT05URU5UAE5PX0NPTlRFTlQAUEFSVElBTF9DT05URU5UAEhQRV9JTlZBTElEX0NPTlNUQU5UAEhQRV9DQl9SRVNFVABHRVQASFBFX1NUUklDVABDT05GTElDVABURU1QT1JBUllfUkVESVJFQ1QAUEVSTUFORU5UX1JFRElSRUNUAENPTk5FQ1QATVVMVElfU1RBVFVTAEhQRV9JTlZBTElEX1NUQVRVUwBUT09fTUFOWV9SRVFVRVNUUwBFQVJMWV9ISU5UUwBVTkFWQUlMQUJMRV9GT1JfTEVHQUxfUkVBU09OUwBPUFRJT05TAFNXSVRDSElOR19QUk9UT0NPTFMAVkFSSUFOVF9BTFNPX05FR09USUFURVMATVVMVElQTEVfQ0hPSUNFUwBJTlRFUk5BTF9TRVJWRVJfRVJST1IAV0VCX1NFUlZFUl9VTktOT1dOX0VSUk9SAFJBSUxHVU5fRVJST1IASURFTlRJVFlfUFJPVklERVJfQVVUSEVOVElDQVRJT05fRVJST1IAU1NMX0NFUlRJRklDQVRFX0VSUk9SAElOVkFMSURfWF9GT1JXQVJERURfRk9SAFNFVF9QQVJBTUVURVIAR0VUX1BBUkFNRVRFUgBIUEVfVVNFUgBTRUVfT1RIRVIASFBFX0NCX0NIVU5LX0hFQURFUgBNS0NBTEVOREFSAFNFVFVQAFdFQl9TRVJWRVJfSVNfRE9XTgBURUFSRE9XTgBIUEVfQ0xPU0VEX0NPTk5FQ1RJT04ASEVVUklTVElDX0VYUElSQVRJT04ARElTQ09OTkVDVEVEX09QRVJBVElPTgBOT05fQVVUSE9SSVRBVElWRV9JTkZPUk1BVElPTgBIUEVfSU5WQUxJRF9WRVJTSU9OAEhQRV9DQl9NRVNTQUdFX0JFR0lOAFNJVEVfSVNfRlJPWkVOAEhQRV9JTlZBTElEX0hFQURFUl9UT0tFTgBJTlZBTElEX1RPS0VOAEZPUkJJRERFTgBFTkhBTkNFX1lPVVJfQ0FMTQBIUEVfSU5WQUxJRF9VUkwAQkxPQ0tFRF9CWV9QQVJFTlRBTF9DT05UUk9MAE1LQ09MAEFDTABIUEVfSU5URVJOQUwAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRV9VTk9GRklDSUFMAEhQRV9PSwBVTkxJTksAVU5MT0NLAFBSSQBSRVRSWV9XSVRIAEhQRV9JTlZBTElEX0NPTlRFTlRfTEVOR1RIAEhQRV9VTkVYUEVDVEVEX0NPTlRFTlRfTEVOR1RIAEZMVVNIAFBST1BQQVRDSABNLVNFQVJDSABVUklfVE9PX0xPTkcAUFJPQ0VTU0lORwBNSVNDRUxMQU5FT1VTX1BFUlNJU1RFTlRfV0FSTklORwBNSVNDRUxMQU5FT1VTX1dBUk5JTkcASFBFX0lOVkFMSURfVFJBTlNGRVJfRU5DT0RJTkcARXhwZWN0ZWQgQ1JMRgBIUEVfSU5WQUxJRF9DSFVOS19TSVpFAE1PVkUAQ09OVElOVUUASFBFX0NCX1NUQVRVU19DT01QTEVURQBIUEVfQ0JfSEVBREVSU19DT01QTEVURQBIUEVfQ0JfVkVSU0lPTl9DT01QTEVURQBIUEVfQ0JfVVJMX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8AAF4TAAAmEwAAMBAAAPAXAACdEwAAFRIAADkXAADwEgAAChAAAHUSAACtEgAAghMAAE8UAAB/EAAAoBUAACMUAACJEgAAixQAAE0VAADUEQAAzxQAABAYAADJFgAA3BYAAMERAADgFwAAuxQAAHQUAAB8FQAA5RQAAAgXAAAfEAAAZRUAAKMUAAAoFQAAAhUAAJkVAAAsEAAAixkAAE8PAADUDgAAahAAAM4QAAACFwAAiQ4AAG4TAAAcEwAAZhQAAFYXAADBEwAAzRMAAGwTAABoFwAAZhcAAF8XAAAiEwAAzg8AAGkOAADYDgAAYxYAAMsTAACqDgAAKBcAACYXAADFEwAAXRYAAOgRAABnEwAAZRMAAPIWAABzEwAAHRcAAPkWAADzEQAAzw4AAM4VAAAMEgAAsxEAAKURAABhEAAAMhcAALsTAEH5NQsBAQBBkDYL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB/TcLAQEAQZE4C14CAwICAgICAAACAgACAgACAgICAgICAgICAAQAAAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEH9OQsBAQBBkToLXgIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAQfA7Cw1sb3NlZWVwLWFsaXZlAEGJPAsBAQBBoDwL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBiT4LAQEAQaA+C+cBAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAEGwwAALXwEBAAEBAQEBAAABAQABAQABAQEBAQEBAQEBAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAEGQwgALIWVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgBBwMIACy1yYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AQfnCAAsFAQIAAQMAQZDDAAvgAQQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH5xAALBQECAAEDAEGQxQAL4AEEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cYACwQBAAABAEGRxwAL3wEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", + "base64", + ); + + /***/ + }, + + /***/ 3434: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { Buffer } = __nccwpck_require__(4573); + + module.exports = Buffer.from( + "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK77MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtzACAAQRBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAA/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQTBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQSBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQd0BNgIcCwYAIAAQMguaLQELfyMAQRBrIgokAEGk0AAoAgAiCUUEQEHk0wAoAgAiBUUEQEHw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBCGpBcHFB2KrVqgVzIgU2AgBB+NMAQQA2AgBByNMAQQA2AgALQczTAEGA1AQ2AgBBnNAAQYDUBDYCAEGw0AAgBTYCAEGs0ABBfzYCAEHQ0wBBgKwDNgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBjNQEQcGrAzYCAEGo0ABB9NMAKAIANgIAQZjQAEHAqwM2AgBBpNAAQYjUBDYCAEHM/wdBODYCAEGI1AQhCQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQewBTQRAQYzQACgCACIGQRAgAEETakFwcSAAQQtJGyIEQQN2IgB2IgFBA3EEQAJAIAFBAXEgAHJBAXMiAkEDdCIAQbTQAGoiASAAQbzQAGooAgAiACgCCCIDRgRAQYzQACAGQX4gAndxNgIADAELIAEgAzYCCCADIAE2AgwLIABBCGohASAAIAJBA3QiAkEDcjYCBCAAIAJqIgAgACgCBEEBcjYCBAwRC0GU0AAoAgAiCCAETw0BIAEEQAJAQQIgAHQiAkEAIAJrciABIAB0cWgiAEEDdCICQbTQAGoiASACQbzQAGooAgAiAigCCCIDRgRAQYzQACAGQX4gAHdxIgY2AgAMAQsgASADNgIIIAMgATYCDAsgAiAEQQNyNgIEIABBA3QiACAEayEFIAAgAmogBTYCACACIARqIgQgBUEBcjYCBCAIBEAgCEF4cUG00ABqIQBBoNAAKAIAIQMCf0EBIAhBA3Z0IgEgBnFFBEBBjNAAIAEgBnI2AgAgAAwBCyAAKAIICyIBIAM2AgwgACADNgIIIAMgADYCDCADIAE2AggLIAJBCGohAUGg0AAgBDYCAEGU0AAgBTYCAAwRC0GQ0AAoAgAiC0UNASALaEECdEG80gBqKAIAIgAoAgRBeHEgBGshBSAAIQIDQAJAIAIoAhAiAUUEQCACQRRqKAIAIgFFDQELIAEoAgRBeHEgBGsiAyAFSSECIAMgBSACGyEFIAEgACACGyEAIAEhAgwBCwsgACgCGCEJIAAoAgwiAyAARwRAQZzQACgCABogAyAAKAIIIgE2AgggASADNgIMDBALIABBFGoiAigCACIBRQRAIAAoAhAiAUUNAyAAQRBqIQILA0AgAiEHIAEiA0EUaiICKAIAIgENACADQRBqIQIgAygCECIBDQALIAdBADYCAAwPC0F/IQQgAEG/f0sNACAAQRNqIgFBcHEhBEGQ0AAoAgAiCEUNAEEAIARrIQUCQAJAAkACf0EAIARBgAJJDQAaQR8gBEH///8HSw0AGiAEQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qCyIGQQJ0QbzSAGooAgAiAkUEQEEAIQFBACEDDAELQQAhASAEQRkgBkEBdmtBACAGQR9HG3QhAEEAIQMDQAJAIAIoAgRBeHEgBGsiByAFTw0AIAIhAyAHIgUNAEEAIQUgAiEBDAMLIAEgAkEUaigCACIHIAcgAiAAQR12QQRxakEQaigCACICRhsgASAHGyEBIABBAXQhACACDQALCyABIANyRQRAQQAhA0ECIAZ0IgBBACAAa3IgCHEiAEUNAyAAaEECdEG80gBqKAIAIQELIAFFDQELA0AgASgCBEF4cSAEayICIAVJIQAgAiAFIAAbIQUgASADIAAbIQMgASgCECIABH8gAAUgAUEUaigCAAsiAQ0ACwsgA0UNACAFQZTQACgCACAEa08NACADKAIYIQcgAyADKAIMIgBHBEBBnNAAKAIAGiAAIAMoAggiATYCCCABIAA2AgwMDgsgA0EUaiICKAIAIgFFBEAgAygCECIBRQ0DIANBEGohAgsDQCACIQYgASIAQRRqIgIoAgAiAQ0AIABBEGohAiAAKAIQIgENAAsgBkEANgIADA0LQZTQACgCACIDIARPBEBBoNAAKAIAIQECQCADIARrIgJBEE8EQCABIARqIgAgAkEBcjYCBCABIANqIAI2AgAgASAEQQNyNgIEDAELIAEgA0EDcjYCBCABIANqIgAgACgCBEEBcjYCBEEAIQBBACECC0GU0AAgAjYCAEGg0AAgADYCACABQQhqIQEMDwtBmNAAKAIAIgMgBEsEQCAEIAlqIgAgAyAEayIBQQFyNgIEQaTQACAANgIAQZjQACABNgIAIAkgBEEDcjYCBCAJQQhqIQEMDwtBACEBIAQCf0Hk0wAoAgAEQEHs0wAoAgAMAQtB8NMAQn83AgBB6NMAQoCAhICAgMAANwIAQeTTACAKQQxqQXBxQdiq1aoFczYCAEH40wBBADYCAEHI0wBBADYCAEGAgAQLIgAgBEHHAGoiBWoiBkEAIABrIgdxIgJPBEBB/NMAQTA2AgAMDwsCQEHE0wAoAgAiAUUNAEG80wAoAgAiCCACaiEAIAAgAU0gACAIS3ENAEEAIQFB/NMAQTA2AgAMDwtByNMALQAAQQRxDQQCQAJAIAkEQEHM0wAhAQNAIAEoAgAiACAJTQRAIAAgASgCBGogCUsNAwsgASgCCCIBDQALC0EAEDMiAEF/Rg0FIAIhBkHo0wAoAgAiAUEBayIDIABxBEAgAiAAayAAIANqQQAgAWtxaiEGCyAEIAZPDQUgBkH+////B0sNBUHE0wAoAgAiAwRAQbzTACgCACIHIAZqIQEgASAHTQ0GIAEgA0sNBgsgBhAzIgEgAEcNAQwHCyAGIANrIAdxIgZB/v///wdLDQQgBhAzIQAgACABKAIAIAEoAgRqRg0DIAAhAQsCQCAGIARByABqTw0AIAFBf0YNAEHs0wAoAgAiACAFIAZrakEAIABrcSIAQf7///8HSwRAIAEhAAwHCyAAEDNBf0cEQCAAIAZqIQYgASEADAcLQQAgBmsQMxoMBAsgASIAQX9HDQUMAwtBACEDDAwLQQAhAAwKCyAAQX9HDQILQcjTAEHI0wAoAgBBBHI2AgALIAJB/v///wdLDQEgAhAzIQBBABAzIQEgAEF/Rg0BIAFBf0YNASAAIAFPDQEgASAAayIGIARBOGpNDQELQbzTAEG80wAoAgAgBmoiATYCAEHA0wAoAgAgAUkEQEHA0wAgATYCAAsCQAJAAkBBpNAAKAIAIgIEQEHM0wAhAQNAIAAgASgCACIDIAEoAgQiBWpGDQIgASgCCCIBDQALDAILQZzQACgCACIBQQBHIAAgAU9xRQRAQZzQACAANgIAC0EAIQFB0NMAIAY2AgBBzNMAIAA2AgBBrNAAQX82AgBBsNAAQeTTACgCADYCAEHY0wBBADYCAANAIAFByNAAaiABQbzQAGoiAjYCACACIAFBtNAAaiIDNgIAIAFBwNAAaiADNgIAIAFB0NAAaiABQcTQAGoiAzYCACADIAI2AgAgAUHY0ABqIAFBzNAAaiICNgIAIAIgAzYCACABQdTQAGogAjYCACABQSBqIgFBgAJHDQALQXggAGtBD3EiASAAaiICIAZBOGsiAyABayIBQQFyNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAI2AgAgACADakE4NgIEDAILIAAgAk0NACACIANJDQAgASgCDEEIcQ0AQXggAmtBD3EiACACaiIDQZjQACgCACAGaiIHIABrIgBBAXI2AgQgASAFIAZqNgIEQajQAEH00wAoAgA2AgBBmNAAIAA2AgBBpNAAIAM2AgAgAiAHakE4NgIEDAELIABBnNAAKAIASQRAQZzQACAANgIACyAAIAZqIQNBzNMAIQECQAJAAkADQCADIAEoAgBHBEAgASgCCCIBDQEMAgsLIAEtAAxBCHFFDQELQczTACEBA0AgASgCACIDIAJNBEAgAyABKAIEaiIFIAJLDQMLIAEoAgghAQwACwALIAEgADYCACABIAEoAgQgBmo2AgQgAEF4IABrQQ9xaiIJIARBA3I2AgQgA0F4IANrQQ9xaiIGIAQgCWoiBGshASACIAZGBEBBpNAAIAQ2AgBBmNAAQZjQACgCACABaiIANgIAIAQgAEEBcjYCBAwIC0Gg0AAoAgAgBkYEQEGg0AAgBDYCAEGU0ABBlNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEIAAgBGogADYCAAwICyAGKAIEIgVBA3FBAUcNBiAFQXhxIQggBUH/AU0EQCAFQQN2IQMgBigCCCIAIAYoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAcLIAIgADYCCCAAIAI2AgwMBgsgBigCGCEHIAYgBigCDCIARwRAIAAgBigCCCICNgIIIAIgADYCDAwFCyAGQRRqIgIoAgAiBUUEQCAGKAIQIgVFDQQgBkEQaiECCwNAIAIhAyAFIgBBFGoiAigCACIFDQAgAEEQaiECIAAoAhAiBQ0ACyADQQA2AgAMBAtBeCAAa0EPcSIBIABqIgcgBkE4ayIDIAFrIgFBAXI2AgQgACADakE4NgIEIAIgBUE3IAVrQQ9xakE/ayIDIAMgAkEQakkbIgNBIzYCBEGo0ABB9NMAKAIANgIAQZjQACABNgIAQaTQACAHNgIAIANBEGpB1NMAKQIANwIAIANBzNMAKQIANwIIQdTTACADQQhqNgIAQdDTACAGNgIAQczTACAANgIAQdjTAEEANgIAIANBJGohAQNAIAFBBzYCACAFIAFBBGoiAUsNAAsgAiADRg0AIAMgAygCBEF+cTYCBCADIAMgAmsiBTYCACACIAVBAXI2AgQgBUH/AU0EQCAFQXhxQbTQAGohAAJ/QYzQACgCACIBQQEgBUEDdnQiA3FFBEBBjNAAIAEgA3I2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEG80gBqIQBBkNAAKAIAIgNBASABdCIGcUUEQCAAIAI2AgBBkNAAIAMgBnI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEDAkADQCADIgAoAgRBeHEgBUYNASABQR12IQMgAUEBdCEBIAAgA0EEcWpBEGoiBigCACIDDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLQZjQACgCACIBIARNDQBBpNAAKAIAIgAgBGoiAiABIARrIgFBAXI2AgRBmNAAIAE2AgBBpNAAIAI2AgAgACAEQQNyNgIEIABBCGohAQwIC0EAIQFB/NMAQTA2AgAMBwtBACEACyAHRQ0AAkAgBigCHCICQQJ0QbzSAGoiAygCACAGRgRAIAMgADYCACAADQFBkNAAQZDQACgCAEF+IAJ3cTYCAAwCCyAHQRBBFCAHKAIQIAZGG2ogADYCACAARQ0BCyAAIAc2AhggBigCECICBEAgACACNgIQIAIgADYCGAsgBkEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgCGohASAGIAhqIgYoAgQhBQsgBiAFQX5xNgIEIAEgBGogATYCACAEIAFBAXI2AgQgAUH/AU0EQCABQXhxQbTQAGohAAJ/QYzQACgCACICQQEgAUEDdnQiAXFFBEBBjNAAIAEgAnI2AgAgAAwBCyAAKAIICyIBIAQ2AgwgACAENgIIIAQgADYCDCAEIAE2AggMAQtBHyEFIAFB////B00EQCABQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qIQULIAQgBTYCHCAEQgA3AhAgBUECdEG80gBqIQBBkNAAKAIAIgJBASAFdCIDcUUEQCAAIAQ2AgBBkNAAIAIgA3I2AgAgBCAANgIYIAQgBDYCCCAEIAQ2AgwMAQsgAUEZIAVBAXZrQQAgBUEfRxt0IQUgACgCACEAAkADQCAAIgIoAgRBeHEgAUYNASAFQR12IQAgBUEBdCEFIAIgAEEEcWpBEGoiAygCACIADQALIAMgBDYCACAEIAI2AhggBCAENgIMIAQgBDYCCAwBCyACKAIIIgAgBDYCDCACIAQ2AgggBEEANgIYIAQgAjYCDCAEIAA2AggLIAlBCGohAQwCCwJAIAdFDQACQCADKAIcIgFBAnRBvNIAaiICKAIAIANGBEAgAiAANgIAIAANAUGQ0AAgCEF+IAF3cSIINgIADAILIAdBEEEUIAcoAhAgA0YbaiAANgIAIABFDQELIAAgBzYCGCADKAIQIgEEQCAAIAE2AhAgASAANgIYCyADQRRqKAIAIgFFDQAgAEEUaiABNgIAIAEgADYCGAsCQCAFQQ9NBEAgAyAEIAVqIgBBA3I2AgQgACADaiIAIAAoAgRBAXI2AgQMAQsgAyAEaiICIAVBAXI2AgQgAyAEQQNyNgIEIAIgBWogBTYCACAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIFcUUEQEGM0AAgASAFcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEEBIAF0IgQgCHFFBEAgACACNgIAQZDQACAEIAhyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhBAJAA0AgBCIAKAIEQXhxIAVGDQEgAUEddiEEIAFBAXQhASAAIARBBHFqQRBqIgYoAgAiBA0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIICyADQQhqIQEMAQsCQCAJRQ0AAkAgACgCHCIBQQJ0QbzSAGoiAigCACAARgRAIAIgAzYCACADDQFBkNAAIAtBfiABd3E2AgAMAgsgCUEQQRQgCSgCECAARhtqIAM2AgAgA0UNAQsgAyAJNgIYIAAoAhAiAQRAIAMgATYCECABIAM2AhgLIABBFGooAgAiAUUNACADQRRqIAE2AgAgASADNgIYCwJAIAVBD00EQCAAIAQgBWoiAUEDcjYCBCAAIAFqIgEgASgCBEEBcjYCBAwBCyAAIARqIgcgBUEBcjYCBCAAIARBA3I2AgQgBSAHaiAFNgIAIAgEQCAIQXhxQbTQAGohAUGg0AAoAgAhAwJ/QQEgCEEDdnQiAiAGcUUEQEGM0AAgAiAGcjYCACABDAELIAEoAggLIgIgAzYCDCABIAM2AgggAyABNgIMIAMgAjYCCAtBoNAAIAc2AgBBlNAAIAU2AgALIABBCGohAQsgCkEQaiQAIAELQwAgAEUEQD8AQRB0DwsCQCAAQf//A3ENACAAQQBIDQAgAEEQdkAAIgBBf0YEQEH80wBBMDYCAEF/DwsgAEEQdA8LAAsL3D8iAEGACAsJAQAAAAIAAAADAEGUCAsFBAAAAAUAQaQICwkGAAAABwAAAAgAQdwIC4otSW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwBB+TULAQEAQZA2C+ABAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQf03CwEBAEGROAteAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgBB/TkLAQEAQZE6C14CAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEHwOwsNbG9zZWVlcC1hbGl2ZQBBiTwLAQEAQaA8C+ABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQYk+CwEBAEGgPgvnAQEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZABBsMAAC18BAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBBkMIACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQcDCAAstcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQoNClNNDQoNClRUUC9DRS9UU1AvAEH5wgALBQECAAEDAEGQwwAL4AEEAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cQACwUBAgABAwBBkMUAC+ABBAEBBQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", + "base64", + ); + + /***/ + }, + + /***/ 172: /***/ (__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 res; + } + exports.enumToMap = enumToMap; + //# sourceMappingURL=utils.js.map + + /***/ + }, + + /***/ 7501: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { kClients } = __nccwpck_require__(6443); + const Agent = __nccwpck_require__(7405); + const { + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory, + } = __nccwpck_require__(1117); + const MockClient = __nccwpck_require__(7365); + const MockPool = __nccwpck_require__(4004); + const { matchValue, buildMockOptions } = __nccwpck_require__(3397); + const { InvalidArgumentError, UndiciError } = __nccwpck_require__(8707); + const Dispatcher = __nccwpck_require__(883); + const Pluralizer = __nccwpck_require__(1529); + const PendingInterceptorsFormatter = __nccwpck_require__(6142); + + class MockAgent extends Dispatcher { + constructor(opts) { + super(opts); + + this[kNetConnect] = true; + this[kIsMockActive] = true; + + // Instantiate Agent and encapsulate + if (opts?.agent && typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError( + "Argument opts.agent must implement Agent", + ); + } + const agent = 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); + } + 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; + } + + 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 { + 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, 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 client = this[kClients].get(origin); + if (client) { + return client; + } + + // If the origin is not a string create a dummy parent pool and return to user + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + + // If we match, create a pool and assign the same dispatches + for (const [keyMatcher, nonExplicitDispatcher] of Array.from( + this[kClients], + )) { + 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[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: + +${pendingInterceptorsFormatter.format(pending)} +`.trim(), + ); + } + } + + module.exports = MockAgent; + + /***/ + }, + + /***/ 7365: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { promisify } = __nccwpck_require__(7975); + const Client = __nccwpck_require__(3701); + const { buildMockDispatch } = __nccwpck_require__(3397); + const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected, + } = __nccwpck_require__(1117); + const { MockInterceptor } = __nccwpck_require__(1511); + const Symbols = __nccwpck_require__(6443); + const { InvalidArgumentError } = __nccwpck_require__(8707); + + /** + * 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", + ); + } + + 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; + + /***/ + }, + + /***/ 2429: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { UndiciError } = __nccwpck_require__(8707); + + const kMockNotMatchedError = Symbol.for( + "undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED", + ); + + /** + * The request does not match any registered mock dispatches. + */ + 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"; + } + + static [Symbol.hasInstance](instance) { + return instance && instance[kMockNotMatchedError] === true; + } + + [kMockNotMatchedError] = true; + } + + module.exports = { + MockNotMatchedError, + }; + + /***/ + }, + + /***/ 1511: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { getResponseData, buildKey, addMockDispatch } = + __nccwpck_require__(3397); + const { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch, + } = __nccwpck_require__(1117); + const { InvalidArgumentError } = __nccwpck_require__(8707); + const { buildURL } = __nccwpck_require__(3440); + + /** + * 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", + ); + } + + this[kMockDispatch].delay = waitInMs; + return this; + } + + /** + * 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; + } + } + + /** + * Defines an interceptor for a Mock + */ + class MockInterceptor { + 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"; + } + // 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/web/fetch/index.js#L1811 + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + } + if (typeof opts.method === "string") { + opts.method = opts.method.toUpperCase(); + } + + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + + 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 }; + } + + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") { + throw new InvalidArgumentError("statusCode must be defined"); + } + if ( + typeof replyParameters.responseOptions !== "object" || + replyParameters.responseOptions === null + ) { + throw new InvalidArgumentError("responseOptions must be an object"); + } + } + + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + // Values of reply aren't available right now as they + // can only be available when the reply callback is invoked. + if (typeof replyOptionsCallbackOrStatusCode === "function") { + // We'll first wrap the provided callback in another function, + // this function will properly resolve the data from the callback + // when invoked. + const wrappedDefaultsCallback = (opts) => { + // Our reply options callback contains the parameter for statusCode, data and options. + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + + // Check if it is in the right format + if (typeof resolvedData !== "object" || resolvedData === null) { + throw new InvalidArgumentError( + "reply options callback must return an object", + ); + } + + const replyParameters = { + data: "", + responseOptions: {}, + ...resolvedData, + }; + this.validateReplyParameters(replyParameters); + // Since the values can be obtained immediately we return them + // from this higher order function that will be resolved later. + return { + ...this.createMockScopeDispatchData(replyParameters), + }; + }; + + // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. + const newMockDispatch = 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 replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === undefined ? "" : arguments[1], + responseOptions: arguments[2] === undefined ? {} : arguments[2], + }; + this.validateReplyParameters(replyParameters); + + // Send in-already provided data like usual + const dispatchData = + this.createMockScopeDispatchData(replyParameters); + const newMockDispatch = 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; + } + } + + module.exports.MockInterceptor = MockInterceptor; + module.exports.MockScope = MockScope; + + /***/ + }, + + /***/ 4004: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { promisify } = __nccwpck_require__(7975); + const Pool = __nccwpck_require__(628); + const { buildMockDispatch } = __nccwpck_require__(3397); + const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected, + } = __nccwpck_require__(1117); + const { MockInterceptor } = __nccwpck_require__(1511); + const Symbols = __nccwpck_require__(6443); + const { InvalidArgumentError } = __nccwpck_require__(8707); + + /** + * 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", + ); + } + + 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; + + /***/ + }, + + /***/ 1117: /***/ (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"), + }; + + /***/ + }, + + /***/ 3397: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { MockNotMatchedError } = __nccwpck_require__(2429); + const { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect, + } = __nccwpck_require__(1117); + const { buildURL } = __nccwpck_require__(3440); + const { STATUS_CODES } = __nccwpck_require__(7067); + const { + types: { isPromise }, + } = __nccwpck_require__(7975); + + 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]; + } + } + + 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); + } + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch.headers === "undefined") { + return true; + } + if ( + typeof headers !== "object" || + typeof mockDispatch.headers !== "object" + ) { + return false; + } + + for (const [matchHeaderName, matchHeaderValue] of Object.entries( + mockDispatch.headers, + )) { + const headerValue = getHeaderByName(headers, matchHeaderName); + + if (!matchValue(matchHeaderValue, headerValue)) { + return false; + } + } + 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 (data instanceof Uint8Array) { + return data; + } else if (data instanceof ArrayBuffer) { + return data; + } else if (typeof data === "object") { + return JSON.stringify(data); + } else { + return data.toString(); + } + } + + function 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}' on path '${resolvedPath}'`, + ); + } + + // 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}' on path '${resolvedPath}'`, + ); + } + + // Match headers + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => + matchHeaders(mockDispatch, key.headers), + ); + if (matchedMockDispatches.length === 0) { + const headers = + typeof key.headers === "object" + ? JSON.stringify(key.headers) + : key.headers; + throw new MockNotMatchedError( + `Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`, + ); + } + + 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; + } + 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) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) { + for (let j = 0; j < value.length; ++j) { + result.push(name, Buffer.from(`${value[j]}`)); + } + } else { + result.push(name, Buffer.from(`${value}`)); + } + } + return result; + } + + /** + * @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; + } + + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.( + statusCode, + responseHeaders, + resume, + getStatusText(statusCode), + ); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + + 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)`, + ); + } + 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)`, + ); + } + } else { + throw error; + } + } + } else { + originalDispatch.call(this, opts, handler); + } + }; + } + + 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; + } + return false; + } + + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + + module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName, + buildHeadersFromArray, + }; + + /***/ + }, + + /***/ 6142: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { Transform } = __nccwpck_require__(7075); + const { Console } = __nccwpck_require__(7540); + + const PERSISTENT = process.versions.icu ? "✅" : "Y "; + const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; + + /** + * 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); + }, + }); + + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { + colors: !disableColors && !process.env.CI, + }, + }); + } + + 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 ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked, + }), + ); + + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; + + /***/ + }, + + /***/ 1529: /***/ (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 }; + } + }; + + /***/ + }, + + /***/ 6603: /***/ (module) => { + "use strict"; + + /** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ + + /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ + let fastNow = 0; + + /** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ + const RESOLUTION_MS = 1e3; + + /** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ + const TICK_MS = (RESOLUTION_MS >> 1) - 1; + + /** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ + let fastNowTimeout; + + /** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ + const kFastTimer = Symbol("kFastTimer"); + + /** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ + const fastTimers = []; + + /** + * These constants represent the various states of a FastTimer. + */ + + /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ + const NOT_IN_LIST = -2; + + /** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ + const TO_BE_CLEARED = -1; + + /** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ + const PENDING = 0; + + /** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ + const ACTIVE = 1; + + /** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ + function onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ + fastNow += TICK_MS; + + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ + let idx = 0; + + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ + let len = fastTimers.length; + + while (idx < len) { + /** + * @type {FastTimer} + */ + const timer = fastTimers[idx]; + + // If the timer is in the ACTIVE state and the timer has expired, it will + // be processed in the next tick. + if (timer._state === PENDING) { + // Set the _idleStart value to the fastNow value minus the TICK_MS value + // to account for the time the timer was in the PENDING state. + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if ( + timer._state === ACTIVE && + fastNow >= timer._idleStart + timer._idleTimeout + ) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + + // Move the last element to the current index and decrement len if it is + // not the only element in the array. + if (--len !== 0) { + fastTimers[idx] = fastTimers[len]; + } + } else { + ++idx; + } + } + + // Set the length of the fastTimers array to the new length and thus + // removing the excess FastTimers elements from the array. + fastTimers.length = len; + + // If there are still active FastTimers in the array, refresh the Timer. + // If there are no active FastTimers, the timer will be refreshed again + // when a new FastTimer is instantiated. + if (fastTimers.length !== 0) { + refreshTimeout(); + } + } + + function refreshTimeout() { + // If the fastNowTimeout is already set, refresh it. + if (fastNowTimeout) { + fastNowTimeout.refresh(); + // fastNowTimeout is not instantiated yet, create a new Timer. + } else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + + // If the Timer has an unref method, call it to allow the process to exit if + // there are no other active handles. + if (fastNowTimeout.unref) { + fastNowTimeout.unref(); + } + } + } + + /** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ + class FastTimer { + [kFastTimer] = true; + + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + + this.refresh(); + } + + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + // In the special case that the timer is not in the list of active timers, + // add it back to the array to be processed in the next tick by the onTick + // function. + if (this._state === NOT_IN_LIST) { + fastTimers.push(this); + } + + // If the timer is the only active timer, refresh the fastNowTimeout for + // better resolution. + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout(); + } + + // Setting the state to PENDING will cause the timer to be reset in the + // next tick by the onTick function. + this._state = PENDING; + } + + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + // Set the state to TO_BE_CLEARED to mark the timer for removal in the next + // tick by the onTick function. + this._state = TO_BE_CLEARED; + + // Reset the _idleStart value to -1 to indicate that the timer is no longer + // active. + this._idleStart = -1; + } + } + + /** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ + module.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + // If the delay is less than or equal to the RESOLUTION_MS value return a + // native Node.js Timer instance. + return delay <= RESOLUTION_MS + ? setTimeout(callback, delay, arg) + : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + // If the timeout is a FastTimer, call its own clear method. + if (timeout[kFastTimer]) { + /** + * @type {FastTimer} + */ + timeout.clear(); + // Otherwise it is an instance of a native NodeJS.Timeout, so call the + // Node.js native clearTimeout function. + } else { + clearTimeout(timeout); + } + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer, + }; + + /***/ + }, + + /***/ 9634: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { kConstruct } = __nccwpck_require__(109); + const { urlEquals, getFieldValues } = __nccwpck_require__(6798); + const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(3440); + const { webidl } = __nccwpck_require__(5893); + const { Response, cloneResponse, fromInnerResponse } = + __nccwpck_require__(9051); + const { Request, fromInnerRequest } = __nccwpck_require__(9967); + const { kState } = __nccwpck_require__(3627); + const { fetching } = __nccwpck_require__(4398); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = + __nccwpck_require__(3168); + const assert = __nccwpck_require__(4589); + + /** + * @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(); + } + + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + + async match(request, options = {}) { + webidl.brandCheck(this, Cache); + + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions( + options, + prefix, + "options", + ); + + const p = this.#internalMatchAll(request, options, 1); + + if (p.length === 0) { + return; + } + + return p[0]; + } + + async matchAll(request = undefined, options = {}) { + webidl.brandCheck(this, Cache); + + const prefix = "Cache.matchAll"; + if (request !== undefined) + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions( + options, + prefix, + "options", + ); + + return this.#internalMatchAll(request, options); + } + + async add(request) { + webidl.brandCheck(this, Cache); + + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + request = webidl.converters.RequestInfo(request, prefix, "request"); + + // 1. + const requests = [request]; + + // 2. + const responseArrayPromise = this.addAll(requests); + + // 3. + return await responseArrayPromise; + } + + async addAll(requests) { + webidl.brandCheck(this, Cache); + + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + // 1. + const responsePromises = []; + + // 2. + const requestList = []; + + // 3. + for (let request of requests) { + if (request === undefined) { + throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"], + }); + } + + request = webidl.converters.RequestInfo(request); + + 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: prefix, + message: "Expected http/s scheme when method is not GET.", + }); + } + } + + // 4. + /** @type {ReturnType[]} */ + const fetchControllers = []; + + // 5. + for (const request of requests) { + // 5.1 + const r = new Request(request)[kState]; + + // 5.2 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme.", + }); + } + + // 5.4 + r.initiator = "fetch"; + r.destination = "subresource"; + + // 5.5 + requestList.push(r); + + // 5.6 + const responsePromise = createDeferredPromise(); + + // 5.7 + fetchControllers.push( + fetching({ + request: r, + 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); + + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + + request = webidl.converters.RequestInfo(request, prefix, "request"); + response = webidl.converters.Response(response, prefix, "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: prefix, + 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: prefix, + 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: prefix, + message: "Got * vary field value", + }); + } + } + } + + // 8. + if ( + innerResponse.body && + (isDisturbed(innerResponse.body.stream) || + innerResponse.body.stream.locked) + ) { + throw webidl.errors.exception({ + header: prefix, + 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); + + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions( + options, + prefix, + "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 {Promise} + */ + async keys(request = undefined, options = {}) { + webidl.brandCheck(this, Cache); + + const prefix = "Cache.keys"; + + if (request !== undefined) + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions( + options, + prefix, + "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 = fromInnerRequest( + request, + new AbortController().signal, + "immutable", + ); + // 5.4.2.1 + requestList.push(requestObject); + } + + // 5.4.3 + promise.resolve(Object.freeze(requestList)); + }); + + return promise.promise; + } + + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + // 1. + const cache = this.#relevantRequestResponseList; + + // 2. + const backupCache = [...cache]; + + // 3. + const addedItems = []; + + // 4.1 + const resultList = []; + + try { + // 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; + } + + #internalMatchAll(request, options, maxResponses = Infinity) { + // 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 = fromInnerResponse(response, "immutable"); + + responseList.push(responseObject.clone()); + + if (responseList.length >= maxResponses) { + break; + } + } + + // 6. + return Object.freeze(responseList); + } + } + + 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, + }; + + /***/ + }, + + /***/ 3245: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { kConstruct } = __nccwpck_require__(109); + const { Cache } = __nccwpck_require__(9634); + const { webidl } = __nccwpck_require__(5893); + const { kEnumerableProperty } = __nccwpck_require__(3440); + + class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, CacheStorage); + + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + cacheName = webidl.converters.DOMString( + cacheName, + prefix, + "cacheName", + ); + + // 2.1.1 + // 2.2 + return this.#caches.has(cacheName); + } + + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, CacheStorage); + + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + cacheName = webidl.converters.DOMString( + cacheName, + prefix, + "cacheName", + ); + + // 2.1 + if (this.#caches.has(cacheName)) { + // await caches.open('v1') !== await caches.open('v1') + + // 2.1.1 + const cache = this.#caches.get(cacheName); + + // 2.1.1.1 + return new 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); + + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + cacheName = webidl.converters.DOMString( + cacheName, + prefix, + "cacheName", + ); + + return this.#caches.delete(cacheName); + } + + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + 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, + }; + + /***/ + }, + + /***/ 109: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + module.exports = { + kConstruct: __nccwpck_require__(6443).kConstruct, + }; + + /***/ + }, + + /***/ 6798: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const assert = __nccwpck_require__(4589); + const { URLSerializer } = __nccwpck_require__(1900); + const { isValidHeaderName } = __nccwpck_require__(3168); + + /** + * @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 getFieldValues(header) { + assert(header !== null); + + const values = []; + + for (let value of header.split(",")) { + value = value.trim(); + + if (isValidHeaderName(value)) { + values.push(value); + } + } + + return values; + } + + module.exports = { + urlEquals, + getFieldValues, + }; + + /***/ + }, + + /***/ 1276: /***/ (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, + }; + + /***/ + }, + + /***/ 9061: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { parseSetCookie } = __nccwpck_require__(1978); + const { stringify } = __nccwpck_require__(7797); + const { webidl } = __nccwpck_require__(5893); + const { Headers } = __nccwpck_require__(660); + + /** + * @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, "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.brandCheck(headers, Headers, { strict: false }); + + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + + name = webidl.converters.DOMString(name, prefix, "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, "getSetCookies"); + + webidl.brandCheck(headers, Headers, { strict: false }); + + const cookies = headers.getSetCookie(); + + if (!cookies) { + return []; + } + + return cookies.map((pair) => parseSetCookie(pair)); + } + + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + + webidl.brandCheck(headers, Headers, { strict: false }); + + cookie = webidl.converters.Cookie(cookie); + + const str = stringify(cookie); + + if (str) { + headers.append("Set-Cookie", str); + } + } + + 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: () => new Array(0), + }, + ]); + + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie, + }; + + /***/ + }, + + /***/ 1978: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { maxNameValuePairSize, maxAttributeValueSize } = + __nccwpck_require__(1276); + const { isCTLExcludingHtab } = __nccwpck_require__(7797); + const { collectASequenceOfCodePointsFast } = __nccwpck_require__(1900); + const assert = __nccwpck_require__(4589); + + /** + * @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: + + const attributeValueLowercase = attributeValue.toLowerCase(); + + // 1. If cookie-av's attribute-value is a case-insensitive match for + // "None", append an attribute to the cookie-attribute-list with an + // attribute-name of "SameSite" and an attribute-value of "None". + if (attributeValueLowercase === "none") { + cookieAttributeList.sameSite = "None"; + } else if (attributeValueLowercase === "strict") { + // 2. If cookie-av's attribute-value is a case-insensitive match for + // "Strict", append an attribute to the cookie-attribute-list with + // an attribute-name of "SameSite" and an attribute-value of + // "Strict". + cookieAttributeList.sameSite = "Strict"; + } else if (attributeValueLowercase === "lax") { + // 3. If cookie-av's attribute-value is a case-insensitive match for + // "Lax", append an attribute to the cookie-attribute-list with an + // attribute-name of "SameSite" and an attribute-value of "Lax". + cookieAttributeList.sameSite = "Lax"; + } + } else { + cookieAttributeList.unparsed ??= []; + + cookieAttributeList.unparsed.push( + `${attributeName}=${attributeValue}`, + ); + } + + // 8. Return to Step 1 of this algorithm. + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + + module.exports = { + parseSetCookie, + parseUnparsedAttributes, + }; + + /***/ + }, + + /***/ 7797: /***/ (module) => { + "use strict"; + + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + + if ( + (code >= 0x00 && code <= 0x08) || + (code >= 0x0a && code <= 0x1f) || + code === 0x7f + ) { + return true; + } + } + return false; + } + + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + + if ( + code < 0x21 || // exclude CTLs (0-31), SP and HT + code > 0x7e || // exclude non-ascii and DEL + code === 0x22 || // " + code === 0x28 || // ( + code === 0x29 || // ) + code === 0x3c || // < + code === 0x3e || // > + code === 0x40 || // @ + code === 0x2c || // , + code === 0x3b || // ; + code === 0x3a || // : + code === 0x5c || // \ + code === 0x2f || // / + code === 0x5b || // [ + code === 0x5d || // ] + code === 0x3f || // ? + code === 0x3d || // = + code === 0x7b || // { + code === 0x7d // } + ) { + throw new Error("Invalid cookie name"); + } + } + } + + /** + 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) { + let len = value.length; + let i = 0; + + // if the value is wrapped in DQUOTE + if (value[0] === '"') { + if (len === 1 || value[len - 1] !== '"') { + throw new Error("Invalid cookie value"); + } + --len; + ++i; + } + + while (i < len) { + const code = value.charCodeAt(i++); + + if ( + code < 0x21 || // exclude CTLs (0-31) + code > 0x7e || // non-ascii and DEL (127) + code === 0x22 || // " + code === 0x2c || // , + code === 0x3b || // ; + code === 0x5c // \ + ) { + throw new Error("Invalid cookie value"); + } + } + } + + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path) { + for (let i = 0; i < path.length; ++i) { + const code = path.charCodeAt(i); + + if ( + code < 0x20 || // exclude CTLs (0-31) + code === 0x7f || // DEL + code === 0x3b // ; + ) { + 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"); + } + } + + const IMFDays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + + const IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec", + ]; + + const IMFPaddedNumbers = Array(61) + .fill(0) + .map((_, i) => i.toString().padStart(2, "0")); + + /** + * @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); + } + + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} 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"); + } + + const [key, ...value] = part.split("="); + + out.push(`${key.trim()}=${value.join("=")}`); + } + + return out.join("; "); + } + + module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify, + }; + + /***/ + }, + + /***/ 4031: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { Transform } = __nccwpck_require__(7075); + const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(4811); + + /** + * @type {number[]} BOM + */ + const BOM = [0xef, 0xbb, 0xbf]; + /** + * @type {10} LF + */ + const LF = 0x0a; + /** + * @type {13} CR + */ + const CR = 0x0d; + /** + * @type {58} COLON + */ + const COLON = 0x3a; + /** + * @type {32} SPACE + */ + const SPACE = 0x20; + + /** + * @typedef {object} EventSourceStreamEvent + * @type {object} + * @property {string} [event] The event type. + * @property {string} [data] The data of the message. + * @property {string} [id] A unique ID for the event. + * @property {string} [retry] The reconnection time, in milliseconds. + */ + + /** + * @typedef eventSourceSettings + * @type {object} + * @property {string} lastEventId The last event ID received from the server. + * @property {string} origin The origin of the event source. + * @property {number} reconnectionTime The reconnection time, in milliseconds. + */ + + class EventSourceStream extends Transform { + /** + * @type {eventSourceSettings} + */ + state = null; + + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + + /** + * @type {boolean} + */ + crlfCheck = false; + + /** + * @type {boolean} + */ + eventEndCheck = false; + + /** + * @type {Buffer} + */ + buffer = null; + + pos = 0; + + event = { + data: undefined, + event: undefined, + id: undefined, + retry: undefined, + }; + + /** + * @param {object} options + * @param {eventSourceSettings} options.eventSourceSettings + * @param {Function} [options.push] + */ + constructor(options = {}) { + // Enable object mode as EventSourceStream emits objects of shape + // EventSourceStreamEvent + options.readableObjectMode = true; + + super(options); + + this.state = options.eventSourceSettings || {}; + if (options.push) { + this.push = options.push; + } + } + + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + + // Cache the chunk in the buffer, as the data might not be complete while + // processing it + // TODO: Investigate if there is a more performant way to handle + // incoming chunks + // see: https://github.com/nodejs/undici/issues/2630 + if (this.buffer) { + this.buffer = Buffer.concat([this.buffer, chunk]); + } else { + this.buffer = chunk; + } + + // Strip leading byte-order-mark if we opened the stream and started + // the processing of the incoming data + if (this.checkBOM) { + switch (this.buffer.length) { + case 1: + // Check if the first byte is the same as the first byte of the BOM + if (this.buffer[0] === BOM[0]) { + // If it is, we need to wait for more data + callback(); + return; + } + // Set the checkBOM flag to false as we don't need to check for the + // BOM anymore + this.checkBOM = false; + + // The buffer only contains one byte so we need to wait for more data + callback(); + return; + case 2: + // Check if the first two bytes are the same as the first two bytes + // of the BOM + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + // If it is, we need to wait for more data, because the third byte + // is needed to determine if it is the BOM or not + callback(); + return; + } + + // Set the checkBOM flag to false as we don't need to check for the + // BOM anymore + this.checkBOM = false; + break; + case 3: + // Check if the first three bytes are the same as the first three + // bytes of the BOM + if ( + this.buffer[0] === BOM[0] && + this.buffer[1] === BOM[1] && + this.buffer[2] === BOM[2] + ) { + // If it is, we can drop the buffered data, as it is only the BOM + this.buffer = Buffer.alloc(0); + // Set the checkBOM flag to false as we don't need to check for the + // BOM anymore + this.checkBOM = false; + + // Await more data + callback(); + return; + } + // If it is not the BOM, we can start processing the data + this.checkBOM = false; + break; + default: + // The buffer is longer than 3 bytes, so we can drop the BOM if it is + // present + if ( + this.buffer[0] === BOM[0] && + this.buffer[1] === BOM[1] && + this.buffer[2] === BOM[2] + ) { + // Remove the BOM from the buffer + this.buffer = this.buffer.subarray(3); + } + + // Set the checkBOM flag to false as we don't need to check for the + this.checkBOM = false; + break; + } + } + + while (this.pos < this.buffer.length) { + // If the previous line ended with an end-of-line, we need to check + // if the next character is also an end-of-line. + if (this.eventEndCheck) { + // If the the current character is an end-of-line, then the event + // is finished and we can process it + + // If the previous line ended with a carriage return, we need to + // check if the current character is a line feed and remove it + // from the buffer. + if (this.crlfCheck) { + // If the current character is a line feed, we can remove it + // from the buffer and reset the crlfCheck flag + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + + // It is possible that the line feed is not the end of the + // event. We need to check if the next character is an + // end-of-line character to determine if the event is + // finished. We simply continue the loop to check the next + // character. + + // As we removed the line feed from the buffer and set the + // crlfCheck flag to false, we basically don't make any + // distinction between a line feed and a carriage return. + continue; + } + this.crlfCheck = false; + } + + if ( + this.buffer[this.pos] === LF || + this.buffer[this.pos] === CR + ) { + // If the current character is a carriage return, we need to + // set the crlfCheck flag to true, as we need to check if the + // next character is a line feed so we can remove it from the + // buffer + if (this.buffer[this.pos] === CR) { + this.crlfCheck = true; + } + + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if ( + this.event.data !== undefined || + this.event.event || + this.event.id || + this.event.retry + ) { + this.processEvent(this.event); + } + this.clearEvent(); + continue; + } + // If the current character is not an end-of-line, then the event + // is not finished and we have to reset the eventEndCheck flag + this.eventEndCheck = false; + continue; + } + + // If the current character is an end-of-line, we can process the + // line + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + // If the current character is a carriage return, we need to + // set the crlfCheck flag to true, as we need to check if the + // next character is a line feed + if (this.buffer[this.pos] === CR) { + this.crlfCheck = true; + } + + // In any case, we can process the line as we reached an + // end-of-line character + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + + // Remove the processed line from the buffer + this.buffer = this.buffer.subarray(this.pos + 1); + // Reset the position as we removed the processed line from the buffer + this.pos = 0; + // A line was processed and this could be the end of the event. We need + // to check if the next line is empty to determine if the event is + // finished. + this.eventEndCheck = true; + continue; + } + + this.pos++; + } + + callback(); + } + + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + // If the line is empty (a blank line) + // Dispatch the event, as defined below. + // This will be handled in the _transform method + if (line.length === 0) { + return; + } + + // If the line starts with a U+003A COLON character (:) + // Ignore the line. + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) { + return; + } + + let field = ""; + let value = ""; + + // If the line contains a U+003A COLON character (:) + if (colonPosition !== -1) { + // Collect the characters on the line before the first U+003A COLON + // character (:), and let field be that string. + // TODO: Investigate if there is a more performant way to extract the + // field + // see: https://github.com/nodejs/undici/issues/2630 + field = line.subarray(0, colonPosition).toString("utf8"); + + // Collect the characters on the line after the first U+003A COLON + // character (:), and let value be that string. + // If value starts with a U+0020 SPACE character, remove it from value. + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) { + ++valueStart; + } + // TODO: Investigate if there is a more performant way to extract the + // value + // see: https://github.com/nodejs/undici/issues/2630 + value = line.subarray(valueStart).toString("utf8"); + + // Otherwise, the string is not empty but does not contain a U+003A COLON + // character (:) + } else { + // Process the field using the steps described below, using the whole + // line as the field name, and the empty string as the field value. + field = line.toString("utf8"); + value = ""; + } + + // Modify the event with the field name and value. The value is also + // decoded as UTF-8 + switch (field) { + case "data": + if (event[field] === undefined) { + event[field] = value; + } else { + event[field] += `\n${value}`; + } + break; + case "retry": + if (isASCIINumber(value)) { + event[field] = value; + } + break; + case "id": + if (isValidLastEventId(value)) { + event[field] = value; + } + break; + case "event": + if (value.length > 0) { + event[field] = value; + } + break; + } + } + + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) { + this.state.reconnectionTime = parseInt(event.retry, 10); + } + + if (event.id && isValidLastEventId(event.id)) { + this.state.lastEventId = event.id; + } + + // only dispatch event, when data is provided + if (event.data !== undefined) { + this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin, + }, + }); + } + } + + clearEvent() { + this.event = { + data: undefined, + event: undefined, + id: undefined, + retry: undefined, + }; + } + } + + module.exports = { + EventSourceStream, + }; + + /***/ + }, + + /***/ 1238: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { pipeline } = __nccwpck_require__(7075); + const { fetching } = __nccwpck_require__(4398); + const { makeRequest } = __nccwpck_require__(9967); + const { webidl } = __nccwpck_require__(5893); + const { EventSourceStream } = __nccwpck_require__(4031); + const { parseMIMEType } = __nccwpck_require__(1900); + const { createFastMessageEvent } = __nccwpck_require__(5188); + const { isNetworkError } = __nccwpck_require__(9051); + const { delay } = __nccwpck_require__(4811); + const { kEnumerableProperty } = __nccwpck_require__(3440); + const { environmentSettingsObject } = __nccwpck_require__(3168); + + let experimentalWarned = false; + + /** + * A reconnection time, in milliseconds. This must initially be an implementation-defined value, + * probably in the region of a few seconds. + * + * In Comparison: + * - Chrome uses 3000ms. + * - Deno uses 5000ms. + * + * @type {3000} + */ + const defaultReconnectionTime = 3000; + + /** + * The readyState attribute represents the state of the connection. + * @enum + * @readonly + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev + */ + + /** + * The connection has not yet been established, or it was closed and the user + * agent is reconnecting. + * @type {0} + */ + const CONNECTING = 0; + + /** + * The user agent has an open connection and is dispatching events as it + * receives them. + * @type {1} + */ + const OPEN = 1; + + /** + * The connection is not open, and the user agent is not trying to reconnect. + * @type {2} + */ + const CLOSED = 2; + + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". + * @type {'anonymous'} + */ + const ANONYMOUS = "anonymous"; + + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". + * @type {'use-credentials'} + */ + const USE_CREDENTIALS = "use-credentials"; + + /** + * The EventSource interface is used to receive server-sent events. It + * connects to a server over HTTP and receives events in text/event-stream + * format without closing the connection. + * @extends {EventTarget} + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events + * @api public + */ + class EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null, + }; + + #url = null; + #withCredentials = false; + + #readyState = CONNECTING; + + #request = null; + #controller = null; + + #dispatcher; + + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + // 1. Let ev be a new EventSource object. + super(); + + webidl.util.markAsUncloneable(this); + + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning( + "EventSource is experimental, expect them to change at any time.", + { + code: "UNDICI-ES", + }, + ); + } + + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict( + eventSourceInitDict, + prefix, + "eventSourceInitDict", + ); + + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime, + }; + + // 2. Let settings be ev's relevant settings object. + // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object + const settings = environmentSettingsObject; + + let urlRecord; + + try { + // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, "SyntaxError"); + } + + // 5. Set ev's url to urlRecord. + this.#url = urlRecord.href; + + // 6. Let corsAttributeState be Anonymous. + let corsAttributeState = ANONYMOUS; + + // 7. If the value of eventSourceInitDict's withCredentials member is true, + // then set corsAttributeState to Use Credentials and set ev's + // withCredentials attribute to true. + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + + // 8. Let request be the result of creating a potential-CORS request given + // urlRecord, the empty string, and corsAttributeState. + const initRequest = { + redirect: "follow", + keepalive: true, + // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes + mode: "cors", + credentials: + corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer", + }; + + // 9. Set request's client to settings. + initRequest.client = environmentSettingsObject.settingsObject; + + // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. + initRequest.headersList = [ + ["accept", { name: "accept", value: "text/event-stream" }], + ]; + + // 11. Set request's cache mode to "no-store". + initRequest.cache = "no-store"; + + // 12. Set request's initiator type to "other". + initRequest.initiator = "other"; + + initRequest.urlList = [new URL(this.#url)]; + + // 13. Set ev's request to request. + this.#request = makeRequest(initRequest); + + this.#connect(); + } + + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; + } + + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + + #connect() { + if (this.#readyState === CLOSED) return; + + this.#readyState = CONNECTING; + + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher, + }; + + // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. + const processEventSourceEndOfBody = (response) => { + if (isNetworkError(response)) { + this.dispatchEvent(new Event("error")); + this.close(); + } + + this.#reconnect(); + }; + + // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + + // and processResponse set to the following steps given response res: + fetchParams.processResponse = (response) => { + // 1. If res is an aborted network error, then fail the connection. + + if (isNetworkError(response)) { + // 1. When a user agent is to fail the connection, the user agent + // must queue a task which, if the readyState attribute is set to a + // value other than CLOSED, sets the readyState attribute to CLOSED + // and fires an event named error at the EventSource object. Once the + // user agent has failed the connection, it does not attempt to + // reconnect. + if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + // 2. Otherwise, if res is a network error, then reestablish the + // connection, unless the user agent knows that to be futile, in + // which case the user agent may fail the connection. + } else { + this.#reconnect(); + return; + } + } + + // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` + // is not `text/event-stream`, then fail the connection. + const contentType = response.headersList.get("content-type", true); + const mimeType = + contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = + mimeType !== "failure" && + mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + + // 4. Otherwise, announce the connection and interpret res's body + // line by line. + + // When a user agent is to announce the connection, the user agent + // must queue a task which, if the readyState attribute is set to a + // value other than CLOSED, sets the readyState attribute to OPEN + // and fires an event named open at the EventSource object. + // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + + // If redirected to a different origin, set the origin to the new origin. + this.#state.origin = + response.urlList[response.urlList.length - 1].origin; + + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent( + createFastMessageEvent(event.type, event.options), + ); + }, + }); + + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + }); + }; + + this.#controller = fetching(fetchParams); + } + + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + // When a user agent is to reestablish the connection, the user agent must + // run the following steps. These steps are run in parallel, not as part of + // a task. (The tasks that it queues, of course, are run like normal tasks + // and not themselves in parallel.) + + // 1. Queue a task to run the following steps: + + // 1. If the readyState attribute is set to CLOSED, abort the task. + if (this.#readyState === CLOSED) return; + + // 2. Set the readyState attribute to CONNECTING. + this.#readyState = CONNECTING; + + // 3. Fire an event named error at the EventSource object. + this.dispatchEvent(new Event("error")); + + // 2. Wait a delay equal to the reconnection time of the event source. + await delay(this.#state.reconnectionTime); + + // 5. Queue a task to run the following steps: + + // 1. If the EventSource object's readyState attribute is not set to + // CONNECTING, then return. + if (this.#readyState !== CONNECTING) return; + + // 2. Let request be the EventSource object's request. + // 3. If the EventSource object's last event ID string is not the empty + // string, then: + // 1. Let lastEventIDValue be the EventSource object's last event ID + // string, encoded as UTF-8. + // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header + // list. + if (this.#state.lastEventId.length) { + this.#request.headersList.set( + "last-event-id", + this.#state.lastEventId, + true, + ); + } + + // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. + this.#connect(); + } + + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, EventSource); + + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + + get onopen() { + return this.#events.open; + } + + set onopen(fn) { + 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 onmessage() { + return this.#events.message; + } + + set onmessage(fn) { + 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 onerror() { + return this.#events.error; + } + + set onerror(fn) { + 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; + } + } + } + + const constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false, + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false, + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false, + }, + }; + + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties( + EventSource.prototype, + constantsPropertyDescriptors, + ); + + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty, + }); + + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ + { + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false, + }, + { + key: "dispatcher", // undici only + converter: webidl.converters.any, + }, + ]); + + module.exports = { + EventSource, + defaultReconnectionTime, + }; + + /***/ + }, + + /***/ 4811: /***/ (module) => { + "use strict"; + + /** + * Checks if the given value is a valid LastEventId. + * @param {string} value + * @returns {boolean} + */ + function isValidLastEventId(value) { + // LastEventId should not contain U+0000 NULL + return value.indexOf("\u0000") === -1; + } + + /** + * Checks if the given value is a base 10 digit. + * @param {string} value + * @returns {boolean} + */ + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) { + if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) + return false; + } + return true; + } + + // https://github.com/nodejs/undici/issues/2664 + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms).unref(); + }); + } + + module.exports = { + isValidLastEventId, + isASCIINumber, + delay, + }; + + /***/ + }, + + /***/ 4492: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const util = __nccwpck_require__(3440); + const { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody, + extractMimeType, + utf8DecodeBytes, + } = __nccwpck_require__(3168); + const { FormData } = __nccwpck_require__(5910); + const { kState } = __nccwpck_require__(3627); + const { webidl } = __nccwpck_require__(5893); + const { Blob } = __nccwpck_require__(4573); + const assert = __nccwpck_require__(4589); + const { isErrored, isDisturbed } = __nccwpck_require__(7075); + const { isArrayBuffer } = __nccwpck_require__(3429); + const { serializeAMimeType } = __nccwpck_require__(1900); + const { multipartFormDataParser } = __nccwpck_require__(116); + let random; + + try { + const crypto = __nccwpck_require__(7598); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + + const textEncoder = new TextEncoder(); + function noop() {} + + const hasFinalizationRegistry = + globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + let streamRegistry; + + if (hasFinalizationRegistry) { + streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if ( + stream && + !stream.locked && + !isDisturbed(stream) && + !isErrored(stream) + ) { + stream + .cancel("Response object has been garbage collected") + .catch(noop); + } + }); + } + + // https://fetch.spec.whatwg.org/#concept-bodyinit-extract + function extractBody(object, keepalive = false) { + // 1. Let stream be null. + let stream = null; + + // 2. If object is a ReadableStream object, then set stream to object. + if (object instanceof ReadableStream) { + stream = object; + } else if (isBlobLike(object)) { + // 3. Otherwise, if object is a Blob object, set stream to the + // result of running object’s get stream. + stream = object.stream(); + } else { + // 4. Otherwise, set stream to a new ReadableStream object, and set + // up stream with byte reading support. + stream = new ReadableStream({ + async pull(controller) { + const buffer = + typeof source === "string" + ? textEncoder.encode(source) + : source; + + if (buffer.byteLength) { + controller.enqueue(buffer); + } + + queueMicrotask(() => readableStreamClose(controller)); + }, + start() {}, + type: "bytes", + }); + } + + // 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${`${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; + } + } + } + + // CRLF is appended to the body to function with legacy servers and match other implementations. + // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 + // https://github.com/form-data/form-data/issues/63 + const chunk = textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) { + length = null; + } + + // Set source to object. + source = object; + + action = async function* () { + for (const part of blobParts) { + if (part.stream) { + yield* part.stream(); + } else { + yield part; + } + } + }; + + // Set type to `multipart/form-data; boundary=`, + // followed by the multipart/form-data boundary string generated + // by the multipart/form-data encoding algorithm. + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + // Blob + + // Set source to object. + source = object; + + // Set length to object’s size. + length = object.size; + + // If object’s type attribute is not the empty byte sequence, set + // type to its value. + if (object.type) { + type = object.type; + } + } else if (typeof object[Symbol.asyncIterator] === "function") { + // If keepalive is true, then throw a TypeError. + if (keepalive) { + throw new TypeError("keepalive"); + } + + // If object is disturbed or locked, then throw a TypeError. + if (util.isDisturbed(object) || object.locked) { + throw new TypeError( + "Response body object should not be disturbed or locked", + ); + } + + 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); + } + + // 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(); + controller.byobRequest?.respond(0); + }); + } else { + // Whenever one or more bytes are available and stream is not errored, + // enqueue a Uint8Array wrapping an ArrayBuffer containing the available + // bytes into stream. + if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) { + controller.enqueue(buffer); + } + } + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes", + }); + } + + // 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) { + // 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."); + } + + // 2. Return the results of extracting object. + return extractBody(object, keepalive); + } + + function cloneBody(instance, body) { + // To clone a body body, run these steps: + + // https://fetch.spec.whatwg.org/#concept-body-clone + + // 1. Let « out1, out2 » be the result of teeing body’s stream. + const [out1, out2] = body.stream.tee(); + + // 2. Set body’s stream to out1. + body.stream = out1; + + // 3. Return a body whose stream is out2 and other members are copied from body. + return { + stream: out2, + length: body.length, + source: body.source, + }; + } + + function throwIfAborted(state) { + if (state.aborted) { + throw new DOMException("The operation was aborted.", "AbortError"); + } + } + + 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 consumeBody( + this, + (bytes) => { + let mimeType = bodyMimeType(this); + + if (mimeType === null) { + mimeType = ""; + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType); + } + + // 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 consumeBody( + this, + (bytes) => { + return new Uint8Array(bytes).buffer; + }, + instance, + ); + }, + + text() { + // The text() method steps are to return the result of running + // consume body with this and UTF-8 decode. + return consumeBody(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 consumeBody(this, parseJSONFromBytes, instance); + }, + + formData() { + // The formData() method steps are to return the result of running + // consume body with this and the following step given a byte sequence bytes: + return consumeBody( + this, + (value) => { + // 1. Let mimeType be the result of get the MIME type with this. + const mimeType = bodyMimeType(this); + + // 2. If mimeType is non-null, then switch on mimeType’s essence and run + // the corresponding steps: + if (mimeType !== null) { + switch (mimeType.essence) { + case "multipart/form-data": { + // 1. ... [long step] + const parsed = multipartFormDataParser(value, mimeType); + + // 2. If that fails for some reason, then throw a TypeError. + if (parsed === "failure") { + throw new TypeError( + "Failed to parse body as FormData.", + ); + } + + // 3. Return a new FormData object, appending each entry, + // resulting from the parsing operation, to its entry list. + const fd = new FormData(); + fd[kState] = parsed; + + return fd; + } + case "application/x-www-form-urlencoded": { + // 1. Let entries be the result of parsing bytes. + const entries = new URLSearchParams(value.toString()); + + // 2. If entries is failure, then throw a TypeError. + + // 3. Return a new FormData object whose entry list is entries. + const fd = new FormData(); + + for (const [name, value] of entries) { + fd.append(name, value); + } + + return fd; + } + } + } + + // 3. Throw a TypeError. + throw new TypeError( + 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".', + ); + }, + instance, + ); + }, + + bytes() { + // The bytes() method steps are to return the result of running consume body + // with this and the following step given a byte sequence bytes: return the + // result of creating a Uint8Array from bytes in this’s relevant realm. + return consumeBody( + this, + (bytes) => { + return new Uint8Array(bytes); + }, + instance, + ); + }, + }; + + 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 consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + + // 1. If object is unusable, then return a promise rejected + // with a TypeError. + if (bodyUnusable(object)) { + throw new TypeError("Body is unusable: Body has already been read"); + } + + throwIfAborted(object[kState]); + + // 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); + } + }; + + // 5. If object’s body is null, then run successSteps with an + // empty byte sequence. + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + 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(object) { + const body = object[kState].body; + + // An object including the Body interface mixin is + // said to be unusable if its body is non-null and + // its body’s stream is disturbed or locked. + return ( + body != null && (body.stream.locked || util.isDisturbed(body.stream)) + ); + } + + /** + * @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} requestOrResponse + */ + function bodyMimeType(requestOrResponse) { + // 1. Let headers be null. + // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. + // 3. Otherwise, set headers to requestOrResponse’s response’s header list. + /** @type {import('./headers').HeadersList} */ + const headers = requestOrResponse[kState].headersList; + + // 4. Let mimeType be the result of extracting a MIME type from headers. + const mimeType = extractMimeType(headers); + + // 5. If mimeType is failure, then return null. + if (mimeType === "failure") { + return null; + } + + // 6. Return mimeType. + return mimeType; + } + + module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable, + }; + + /***/ + }, + + /***/ 4495: /***/ (module) => { + "use strict"; + + const corsSafeListedMethods = /** @type {const} */ ([ + "GET", + "HEAD", + "POST", + ]); + const corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + + const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]); + + const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]); + const redirectStatusSet = new Set(redirectStatus); + + /** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ + const badPorts = /** @type {const} */ ([ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080", + ]); + const badPortsSet = new Set(badPorts); + + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ + const referrerPolicy = /** @type {const} */ ([ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ]); + const referrerPolicySet = new Set(referrerPolicy); + + const requestRedirect = /** @type {const} */ ([ + "follow", + "manual", + "error", + ]); + + const safeMethods = /** @type {const} */ ([ + "GET", + "HEAD", + "OPTIONS", + "TRACE", + ]); + const safeMethodsSet = new Set(safeMethods); + + const requestMode = /** @type {const} */ ([ + "navigate", + "same-origin", + "no-cors", + "cors", + ]); + + const requestCredentials = /** @type {const} */ ([ + "omit", + "same-origin", + "include", + ]); + + const requestCache = /** @type {const} */ ([ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached", + ]); + + /** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ + const requestBodyHeader = /** @type {const} */ ([ + "content-encoding", + "content-language", + "content-location", + "content-type", + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + "content-length", + ]); + + /** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ + const requestDuplex = /** @type {const} */ (["half"]); + + /** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ + const forbiddenMethods = /** @type {const} */ ([ + "CONNECT", + "TRACE", + "TRACK", + ]); + const forbiddenMethodsSet = new Set(forbiddenMethods); + + const subresource = /** @type {const} */ ([ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "", + ]); + const subresourceSet = new Set(subresource); + + module.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet, + }; + + /***/ + }, + + /***/ 1900: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const assert = __nccwpck_require__(4589); + + 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 + const ASCII_WHITESPACE_REPLACE_REGEX = + /[\u0009\u000A\u000C\u000D\u0020]/g; // eslint-disable-line + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const 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"; + } + + // 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); + } + + // 12. If mimeType starts with U+003B (;), then prepend + // "text/plain" to mimeType. + if (mimeType.startsWith(";")) { + mimeType = "text/plain" + mimeType; + } + + // 13. Let mimeTypeRecord be the result of parsing + // mimeType. + let mimeTypeRecord = 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"); + } + + // 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; + } + + const href = url.href; + const hashLength = url.hash.length; + + const serialized = + hashLength === 0 ? href : href.substring(0, href.length - hashLength); + + if (!hashLength && href.endsWith("#")) { + return serialized.slice(0, -1); + } + + return serialized; + } + + // 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++; + } + + // 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); + } + + 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); + } + + /** + * @param {number} byte + */ + function isHexCharByte(byte) { + // 0-9 A-F a-f + return ( + (byte >= 0x30 && byte <= 0x39) || + (byte >= 0x41 && byte <= 0x46) || + (byte >= 0x61 && byte <= 0x66) + ); + } + + /** + * @param {number} byte + */ + function hexByteToNumber(byte) { + return ( + // 0-9 + byte >= 0x30 && byte <= 0x39 + ? byte - 48 + : // Convert to uppercase + // ((byte & 0xDF) - 65) + 10 + (byte & 0xdf) - 55 + ); + } + + // https://url.spec.whatwg.org/#percent-decode + /** @param {Uint8Array} input */ + function percentDecode(input) { + const length = input.length; + // 1. Let output be an empty byte sequence. + /** @type {Uint8Array} */ + const output = new Uint8Array(length); + let j = 0; + // 2. For each byte byte in input: + for (let i = 0; i < length; ++i) { + const byte = input[i]; + + // 1. If byte is not 0x25 (%), then append byte to output. + if (byte !== 0x25) { + output[j++] = byte; + + // 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 && + !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) + ) { + output[j++] = 0x25; + + // 3. Otherwise: + } else { + // 1. Let bytePoint be the two bytes after byte in input, + // decoded, and then interpreted as hexadecimal number. + // 2. Append a byte whose value is bytePoint to output. + output[j++] = + (hexByteToNumber(input[i + 1]) << 4) | + hexByteToNumber(input[i + 2]); + + // 3. Skip the next two bytes in input. + i += 2; + } + } + + // 3. Return output. + return length === j ? output : output.subarray(0, j); + } + + // 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; + } + + // 2. Advance position by 1. (This skips past U+003D (=).) + position.position++; + } + + // 6. If position is past the end of input, then break. + if (position.position > input.length) { + break; + } + + // 7. Let parameterValue be null. + let parameterValue = null; + + // 8. If the code point at position within input is + // U+0022 ("), then: + if (input[position.position] === '"') { + // 1. Set parameterValue to the result of collecting + // an HTTP quoted string from input, given position + // and the extract-value flag. + parameterValue = 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: + } 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; + } + } + + // 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); + } + } + + // 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(ASCII_WHITESPACE_REPLACE_REGEX, ""); // eslint-disable-line + + let dataLength = data.length; + // 2. If data’s code point length divides by 4 leaving + // no remainder, then: + if (dataLength % 4 === 0) { + // 1. If data ends with one or two U+003D (=) code points, + // then remove them from data. + if (data.charCodeAt(dataLength - 1) === 0x003d) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 0x003d) { + --dataLength; + } + } + } + + // 3. If data’s code point length divides by 4 leaving + // a remainder of 1, then return failure. + if (dataLength % 4 === 1) { + return "failure"; + } + + // 4. If data contains a code point that is not one of + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // then return failure. + if ( + /[^+/0-9A-Za-z]/.test( + data.length === dataLength ? data : data.substring(0, dataLength), + ) + ) { + return "failure"; + } + + const buffer = Buffer.from(data, "base64"); + return new Uint8Array( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength, + ); + } + + // 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; + } + + // 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 occurrence of U+0022 (") or + // U+005C (\) in value with U+005C (\). + value = value.replace(/(\\|")/g, "\\$1"); + + // 2. Prepend U+0022 (") to value. + value = '"' + value; + + // 3. Append U+0022 (") to value. + value += '"'; + } + + // 5. Append value to serialization. + serialization += value; + } + + // 3. Return serialization. + return serialization; + } + + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ + function isHTTPWhiteSpace(char) { + // "\r\n\t " + return ( + char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 + ); + } + + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ + function isASCIIWhitespace(char) { + // "\r\n\t\f " + return ( + char === 0x00d || + char === 0x00a || + char === 0x009 || + char === 0x00c || + char === 0x020 + ); + } + + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + + /** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + + if (leading) { + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + } + + if (trailing) { + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + } + + return lead === 0 && trail === str.length - 1 + ? str + : str.slice(lead, trail + 1); + } + + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ + function isomorphicDecode(input) { + // 1. To isomorphic decode a byte sequence input, return a string whose code point + // length is equal to input’s length and whose code points have the same values + // as the values of input’s bytes, in the same order. + const length = input.length; + if ((2 << 15) - 1 > length) { + return String.fromCharCode.apply(null, input); + } + let result = ""; + let i = 0; + let addition = (2 << 15) - 1; + while (i < length) { + if (i + addition > length) { + addition = length - i; + } + result += String.fromCharCode.apply( + null, + input.subarray(i, (i += addition)), + ); + } + return result; + } + + /** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": + // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". + return "text/javascript"; + case "application/json": + case "text/json": + // 2. If mimeType is a JSON MIME type, then return "application/json". + return "application/json"; + case "image/svg+xml": + // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". + return "image/svg+xml"; + case "text/xml": + case "application/xml": + // 4. If mimeType is an XML MIME type, then return "application/xml". + return "application/xml"; + } + + // 2. If mimeType is a JSON MIME type, then return "application/json". + if (mimeType.subtype.endsWith("+json")) { + return "application/json"; + } + + // 4. If mimeType is an XML MIME type, then return "application/xml". + if (mimeType.subtype.endsWith("+xml")) { + return "application/xml"; + } + + // 5. If mimeType is supported by the user agent, then return mimeType’s essence. + // Technically, node doesn't support any mimetypes. + + // 6. Return the empty string. + return ""; + } + + module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode, + }; + + /***/ + }, + + /***/ 6653: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { kConnected, kSize } = __nccwpck_require__(6443); + + 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); + } + }); + } + } + + unregister(key) {} + } + + module.exports = function () { + // FIXME: remove workaround when the Node bug is backported to v18 + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { + process._rawDebug( + "Using compatibility WeakRef and FinalizationRegistry", + ); + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer, + }; + } + return { WeakRef, FinalizationRegistry }; + }; + + /***/ + }, + + /***/ 7114: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { Blob, File } = __nccwpck_require__(4573); + const { kState } = __nccwpck_require__(3627); + const { webidl } = __nccwpck_require__(5893); + + // TODO(@KhafraDev): remove + 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, + }; + } + + 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"; + } + } + + webidl.converters.Blob = webidl.interfaceConverter(Blob); + + // If this function is moved to ./util.js, some tools (such as + // rollup) will warn about circular dependencies. See: + // https://github.com/nodejs/undici/issues/1629 + function isFileLike(object) { + return ( + object instanceof File || + (object && + (typeof object.stream === "function" || + typeof object.arrayBuffer === "function") && + object[Symbol.toStringTag] === "File") + ); + } + + module.exports = { FileLike, isFileLike }; + + /***/ + }, + + /***/ 116: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { isUSVString, bufferToLowerCasedHeaderName } = + __nccwpck_require__(3440); + const { utf8DecodeBytes } = __nccwpck_require__(3168); + const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = + __nccwpck_require__(1900); + const { isFileLike } = __nccwpck_require__(7114); + const { makeEntry } = __nccwpck_require__(5910); + const assert = __nccwpck_require__(4589); + const { File: NodeFile } = __nccwpck_require__(4573); + + const File = globalThis.File ?? NodeFile; + + const formDataNameBuffer = Buffer.from('form-data; name="'); + const filenameBuffer = Buffer.from("; filename"); + const dd = Buffer.from("--"); + const ddcrlf = Buffer.from("--\r\n"); + + /** + * @param {string} chars + */ + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) { + if ((chars.charCodeAt(i) & ~0x7f) !== 0) { + return false; + } + } + return true; + } + + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ + function validateBoundary(boundary) { + const length = boundary.length; + + // - its length is greater or equal to 27 and lesser or equal to 70, and + if (length < 27 || length > 70) { + return false; + } + + // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or + // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), + // 0x2D (-) or 0x5F (_). + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + + if ( + !( + (cp >= 0x30 && cp <= 0x39) || + (cp >= 0x41 && cp <= 0x5a) || + (cp >= 0x61 && cp <= 0x7a) || + cp === 0x27 || + cp === 0x2d || + cp === 0x5f + ) + ) { + return false; + } + } + + return true; + } + + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ + function multipartFormDataParser(input, mimeType) { + // 1. Assert: mimeType’s essence is "multipart/form-data". + assert( + mimeType !== "failure" && mimeType.essence === "multipart/form-data", + ); + + const boundaryString = mimeType.parameters.get("boundary"); + + // 2. If mimeType’s parameters["boundary"] does not exist, return failure. + // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s + // parameters["boundary"]. + if (boundaryString === undefined) { + return "failure"; + } + + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + + // 3. Let entry list be an empty entry list. + const entryList = []; + + // 4. Let position be a pointer to a byte in input, initially pointing at + // the first byte. + const position = { position: 0 }; + + // Note: undici addition, allows leading and trailing CRLFs. + while ( + input[position.position] === 0x0d && + input[position.position + 1] === 0x0a + ) { + position.position += 2; + } + + let trailing = input.length; + + while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { + trailing -= 2; + } + + if (trailing !== input.length) { + input = input.subarray(0, trailing); + } + + // 5. While true: + while (true) { + // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D + // (`--`) followed by boundary, advance position by 2 + the length of + // boundary. Otherwise, return failure. + // Note: boundary is padded with 2 dashes already, no need to add 2. + if ( + input + .subarray(position.position, position.position + boundary.length) + .equals(boundary) + ) { + position.position += boundary.length; + } else { + return "failure"; + } + + // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A + // (`--` followed by CR LF) followed by the end of input, return entry list. + // Note: a body does NOT need to end with CRLF. It can end with --. + if ( + (position.position === input.length - 2 && + bufferStartsWith(input, dd, position)) || + (position.position === input.length - 4 && + bufferStartsWith(input, ddcrlf, position)) + ) { + return entryList; + } + + // 5.3. If position does not point to a sequence of bytes starting with 0x0D + // 0x0A (CR LF), return failure. + if ( + input[position.position] !== 0x0d || + input[position.position + 1] !== 0x0a + ) { + return "failure"; + } + + // 5.4. Advance position by 2. (This skips past the newline.) + position.position += 2; + + // 5.5. Let name, filename and contentType be the result of parsing + // multipart/form-data headers on input and position, if the result + // is not failure. Otherwise, return failure. + const result = parseMultipartFormDataHeaders(input, position); + + if (result === "failure") { + return "failure"; + } + + let { name, filename, contentType, encoding } = result; + + // 5.6. Advance position by 2. (This skips past the empty line that marks + // the end of the headers.) + position.position += 2; + + // 5.7. Let body be the empty byte sequence. + let body; + + // 5.8. Body loop: While position is not past the end of input: + // TODO: the steps here are completely wrong + { + const boundaryIndex = input.indexOf( + boundary.subarray(2), + position.position, + ); + + if (boundaryIndex === -1) { + return "failure"; + } + + body = input.subarray(position.position, boundaryIndex - 4); + + position.position += body.length; + + // Note: position must be advanced by the body's length before being + // decoded, otherwise the parsing will fail. + if (encoding === "base64") { + body = Buffer.from(body.toString(), "base64"); + } + } + + // 5.9. If position does not point to a sequence of bytes starting with + // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. + if ( + input[position.position] !== 0x0d || + input[position.position + 1] !== 0x0a + ) { + return "failure"; + } else { + position.position += 2; + } + + // 5.10. If filename is not null: + let value; + + if (filename !== null) { + // 5.10.1. If contentType is null, set contentType to "text/plain". + contentType ??= "text/plain"; + + // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. + + // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. + // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. + if (!isAsciiString(contentType)) { + contentType = ""; + } + + // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. + value = new File([body], filename, { type: contentType }); + } else { + // 5.11. Otherwise: + + // 5.11.1. Let value be the UTF-8 decoding without BOM of body. + value = utf8DecodeBytes(Buffer.from(body)); + } + + // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. + assert(isUSVString(name)); + assert( + (typeof value === "string" && isUSVString(value)) || + isFileLike(value), + ); + + // 5.13. Create an entry with name and value, and append it to entry list. + entryList.push(makeEntry(name, value, filename)); + } + } + + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataHeaders(input, position) { + // 1. Let name, filename and contentType be null. + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + + // 2. While true: + while (true) { + // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): + if ( + input[position.position] === 0x0d && + input[position.position + 1] === 0x0a + ) { + // 2.1.1. If name is null, return failure. + if (name === null) { + return "failure"; + } + + // 2.1.2. Return name, filename and contentType. + return { name, filename, contentType, encoding }; + } + + // 2.2. Let header name be the result of collecting a sequence of bytes that are + // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. + let headerName = collectASequenceOfBytes( + (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, + input, + position, + ); + + // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. + headerName = removeChars( + headerName, + true, + true, + (char) => char === 0x9 || char === 0x20, + ); + + // 2.4. If header name does not match the field-name token production, return failure. + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { + return "failure"; + } + + // 2.5. If the byte at position is not 0x3A (:), return failure. + if (input[position.position] !== 0x3a) { + return "failure"; + } + + // 2.6. Advance position by 1. + position.position++; + + // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. + // (Do nothing with those bytes.) + collectASequenceOfBytes( + (char) => char === 0x20 || char === 0x09, + input, + position, + ); + + // 2.8. Byte-lowercase header name and switch on the result: + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": { + // 1. Set name and filename to null. + name = filename = null; + + // 2. If position does not point to a sequence of bytes starting with + // `form-data; name="`, return failure. + if (!bufferStartsWith(input, formDataNameBuffer, position)) { + return "failure"; + } + + // 3. Advance position so it points at the byte after the next 0x22 (") + // byte (the one in the sequence of bytes matched above). + position.position += 17; + + // 4. Set name to the result of parsing a multipart/form-data name given + // input and position, if the result is not failure. Otherwise, return + // failure. + name = parseMultipartFormDataName(input, position); + + if (name === null) { + return "failure"; + } + + // 5. If position points to a sequence of bytes starting with `; filename="`: + if (bufferStartsWith(input, filenameBuffer, position)) { + // Note: undici also handles filename* + let check = position.position + filenameBuffer.length; + + if (input[check] === 0x2a) { + position.position += 1; + check += 1; + } + + if (input[check] !== 0x3d || input[check + 1] !== 0x22) { + // =" + return "failure"; + } + + // 1. Advance position so it points at the byte after the next 0x22 (") byte + // (the one in the sequence of bytes matched above). + position.position += 12; + + // 2. Set filename to the result of parsing a multipart/form-data name given + // input and position, if the result is not failure. Otherwise, return failure. + filename = parseMultipartFormDataName(input, position); + + if (filename === null) { + return "failure"; + } + } + + break; + } + case "content-type": { + // 1. Let header value be the result of collecting a sequence of bytes that are + // not 0x0A (LF) or 0x0D (CR), given position. + let headerValue = collectASequenceOfBytes( + (char) => char !== 0x0a && char !== 0x0d, + input, + position, + ); + + // 2. Remove any HTTP tab or space bytes from the end of header value. + headerValue = removeChars( + headerValue, + false, + true, + (char) => char === 0x9 || char === 0x20, + ); + + // 3. Set contentType to the isomorphic decoding of header value. + contentType = isomorphicDecode(headerValue); + + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes( + (char) => char !== 0x0a && char !== 0x0d, + input, + position, + ); + + headerValue = removeChars( + headerValue, + false, + true, + (char) => char === 0x9 || char === 0x20, + ); + + encoding = isomorphicDecode(headerValue); + + break; + } + default: { + // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. + // (Do nothing with those bytes.) + collectASequenceOfBytes( + (char) => char !== 0x0a && char !== 0x0d, + input, + position, + ); + } + } + + // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A + // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). + if ( + input[position.position] !== 0x0d && + input[position.position + 1] !== 0x0a + ) { + return "failure"; + } else { + position.position += 2; + } + } + } + + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataName(input, position) { + // 1. Assert: The byte at (position - 1) is 0x22 ("). + assert(input[position.position - 1] === 0x22); + + // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. + /** @type {string | Buffer} */ + let name = collectASequenceOfBytes( + (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, + input, + position, + ); + + // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. + if (input[position.position] !== 0x22) { + return null; // name could be 'failure' + } else { + position.position++; + } + + // 4. Replace any occurrence of the following subsequences in name with the given byte: + // - `%0A`: 0x0A (LF) + // - `%0D`: 0x0D (CR) + // - `%22`: 0x22 (") + name = new TextDecoder() + .decode(name) + .replace(/%0A/gi, "\n") + .replace(/%0D/gi, "\r") + .replace(/%22/g, '"'); + + // 5. Return the UTF-8 decoding without BOM of name. + return name; + } + + /** + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + + while (start < input.length && condition(input[start])) { + ++start; + } + + return input.subarray(position.position, (position.position = start)); + } + + /** + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + + if (leading) { + while (lead < buf.length && predicate(buf[lead])) lead++; + } + + if (trailing) { + while (trail > 0 && predicate(buf[trail])) trail--; + } + + return lead === 0 && trail === buf.length - 1 + ? buf + : buf.subarray(lead, trail + 1); + } + + /** + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) { + return false; + } + + for (let i = 0; i < start.length; i++) { + if (start[i] !== buffer[position.position + i]) { + return false; + } + } + + return true; + } + + module.exports = { + multipartFormDataParser, + validateBoundary, + }; + + /***/ + }, + + /***/ 5910: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { isBlobLike, iteratorMixin } = __nccwpck_require__(3168); + const { kState } = __nccwpck_require__(3627); + const { kEnumerableProperty } = __nccwpck_require__(3440); + const { FileLike, isFileLike } = __nccwpck_require__(7114); + const { webidl } = __nccwpck_require__(5893); + const { File: NativeFile } = __nccwpck_require__(4573); + const nodeUtil = __nccwpck_require__(7975); + + /** @type {globalThis['File']} */ + const File = globalThis.File ?? NativeFile; + + // https://xhr.spec.whatwg.org/#formdata + class FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + + if (form !== undefined) { + throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"], + }); + } + + this[kState] = []; + } + + append(name, value, filename = undefined) { + webidl.brandCheck(this, FormData); + + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'", + ); + } + + // 1. Let value be value if given; otherwise blobValue. + + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) + ? webidl.converters.Blob(value, prefix, "value", { strict: false }) + : webidl.converters.USVString(value, prefix, "value"); + filename = + arguments.length === 3 + ? webidl.converters.USVString(filename, prefix, "filename") + : undefined; + + // 2. Let entry be the result of creating an entry with + // name, value, and filename if given. + const entry = makeEntry(name, value, filename); + + // 3. Append entry to this’s entry list. + this[kState].push(entry); + } + + delete(name) { + webidl.brandCheck(this, FormData); + + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + name = webidl.converters.USVString(name, prefix, "name"); + + // The delete(name) method steps are to remove all entries whose name + // is name from this’s entry list. + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + + get(name) { + webidl.brandCheck(this, FormData); + + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + name = webidl.converters.USVString(name, prefix, "name"); + + // 1. If there is no entry whose name is name in this’s entry list, + // then return null. + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) { + return null; + } + + // 2. Return the value of the first entry whose name is name from + // this’s entry list. + return this[kState][idx].value; + } + + getAll(name) { + webidl.brandCheck(this, FormData); + + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + name = webidl.converters.USVString(name, prefix, "name"); + + // 1. If there is no entry whose name is name in this’s entry list, + // then return the empty list. + // 2. Return the values of all entries whose name is name, in order, + // from this’s entry list. + return this[kState] + .filter((entry) => entry.name === name) + .map((entry) => entry.value); + } + + has(name) { + webidl.brandCheck(this, FormData); + + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + name = webidl.converters.USVString(name, prefix, "name"); + + // The has(name) method steps are to return true if there is an entry + // whose name is name in this’s entry list; otherwise false. + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + + set(name, value, filename = undefined) { + webidl.brandCheck(this, FormData); + + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'", + ); + } + + // The set(name, value) and set(name, blobValue, filename) method steps + // are: + + // 1. Let value be value if given; otherwise blobValue. + + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) + ? webidl.converters.Blob(value, prefix, "name", { strict: false }) + : webidl.converters.USVString(value, prefix, "name"); + filename = + arguments.length === 3 + ? webidl.converters.USVString(filename, prefix, "name") + : undefined; + + // 2. Let entry be the result of creating an entry with name, value, and + // filename if given. + const entry = 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); + } + } + + [nodeUtil.inspect.custom](depth, options) { + const state = this[kState].reduce( + (a, b) => { + if (a[b.name]) { + if (Array.isArray(a[b.name])) { + a[b.name].push(b.value); + } else { + a[b.name] = [a[b.name], b.value]; + } + } else { + a[b.name] = b.value; + } + + return a; + }, + { __proto__: null }, + ); + + options.depth ??= depth; + options.colors ??= true; + + const output = nodeUtil.formatWithOptions(options, state); + + // remove [Object null prototype] + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + } + + iteratorMixin("FormData", FormData, kState, "name", "value"); + + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true, + }, + }); + + /** + * @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. + // Note: This operation was done by the webidl converter USVString. + + // 2. If value is a string, then set value to the result of converting + // value into a scalar value string. + if (typeof value === "string") { + // Note: This operation was done by the webidl converter USVString. + } 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 }); + } + + // 2. If filename is given, then set value to a new File object, + // representing the same bytes, whose name attribute is filename. + if (filename !== undefined) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified, + }; + + value = + value instanceof NativeFile + ? new File([value], filename, options) + : new FileLike(value, filename, options); + } + } + + // 4. Return an entry whose name is name and whose value is value. + return { name, value }; + } + + module.exports = { FormData, makeEntry }; + + /***/ + }, + + /***/ 1059: /***/ (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}`, + ); + } + + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false, + }); + } + + module.exports = { + getGlobalOrigin, + setGlobalOrigin, + }; + + /***/ + }, + + /***/ 660: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + // https://github.com/Ethan-Arrowood/undici-fetch + + const { kConstruct } = __nccwpck_require__(6443); + const { kEnumerableProperty } = __nccwpck_require__(3440); + const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = + __nccwpck_require__(3168); + const { webidl } = __nccwpck_require__(5893); + const assert = __nccwpck_require__(4589); + const util = __nccwpck_require__(7975); + + 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: + + // 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}.`, + }); + } + + // 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", + }); + } + + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO + // Note: undici does not implement forbidden header names + if (getHeadersGuard(headers) === "immutable") { + throw new TypeError("immutable"); + } + + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. + + // 7. Append (name, value) to headers’s header list. + return getHeadersList(headers).append(name, value, false); + + // 8. If headers’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from headers + } + + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + + 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; + } + } + + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + // A header list list contains a header name name if list + // contains a header whose name is a byte-case-insensitive + // match for name. + + return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); + } + + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + + // 1. If list contains name, then set name to the first such + // header’s name. + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[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 ??= []).push(value); + } + } + + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + + if (lowercaseName === "set-cookie") { + this.cookies = [value]; + } + + // 1. If list contains name, then set the value of + // the first such header to value and remove the + // others. + // 2. Otherwise, append header (name, value) to list. + this[kHeadersMap].set(lowercaseName, { name, value }); + } + + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this[kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + + if (name === "set-cookie") { + this.cookies = null; + } + + this[kHeadersMap].delete(name); + } + + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + // 1. If list does not contain name, then return null. + // 2. Return the values of all headers in list whose name + // is a byte-case-insensitive match for name, + // separated from each other by 0x2C 0x20, in order. + return ( + this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase()) + ?.value ?? null + ); + } + + *[Symbol.iterator]() { + // use the lowercased name + for (const { + 0: name, + 1: { value }, + } of this[kHeadersMap]) { + yield [name, value]; + } + } + + get entries() { + const headers = {}; + + if (this[kHeadersMap].size !== 0) { + for (const { name, value } of this[kHeadersMap].values()) { + headers[name] = value; + } + } + + return headers; + } + + rawValues() { + return this[kHeadersMap].values(); + } + + get entriesList() { + const headers = []; + + if (this[kHeadersMap].size !== 0) { + for (const { + 0: lowerName, + 1: { name, value }, + } of this[kHeadersMap]) { + if (lowerName === "set-cookie") { + for (const cookie of this.cookies) { + headers.push([name, cookie]); + } + } else { + headers.push([name, value]); + } + } + } + + return headers; + } + + // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set + toSortedArray() { + const size = this[kHeadersMap].size; + const array = new Array(size); + // In most cases, you will use the fast-path. + // fast-path: Use binary insertion sort for small arrays. + if (size <= 32) { + if (size === 0) { + // If empty, it is an empty array. To avoid the first index assignment. + return array; + } + // Improve performance by unrolling loop and avoiding double-loop. + // Double-loop-less version of the binary insertion sort. + const iterator = this[kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + // set [name, value] to first index. + array[0] = [firstValue[0], firstValue[1].value]; + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + // 3.2.2. Assert: value is non-null. + assert(firstValue[1].value !== null); + for ( + let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; + i < size; + ++i + ) { + // get next value + value = iterator.next().value; + // set [name, value] to current index. + x = array[i] = [value[0], value[1].value]; + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + // 3.2.2. Assert: value is non-null. + assert(x[1] !== null); + left = 0; + right = i; + // binary search + while (left < right) { + // middle index + pivot = left + ((right - left) >> 1); + // compare header name + if (array[pivot][0] <= x[0]) { + left = pivot + 1; + } else { + right = pivot; + } + } + if (i !== pivot) { + j = i; + while (j > left) { + array[j] = array[--j]; + } + array[left] = x; + } + } + /* c8 ignore next 4 */ + if (!iterator.next().done) { + // This is for debugging and will never be called. + throw new TypeError("Unreachable"); + } + return array; + } else { + // This case would be a rare occurrence. + // slow-path: fallback + let i = 0; + for (const { + 0: name, + 1: { value }, + } of this[kHeadersMap]) { + array[i++] = [name, value]; + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + // 3.2.2. Assert: value is non-null. + assert(value !== null); + } + return array.sort(compareHeaderName); + } + } + } + + // https://fetch.spec.whatwg.org/#headers-class + class Headers { + #guard; + #headersList; + + constructor(init = undefined) { + webidl.util.markAsUncloneable(this); + + if (init === kConstruct) { + return; + } + + this.#headersList = new HeadersList(); + + // The new Headers(init) constructor steps are: + + // 1. Set this’s guard to "none". + this.#guard = "none"; + + // 2. If init is given, then fill this with init. + if (init !== undefined) { + init = webidl.converters.HeadersInit( + init, + "Headers contructor", + "init", + ); + fill(this, init); + } + } + + // https://fetch.spec.whatwg.org/#dom-headers-append + append(name, value) { + webidl.brandCheck(this, Headers); + + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + + return appendHeader(this, name, value); + } + + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete(name) { + webidl.brandCheck(this, Headers); + + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + + const prefix = "Headers.delete"; + name = webidl.converters.ByteString(name, prefix, "name"); + + // 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", + }); + } + + // 2. If this’s guard is "immutable", then throw a TypeError. + // 3. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 4. Otherwise, if this’s guard is "request-no-cors", name + // is not a no-CORS-safelisted request-header name, and + // name is not a privileged no-CORS request-header name, + // return. + // 5. Otherwise, if this’s guard is "response" and name is + // a forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this.#guard === "immutable") { + throw new TypeError("immutable"); + } + + // 6. If this’s header list does not contain name, then + // return. + if (!this.#headersList.contains(name, false)) { + return; + } + + // 7. Delete name from this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this. + this.#headersList.delete(name, false); + } + + // https://fetch.spec.whatwg.org/#dom-headers-get + get(name) { + webidl.brandCheck(this, Headers); + + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name", + }); + } + + // 2. Return the result of getting name from this’s header + // list. + return this.#headersList.get(name, false); + } + + // https://fetch.spec.whatwg.org/#dom-headers-has + has(name) { + webidl.brandCheck(this, Headers); + + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name", + }); + } + + // 2. Return true if this’s header list contains name; + // otherwise false. + return this.#headersList.contains(name, false); + } + + // https://fetch.spec.whatwg.org/#dom-headers-set + set(name, value) { + webidl.brandCheck(this, Headers); + + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "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, + value: name, + type: "header name", + }); + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value", + }); + } + + // 3. If this’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if this’s guard is "request-no-cors" and + // name/value is not a no-CORS-safelisted request-header, + // return. + // 6. Otherwise, if this’s guard is "response" and name is a + // forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this.#guard === "immutable") { + throw new TypeError("immutable"); + } + + // 7. Set (name, value) in this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this + this.#headersList.set(name, value, false); + } + + // 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.#headersList.cookies; + + if (list) { + return [...list]; + } + + return []; + } + + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + get [kHeadersSortedMap]() { + if (this.#headersList[kHeadersSortedMap]) { + return this.#headersList[kHeadersSortedMap]; + } + + // 1. Let headers be an empty list of headers with the key being the name + // and value the value. + const headers = []; + + // 2. Let names be the result of convert header names to a sorted-lowercase + // set with all the names of the headers in list. + const names = this.#headersList.toSortedArray(); + + const cookies = this.#headersList.cookies; + + // fast-path + if (cookies === null || cookies.length === 1) { + // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` + return (this.#headersList[kHeadersSortedMap] = names); + } + + // 3. For each name of names: + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + // 1. If name is `set-cookie`, then: + if (name === "set-cookie") { + // 1. Let values be a list of all values of headers in list whose name + // is a byte-case-insensitive match for name, in order. + + // 2. For each value of values: + // 1. Append (name, value) to headers. + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]); + } + } else { + // 2. Otherwise: + + // 1. Let value be the result of getting name from list. + + // 2. Assert: value is non-null. + // Note: This operation was done by `HeadersList#toSortedArray`. + + // 3. Append (name, value) to headers. + headers.push([name, value]); + } + } + + // 4. Return headers. + return (this.#headersList[kHeadersSortedMap] = headers); + } + + [util.inspect.custom](depth, options) { + options.depth ??= depth; + + return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`; + } + + static getHeadersGuard(o) { + return o.#guard; + } + + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + + static getHeadersList(o) { + return o.#headersList; + } + + static setHeadersList(o, list) { + o.#headersList = list; + } + } + + const { + getHeadersGuard, + setHeadersGuard, + getHeadersList, + setHeadersList, + } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + + iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); + + Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true, + }, + [util.inspect.custom]: { + enumerable: false, + }, + }); + + webidl.converters.HeadersInit = function (V, prefix, argument) { + if (webidl.util.Type(V) === "Object") { + const iterator = Reflect.get(V, Symbol.iterator); + + // A work-around to ensure we send the properly-cased Headers when V is a Headers object. + // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. + if ( + !util.types.isProxy(V) && + iterator === Headers.prototype.entries + ) { + // Headers object + try { + return getHeadersList(V).entriesList; + } catch { + // fall-through + } + } + + if (typeof iterator === "function") { + return webidl.converters["sequence>"]( + V, + prefix, + argument, + iterator.bind(V), + ); + } + + return webidl.converters["record"]( + V, + prefix, + argument, + ); + } + + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: [ + "sequence>", + "record", + ], + }); + }; + + module.exports = { + fill, + // for test. + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList, + }; + + /***/ + }, + + /***/ 4398: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + // https://github.com/Ethan-Arrowood/undici-fetch + + const { + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse, + fromInnerResponse, + } = __nccwpck_require__(9051); + const { HeadersList } = __nccwpck_require__(660); + const { Request, cloneRequest } = __nccwpck_require__(9967); + const zlib = __nccwpck_require__(8522); + 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, + clampAndCoarsenConnectionTimingInfo, + simpleRangeHeaderValue, + buildContentRange, + createInflate, + extractMimeType, + } = __nccwpck_require__(3168); + const { kState, kDispatcher } = __nccwpck_require__(3627); + const assert = __nccwpck_require__(4589); + const { safelyExtractBody, extractBody } = __nccwpck_require__(4492); + const { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet, + } = __nccwpck_require__(4495); + const EE = __nccwpck_require__(8474); + const { Readable, pipeline, finished } = __nccwpck_require__(7075); + const { + addAbortListener, + isErrored, + isReadable, + bufferToLowerCasedHeaderName, + } = __nccwpck_require__(3440); + const { + dataURLProcessor, + serializeAMimeType, + minimizeSupportedMimeType, + } = __nccwpck_require__(1900); + const { getGlobalDispatcher } = __nccwpck_require__(2581); + const { webidl } = __nccwpck_require__(5893); + const { STATUS_CODES } = __nccwpck_require__(7067); + const GET_OR_HEAD = ["GET", "HEAD"]; + + const defaultUserAgent = + typeof __UNDICI_IS_NODE__ !== "undefined" || + typeof esbuildDetection !== "undefined" + ? "node" + : "undici"; + + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + + class Fetch extends EE { + constructor(dispatcher) { + super(); + + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + + 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); + } + } + + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + + // https://fetch.spec.whatwg.org/#fetch-method + function fetch(input, init = undefined) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + + // 1. Let p be a new promise. + let 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. + + // 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); + + const realResponse = responseObject?.deref(); + + // 4. Abort the fetch() call with p, request, responseObject, + // and requestObject’s signal’s abort reason. + abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + + // 12. Let handleFetchDone given response response be to finalize and + // report timing with response, globalObject, and "fetch". + // see function handleFetchDone + + // 13. Set controller to the result of calling fetch given request, + // with processResponseEndOfBody set to handleFetchDone, and processResponse + // given response being these substeps: + + const processResponse = (response) => { + // 1. If locallyAborted is true, terminate these substeps. + if (locallyAborted) { + return; + } + + // 2. If response’s aborted flag is set, then: + if (response.aborted) { + // 1. Let deserializedError be the result of deserialize a serialized + // abort reason given controller’s serialized abort reason and + // relevantRealm. + + // 2. Abort the fetch() call with p, request, responseObject, and + // deserializedError. + + abortFetch( + p, + request, + responseObject, + controller.serializedAbortReason, + ); + return; + } + + // 3. If response is a network error, then reject p with a TypeError + // and terminate these substeps. + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + + // 4. Set responseObject to the result of creating a Response object, + // given response, "immutable", and relevantRealm. + responseObject = new WeakRef( + fromInnerResponse(response, "immutable"), + ); + + // 5. Resolve p with responseObject. + p.resolve(responseObject.deref()); + p = null; + }; + + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: requestObject[kDispatcher], // 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.href, + initiatorType, + globalThis, + cacheState, + ); + } + + // https://w3c.github.io/resource-timing/#dfn-mark-resource-timing + const markResourceTiming = performance.markResourceTiming; + + // https://fetch.spec.whatwg.org/#abort-fetch + function abortFetch(p, request, responseObject, error) { + // 1. Reject promise with error. + if (p) { + // We might have already resolved the promise at this stage + p.reject(error); + } + + // 2. If request’s body is not null and is readable, then cancel request’s + // body with error. + if (request.body != null && isReadable(request.body?.stream)) { + request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") { + // Node bug? + return; + } + throw err; + }); + } + + // 3. If responseObject is null, then return. + if (responseObject == null) { + return; + } + + // 4. Let response be responseObject’s response. + const response = responseObject[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; + } + throw err; + }); + } + } + + // https://fetch.spec.whatwg.org/#fetching + function fetching({ + request, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher = getGlobalDispatcher(), // undici + }) { + // Ensure that the dispatcher is set accordingly + assert(dispatcher); + + // 1. Let taskDestination be null. + let taskDestination = null; + + // 2. Let crossOriginIsolatedCapability be false. + let crossOriginIsolatedCapability = false; + + // 3. If request’s client is non-null, then: + if (request.client != null) { + // 1. Set taskDestination to request’s client’s global object. + taskDestination = request.client.globalObject; + + // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin + // isolated capability. + crossOriginIsolatedCapability = + request.client.crossOriginIsolatedCapability; + } + + // 4. If useParallelQueue is true, then set taskDestination to the result of + // starting a new parallel queue. + // TODO + + // 5. Let timingInfo be a new fetch timing info whose start time and + // post-redirect start time are the coarsened shared current time given + // crossOriginIsolatedCapability. + const currentTime = coarsenedSharedCurrentTime( + crossOriginIsolatedCapability, + ); + const timingInfo = createOpaqueTimingInfo({ + startTime: currentTime, + }); + + // 6. Let fetchParams be a new fetch params whose + // request is request, + // timing info is timingInfo, + // process request body chunk length is processRequestBodyChunkLength, + // process request end-of-body is processRequestEndOfBody, + // process response is processResponse, + // process response consume body is processResponseConsumeBody, + // process response end-of-body is processResponseEndOfBody, + // task destination is taskDestination, + // and cross-origin isolated capability is crossOriginIsolatedCapability. + const fetchParams = { + controller: new 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") { + 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", true)) { + // 1. Let value be `*/*`. + const value = "*/*"; + + // 2. A user agent should set value to the first matching statement, if + // any, switching on request’s destination: + // "document" + // "frame" + // "iframe" + // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` + // "image" + // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` + // "style" + // `text/css,*/*;q=0.1` + // TODO + + // 3. Append `Accept`/value to request’s header list. + request.headersList.append("accept", value, true); + } + + // 13. If request’s header list does not contain `Accept-Language`, then + // user agents should append `Accept-Language`/an appropriate value to + // request’s header list. + if (!request.headersList.contains("accept-language", true)) { + request.headersList.append("accept-language", "*", true); + } + + // 14. If request’s priority is null, then use request’s initiator and + // destination appropriately in setting request’s priority to a + // user-agent-defined object. + 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); + } + + // request’s mode is "same-origin" + if (request.mode === "same-origin") { + // 1. Return a network error. + return makeNetworkError('request mode cannot be "same-origin"'); + } + + // request’s mode is "no-cors" + if (request.mode === "no-cors") { + // 1. If request’s redirect mode is not "follow", then return a network + // error. + if (request.redirect !== "follow") { + return makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request', + ); + } + + // 2. Set request’s response tainting to "opaque". + request.responseTainting = "opaque"; + + // 3. Return the result of running scheme fetch given fetchParams. + return await 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", true) + ) { + 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"), + ); + } + case "blob:": { + if (!resolveObjectURL) { + resolveObjectURL = __nccwpck_require__(4573).resolveObjectURL; + } + + // 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.", + ), + ); + } + + const blob = 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(blob)) { + return Promise.resolve(makeNetworkError("invalid method")); + } + + // 3. Let blob be blobURLEntry’s object. + // Note: done above + + // 4. Let response be a new response. + const response = makeResponse(); + + // 5. Let fullLength be blob’s size. + const fullLength = blob.size; + + // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. + const serializedFullLength = isomorphicEncode(`${fullLength}`); + + // 7. Let type be blob’s type. + const type = blob.type; + + // 8. If request’s header list does not contain `Range`: + // 9. Otherwise: + if (!request.headersList.contains("range", true)) { + // 1. Let bodyWithType be the result of safely extracting blob. + // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. + // In node, this can only ever be a Blob. Therefore we can safely + // use extractBody directly. + const bodyWithType = extractBody(blob); + + // 2. Set response’s status message to `OK`. + response.statusText = "OK"; + + // 3. Set response’s body to bodyWithType’s body. + response.body = bodyWithType[0]; + + // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». + response.headersList.set( + "content-length", + serializedFullLength, + true, + ); + response.headersList.set("content-type", type, true); + } else { + // 1. Set response’s range-requested flag. + response.rangeRequested = true; + + // 2. Let rangeHeader be the result of getting `Range` from request’s header list. + const rangeHeader = request.headersList.get("range", true); + + // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. + const rangeValue = simpleRangeHeaderValue(rangeHeader, true); + + // 4. If rangeValue is failure, then return a network error. + if (rangeValue === "failure") { + return Promise.resolve( + makeNetworkError("failed to fetch the data URL"), + ); + } + + // 5. Let (rangeStart, rangeEnd) be rangeValue. + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = + rangeValue; + + // 6. If rangeStart is null: + // 7. Otherwise: + if (rangeStart === null) { + // 1. Set rangeStart to fullLength − rangeEnd. + rangeStart = fullLength - rangeEnd; + + // 2. Set rangeEnd to rangeStart + rangeEnd − 1. + rangeEnd = rangeStart + rangeEnd - 1; + } else { + // 1. If rangeStart is greater than or equal to fullLength, then return a network error. + if (rangeStart >= fullLength) { + return Promise.resolve( + makeNetworkError( + "Range start is greater than the blob's size.", + ), + ); + } + + // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set + // rangeEnd to fullLength − 1. + if (rangeEnd === null || rangeEnd >= fullLength) { + rangeEnd = fullLength - 1; + } + } + + // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, + // rangeEnd + 1, and type. + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + + // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. + // Note: same reason as mentioned above as to why we use extractBody + const slicedBodyWithType = extractBody(slicedBlob); + + // 10. Set response’s body to slicedBodyWithType’s body. + response.body = slicedBodyWithType[0]; + + // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. + const serializedSlicedLength = isomorphicEncode( + `${slicedBlob.size}`, + ); + + // 12. Let contentRange be the result of invoking build a content range given rangeStart, + // rangeEnd, and fullLength. + const contentRange = buildContentRange( + rangeStart, + rangeEnd, + fullLength, + ); + + // 13. Set response’s status to 206. + response.status = 206; + + // 14. Set response’s status message to `Partial Content`. + response.statusText = "Partial Content"; + + // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), + // (`Content-Type`, type), (`Content-Range`, contentRange) ». + response.headersList.set( + "content-length", + serializedSlicedLength, + true, + ); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + + // 10. Return response. + return Promise.resolve(response); + } + 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"), + ); + } + + // 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], + }), + ); + } + 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..."), + ); + } + case "http:": + case "https:": { + // Return the result of running HTTP fetch given fetchParams. + + return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + } + default: { + return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + } + + // 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. Let timingInfo be fetchParams’s timing info. + let timingInfo = fetchParams.timingInfo; + + // 2. If response is not a network error and fetchParams’s request’s client is a secure context, + // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting + // `Server-Timing` from response’s internal response’s header list. + // TODO + + // 3. Let processResponseEndOfBody be the following steps: + const processResponseEndOfBody = () => { + // 1. Let unsafeEndTime be the unsafe shared current time. + const unsafeEndTime = Date.now(); // ? + + // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s + // full timing info to fetchParams’s timing info. + if (fetchParams.request.destination === "document") { + fetchParams.controller.fullTimingInfo = timingInfo; + } + + // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: + fetchParams.controller.reportTimingSteps = () => { + // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. + if (fetchParams.request.url.protocol !== "https:") { + return; + } + + // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. + timingInfo.endTime = unsafeEndTime; + + // 3. Let cacheState be response’s cache state. + let cacheState = response.cacheState; + + // 4. Let bodyInfo be response’s body info. + const bodyInfo = response.bodyInfo; + + // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an + // opaque timing info for timingInfo and set cacheState to the empty string. + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + + cacheState = ""; + } + + // 6. Let responseStatus be 0. + let responseStatus = 0; + + // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: + if ( + fetchParams.request.mode !== "navigator" || + !response.hasCrossOriginRedirects + ) { + // 1. Set responseStatus to response’s status. + responseStatus = response.status; + + // 2. Let mimeType be the result of extracting a MIME type from response’s header list. + const mimeType = extractMimeType(response.headersList); + + // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. + if (mimeType !== "failure") { + bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + } + + // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, + // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, + // and responseStatus. + if (fetchParams.request.initiatorType != null) { + // TODO: update markresourcetiming + markResourceTiming( + timingInfo, + fetchParams.request.url.href, + fetchParams.request.initiatorType, + globalThis, + cacheState, + bodyInfo, + responseStatus, + ); + } + }; + + // 4. Let processResponseEndOfBodyTask be the following steps: + const processResponseEndOfBodyTask = () => { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true; + + // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process + // response end-of-body given response. + if (fetchParams.processResponseEndOfBody != null) { + queueMicrotask(() => + fetchParams.processResponseEndOfBody(response), + ); + } + + // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s + // global object is fetchParams’s task destination, then run fetchParams’s controller’s report + // timing steps given fetchParams’s request’s client’s global object. + if (fetchParams.request.initiatorType != null) { + fetchParams.controller.reportTimingSteps(); + } + }; + + // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + + // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s + // process response given response, with fetchParams’s task destination. + if (fetchParams.processResponse != null) { + queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + } + + // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. + const internalResponse = + response.type === "error" + ? response + : (response.internalResponse ?? response); + + // 6. If internalResponse’s body is null, then run processResponseEndOfBody. + // 7. Otherwise: + if (internalResponse.body == null) { + processResponseEndOfBody(); + } else { + // mcollina: all the following steps of the specs are skipped. + // The internal transform stream is not needed. + // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 + + // 1. Let transformStream be a new TransformStream. + // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. + // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm + // set to processResponseEndOfBody. + // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. + + finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + } + + // 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(undefined, false); + } + + // 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()); + } + + // 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); + } + } + + // 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", true); + + // https://fetch.spec.whatwg.org/#authentication-entries + request.headersList.delete("proxy-authorization", true); + + // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + + // 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 = cloneRequest(request); + + // 2. Set httpFetchParams to a copy of fetchParams. + httpFetchParams = { ...fetchParams }; + + // 3. Set httpFetchParams’s request to httpRequest. + httpFetchParams.request = httpRequest; + } + + // 3. Let includeCredentials be true if one of + const includeCredentials = + request.credentials === "include" || + (request.credentials === "same-origin" && + request.responseTainting === "basic"); + + // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s + // body is non-null; otherwise null. + const contentLength = httpRequest.body ? httpRequest.body.length : null; + + // 5. Let contentLengthHeaderValue be null. + let contentLengthHeaderValue = null; + + // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or + // `PUT`, then set contentLengthHeaderValue to `0`. + if ( + httpRequest.body == null && + ["POST", "PUT"].includes(httpRequest.method) + ) { + contentLengthHeaderValue = "0"; + } + + // 7. If contentLength is non-null, then set contentLengthHeaderValue to + // contentLength, serialized and isomorphic encoded. + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + } + + // 8. If contentLengthHeaderValue is non-null, then append + // `Content-Length`/contentLengthHeaderValue to httpRequest’s header + // list. + if (contentLengthHeaderValue != null) { + httpRequest.headersList.append( + "content-length", + contentLengthHeaderValue, + true, + ); + } + + // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, + // contentLengthHeaderValue) to httpRequest’s header list. + + // 10. If contentLength is non-null and httpRequest’s keepalive is true, + // then: + if (contentLength != null && httpRequest.keepalive) { + // NOTE: keepalive is a noop outside of browser context. + } + + // 11. If httpRequest’s referrer is a URL, then append + // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, + // to httpRequest’s header list. + if (httpRequest.referrer instanceof URL) { + httpRequest.headersList.append( + "referer", + isomorphicEncode(httpRequest.referrer.href), + true, + ); + } + + // 12. Append a request `Origin` header for httpRequest. + appendRequestOriginHeader(httpRequest); + + // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] + appendFetchMetadata(httpRequest); + + // 14. If httpRequest’s header list does not contain `User-Agent`, then + // user agents should append `User-Agent`/default `User-Agent` value to + // httpRequest’s header list. + if (!httpRequest.headersList.contains("user-agent", true)) { + httpRequest.headersList.append("user-agent", defaultUserAgent); + } + + // 15. If httpRequest’s cache mode is "default" and httpRequest’s header + // list contains `If-Modified-Since`, `If-None-Match`, + // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set + // httpRequest’s cache mode to "no-store". + if ( + httpRequest.cache === "default" && + (httpRequest.headersList.contains("if-modified-since", true) || + httpRequest.headersList.contains("if-none-match", true) || + httpRequest.headersList.contains("if-unmodified-since", true) || + httpRequest.headersList.contains("if-match", true) || + httpRequest.headersList.contains("if-range", true)) + ) { + httpRequest.cache = "no-store"; + } + + // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent + // no-cache cache-control header modification flag is unset, and + // httpRequest’s header list does not contain `Cache-Control`, then append + // `Cache-Control`/`max-age=0` to httpRequest’s header list. + if ( + httpRequest.cache === "no-cache" && + !httpRequest.preventNoCacheCacheControlHeaderModification && + !httpRequest.headersList.contains("cache-control", true) + ) { + httpRequest.headersList.append("cache-control", "max-age=0", true); + } + + // 17. If httpRequest’s cache mode is "no-store" or "reload", then: + if ( + httpRequest.cache === "no-store" || + httpRequest.cache === "reload" + ) { + // 1. If httpRequest’s header list does not contain `Pragma`, then append + // `Pragma`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains("pragma", true)) { + httpRequest.headersList.append("pragma", "no-cache", true); + } + + // 2. If httpRequest’s header list does not contain `Cache-Control`, + // then append `Cache-Control`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains("cache-control", true)) { + httpRequest.headersList.append("cache-control", "no-cache", true); + } + } + + // 18. If httpRequest’s header list contains `Range`, then append + // `Accept-Encoding`/`identity` to httpRequest’s header list. + if (httpRequest.headersList.contains("range", true)) { + httpRequest.headersList.append("accept-encoding", "identity", true); + } + + // 19. Modify httpRequest’s header list per HTTP. Do not append a given + // header if httpRequest’s header list contains that header’s name. + // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 + if (!httpRequest.headersList.contains("accept-encoding", true)) { + if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { + httpRequest.headersList.append( + "accept-encoding", + "br, gzip, deflate", + true, + ); + } else { + httpRequest.headersList.append( + "accept-encoding", + "gzip, deflate", + true, + ); + } + } + + httpRequest.headersList.delete("host", true); + + // 20. If includeCredentials is true, then: + 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"; + } + + // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", + // then: + if ( + httpRequest.cache !== "no-store" && + httpRequest.cache !== "reload" + ) { + // TODO: cache + } + + // 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.cache === "only-if-cached") { + return makeNetworkError("only if cached"); + } + + // 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 + } + + // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, + // then: + if (revalidatingFlag && forwardResponse.status === 304) { + // TODO: cache + } + + // 5. If response is null, then: + if (response == null) { + // 1. Set response to forwardResponse. + response = forwardResponse; + + // 2. Store httpRequest and forwardResponse in httpCache, as per the + // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] + // TODO: cache + } + } + + // 11. Set response’s URL list to a clone of httpRequest’s URL list. + response.urlList = [...httpRequest.urlList]; + + // 12. If httpRequest’s header list contains `Range`, then set response’s + // range-requested flag. + if (httpRequest.headersList.contains("range", true)) { + response.rangeRequested = true; + } + + // 13. Set response’s request-includes-credentials to includeCredentials. + response.requestIncludesCredentials = includeCredentials; + + // 14. If response’s status is 401, httpRequest’s response tainting is not + // "cors", includeCredentials is true, and request’s window is an environment + // settings object, then: + // TODO + + // 15. If response’s status is 407, then: + if (response.status === 407) { + // 1. If request’s window is "no-window", then return a network error. + if (request.window === "no-window") { + return makeNetworkError(); + } + + // 2. ??? + + // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + + // 4. Prompt the end user as appropriate in request’s window and store + // the result as a proxy-authentication entry. [HTTP-AUTH] + // TODO: Invoke some kind of callback? + + // 5. Set response to the result of running HTTP-network-or-cache fetch given + // fetchParams. + // TODO + return makeNetworkError("proxy authentication required"); + } + + // 16. If all of the following are true + if ( + // response’s status is 421 + response.status === 421 && + // isNewConnectionFetch is false + !isNewConnectionFetch && + // request’s body is null, or request’s body is non-null and request’s body’s source is non-null + (request.body == null || request.body.source != null) + ) { + // then: + + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + + // 2. Set response to the result of running HTTP-network-or-cache + // fetch given fetchParams, isAuthenticationFetch, and true. + + // TODO (spec): The spec doesn't specify this but we need to cancel + // the active response before we can start a new one. + // https://github.com/whatwg/fetch/issues/1293 + fetchParams.controller.connection.destroy(); + + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true, + ); + } + + // 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, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) { + this.abort?.( + err ?? + new DOMException( + "The operation was aborted.", + "AbortError", + ), + ); + } + } + }, + }; + + // 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; + } + + // 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; + } + + // 2. If fetchParams’s process request end-of-body is non-null, + // then run fetchParams’s process request end-of-body. + if (fetchParams.processRequestEndOfBody) { + fetchParams.processRequestEndOfBody(); + } + }; + + // 3. Let processBodyError given e be these steps: + const processBodyError = (e) => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return; + } + + // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. + if (e.name === "AbortError") { + fetchParams.controller.abort(); + } else { + fetchParams.controller.terminate(e); + } + }; + + // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, + // processBodyError, and fetchParams’s task destination. + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) { + yield* processBodyChunk(bytes); + } + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + + 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 = async () => { + await fetchParams.controller.resume(); + }; + + // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s + // controller with reason, given reason. + const cancelAlgorithm = (reason) => { + // If the aborted fetch was already terminated, then we do not + // need to do anything. + if (!isCancelled(fetchParams)) { + 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 byte reading support with pullAlgorithm set to pullAlgorithm, + // cancelAlgorithm set to cancelAlgorithm. + const stream = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + }, + type: "bytes", + }); + + // 17. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. Set response’s body to a new body whose stream is stream. + response.body = { stream, source: null, length: null }; + + // 2. If response is not a network error and request’s cache mode is + // not "no-store", then update response in httpCache for request. + // TODO + + // 3. If includeCredentials is true and the user agent is not configured + // to block cookies for request (see section 7 of [COOKIES]), then run the + // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on + // the value of each header whose name is a byte-case-insensitive match for + // `Set-Cookie` in response’s header list, if any, and request’s current URL. + // TODO + + // 18. If aborted, then: + // TODO + + // 19. Run these steps in parallel: + + // 1. Run these steps, but abort when fetchParams is canceled: + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + // 1. While true + while (true) { + // 1-3. See onData... + + // 4. Set bytes to the result of handling content codings given + // codings and bytes. + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + + if (isAborted(fetchParams)) { + break; + } + + bytes = done ? undefined : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { + // zlib doesn't like empty streams. + bytes = undefined; + } else { + bytes = err; + + // err may be propagated from the result of calling readablestream.cancel, + // which might not be an error. https://github.com/nodejs/undici/issues/2009 + isFailure = true; + } + } + + if (bytes === undefined) { + // 2. Otherwise, if the bytes transmission for response’s message + // body is done normally and stream is readable, then close + // stream, finalize response for fetchParams and response, and + // abort these in-parallel steps. + readableStreamClose(fetchParams.controller.controller); + + finalizeResponse(fetchParams, response); + + return; + } + + // 5. Increase timingInfo’s decoded body size by bytes’s length. + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + + // 6. If bytes is failure, then terminate fetchParams’s controller. + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + + // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes + // into stream. + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) { + fetchParams.controller.controller.enqueue(buffer); + } + + // 8. If stream is errored, then terminate the ongoing fetch. + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + + // 9. If stream doesn’t need more data ask the user agent to suspend + // the ongoing fetch. + if (fetchParams.controller.controller.desiredSize <= 0) { + return; + } + } + }; + + // 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, + ); + } + } 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, + }), + ); + } + } + + // 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; + + 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: agent.isMockActive + ? request.body && (request.body.source || request.body.stream) + : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : undefined, + }, + { + body: null, + abort: null, + + onConnect(abort) { + // TODO (fix): Do we need connection here? + const { connection } = fetchParams.controller; + + // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen + // connection timing info with connection’s timing info, timingInfo’s post-redirect start + // time, and fetchParams’s cross-origin isolated capability. + // TODO: implement connection timing + timingInfo.finalConnectionTimingInfo = + clampAndCoarsenConnectionTimingInfo( + undefined, + timingInfo.postRedirectStartTime, + fetchParams.crossOriginIsolatedCapability, + ); + + if (connection.destroyed) { + abort( + new DOMException( + "The operation was aborted.", + "AbortError", + ), + ); + } else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + + // Set timingInfo’s final network-request start time to the coarsened shared current time given + // fetchParams’s cross-origin isolated capability. + timingInfo.finalNetworkRequestStartTime = + coarsenedSharedCurrentTime( + fetchParams.crossOriginIsolatedCapability, + ); + }, + + onResponseStarted() { + // Set timingInfo’s final network-response start time to the coarsened shared current + // time given fetchParams’s cross-origin isolated capability, immediately after the + // user agent’s HTTP parser receives the first byte of the response (e.g., frame header + // bytes for HTTP/2 or response status line for HTTP/1.x). + timingInfo.finalNetworkResponseStartTime = + coarsenedSharedCurrentTime( + fetchParams.crossOriginIsolatedCapability, + ); + }, + + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) { + return; + } + + let location = ""; + + const headersList = new HeadersList(); + + for (let i = 0; i < rawHeaders.length; i += 2) { + headersList.append( + bufferToLowerCasedHeaderName(rawHeaders[i]), + rawHeaders[i + 1].toString("latin1"), + true, + ); + } + location = headersList.get("location", true); + + this.body = new Readable({ read: resume }); + + const decoders = []; + + const willFollow = + location && + request.redirect === "follow" && + 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 + ) { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + const contentEncoding = headersList.get( + "content-encoding", + true, + ); + // "All content-coding values are case-insensitive..." + /** @type {string[]} */ + const codings = contentEncoding + ? contentEncoding.toLowerCase().split(",") + : []; + + // Limit the number of content-encodings to prevent resource exhaustion. + // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject( + new Error( + `too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`, + ), + ); + return true; + } + + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i].trim(); + // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 + if (coding === "x-gzip" || coding === "gzip") { + decoders.push( + 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( + createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH, + }), + ); + } else if (coding === "br") { + decoders.push( + zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH, + }), + ); + } else { + decoders.length = 0; + break; + } + } + } + + const onError = this.onError.bind(this); + + resolve({ + status, + statusText, + headersList, + body: decoders.length + ? pipeline(this.body, ...decoders, (err) => { + if (err) { + this.onError(err); + } + }).on("error", onError) + : this.body.on("error", onError), + }); + + return true; + }, + + onData(chunk) { + if (fetchParams.controller.dump) { + return; + } + + // 1. If one or more bytes have been transmitted from response’s + // message body, then: + + // 1. Let bytes be the transmitted bytes. + const bytes = chunk; + + // 2. Let codings be the result of extracting header list values + // given `Content-Encoding` and response’s header list. + // See pullAlgorithm. + + // 3. Increase timingInfo’s encoded body size by bytes’s length. + timingInfo.encodedBodySize += bytes.byteLength; + + // 4. See pullAlgorithm... + + return this.body.push(bytes); + }, + + onComplete() { + if (this.abort) { + fetchParams.controller.off("terminated", this.abort); + } + + if (fetchParams.controller.onAborted) { + fetchParams.controller.off( + "terminated", + fetchParams.controller.onAborted, + ); + } + + fetchParams.controller.ended = true; + + this.body.push(null); + }, + + onError(error) { + if (this.abort) { + fetchParams.controller.off("terminated", this.abort); + } + + this.body?.destroy(error); + + fetchParams.controller.terminate(error); + + reject(error); + }, + + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) { + return; + } + + const headersList = new HeadersList(); + + for (let i = 0; i < rawHeaders.length; i += 2) { + headersList.append( + bufferToLowerCasedHeaderName(rawHeaders[i]), + rawHeaders[i + 1].toString("latin1"), + true, + ); + } + + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket, + }); + + return true; + }, + }, + ), + ); + } + } + + module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming, + }; + + /***/ + }, + + /***/ 9967: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + /* globals AbortController */ + + const { extractBody, mixinBody, cloneBody, bodyUnusable } = + __nccwpck_require__(4492); + const { + Headers, + fill: fillHeaders, + HeadersList, + setHeadersGuard, + getHeadersGuard, + setHeadersList, + getHeadersList, + } = __nccwpck_require__(660); + const { FinalizationRegistry } = __nccwpck_require__(6653)(); + const util = __nccwpck_require__(3440); + const nodeUtil = __nccwpck_require__(7975); + const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = + __nccwpck_require__(3168); + const { + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex, + } = __nccwpck_require__(4495); + const { + kEnumerableProperty, + normalizedMethodRecordsBase, + normalizedMethodRecords, + } = util; + const { kHeaders, kSignal, kState, kDispatcher } = + __nccwpck_require__(3627); + const { webidl } = __nccwpck_require__(5893); + const { URLSerializer } = __nccwpck_require__(1900); + const { kConstruct } = __nccwpck_require__(6443); + const assert = __nccwpck_require__(4589); + const { + getMaxListeners, + setMaxListeners, + getEventListeners, + defaultMaxListeners, + } = __nccwpck_require__(8474); + + const kAbortController = Symbol("abortController"); + + const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + + const dependentControllerMap = new WeakMap(); + + function buildAbort(acRef) { + return abort; + + function abort() { + const ac = acRef.deref(); + if (ac !== undefined) { + // Currently, there is a problem with FinalizationRegistry. + // https://github.com/nodejs/node/issues/49344 + // https://github.com/nodejs/node/issues/47748 + // In the case of abort, the first step is to unregister from it. + // If the controller can refer to it, it is still registered. + // It will be removed in the future. + requestFinalizer.unregister(abort); + + // Unsubscribe a listener. + // FinalizationRegistry will no longer be called, so this must be done. + this.removeEventListener("abort", abort); + + ac.abort(this.reason); + + const controllerList = dependentControllerMap.get(ac.signal); + + if (controllerList !== undefined) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== undefined) { + ctrl.abort(this.reason); + } + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + + let patchMethodWarning = false; + + // https://fetch.spec.whatwg.org/#request-class + class Request { + // https://fetch.spec.whatwg.org/#dom-request + constructor(input, init = {}) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) { + return; + } + + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + input = webidl.converters.RequestInfo(input, prefix, "input"); + init = webidl.converters.RequestInit(init, prefix, "init"); + + // 1. Let request be null. + let request = null; + + // 2. Let fallbackMode be null. + let fallbackMode = null; + + // 3. Let baseURL be this’s relevant settings object’s API base URL. + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + + // 4. Let signal be null. + let signal = null; + + // 5. If input is a string, then: + if (typeof input === "string") { + this[kDispatcher] = init.dispatcher; + + // 1. Let parsedURL be the result of parsing input with baseURL. + // 2. If parsedURL is failure, then throw a TypeError. + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { + cause: err, + }); + } + + // 3. If parsedURL includes credentials, then throw a TypeError. + if (parsedURL.username || parsedURL.password) { + throw new TypeError( + "Request cannot be constructed from a URL that includes credentials: " + + input, + ); + } + + // 4. Set request to a new request whose URL is parsedURL. + request = makeRequest({ urlList: [parsedURL] }); + + // 5. Set fallbackMode to "cors". + fallbackMode = "cors"; + } else { + this[kDispatcher] = init.dispatcher || input[kDispatcher]; + + // 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 = environmentSettingsObject.settingsObject.origin; + + // 8. Let window be "client". + let window = "client"; + + // 9. If request’s window is an environment settings object and its origin + // is same origin with origin, then set window to request’s window. + if ( + request.window?.constructor?.name === "EnvironmentSettingsObject" && + 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: environmentSettingsObject.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"; + } + + // 2. Unset request’s reload-navigation flag. + request.reloadNavigation = false; + + // 3. Unset request’s history-navigation flag. + request.historyNavigation = false; + + // 4. Set request’s origin to "client". + request.origin = "client"; + + // 5. Set request’s referrer to "client" + request.referrer = "client"; + + // 6. Set request’s referrer policy to the empty string. + request.referrerPolicy = ""; + + // 7. Set request’s URL to request’s current URL. + request.url = request.urlList[request.urlList.length - 1]; + + // 8. Set request’s URL list to « request’s URL ». + request.urlList = [request.url]; + } + + // 14. If init["referrer"] exists, then: + if (init.referrer !== undefined) { + // 1. Let referrer be init["referrer"]. + const referrer = init.referrer; + + // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". + if (referrer === "") { + request.referrer = "no-referrer"; + } else { + // 1. Let parsedReferrer be the result of parsing referrer with + // baseURL. + // 2. If parsedReferrer is failure, then throw a TypeError. + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError( + `Referrer "${referrer}" is not a valid URL.`, + { cause: err }, + ); + } + + // 3. If one of the following is true + // - parsedReferrer’s scheme is "about" and path is the string "client" + // - parsedReferrer’s origin is not same origin with origin + // then set request’s referrer to "client". + if ( + (parsedReferrer.protocol === "about:" && + parsedReferrer.hostname === "client") || + (origin && + !sameOrigin( + parsedReferrer, + environmentSettingsObject.settingsObject.baseUrl, + )) + ) { + request.referrer = "client"; + } else { + // 4. Otherwise, set request’s referrer to parsedReferrer. + request.referrer = parsedReferrer; + } + } + } + + // 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; + + const mayBeNormalized = normalizedMethodRecords[method]; + + if (mayBeNormalized !== undefined) { + // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones + request.method = mayBeNormalized; + } else { + // 2. If method is not a method or method is a forbidden method, then + // throw a TypeError. + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`); + } + + const upperCase = method.toUpperCase(); + + if (forbiddenMethodsSet.has(upperCase)) { + throw new TypeError(`'${method}' HTTP method is unsupported.`); + } + + // 3. Normalize method. + // https://fetch.spec.whatwg.org/#concept-method-normalize + // Note: must be in uppercase + method = normalizedMethodRecordsBase[upperCase] ?? method; + + // 4. Set request’s method to method. + request.method = method; + } + + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning( + "Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", + { + code: "UNDICI-FETCH-patch", + }, + ); + + patchMethodWarning = true; + } + } + + // 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; + + // 29. If signal is not null, then make this’s signal follow signal. + if (signal != null) { + if ( + !signal || + typeof signal.aborted !== "boolean" || + typeof signal.addEventListener !== "function" + ) { + throw new TypeError( + "Failed to construct 'Request': member signal is not of type AbortSignal.", + ); + } + + if (signal.aborted) { + ac.abort(signal.reason); + } else { + // Keep a strong ref to ac while request object + // is alive. This is needed to prevent AbortController + // from being prematurely garbage collected. + // See, https://github.com/nodejs/undici/issues/1926. + this[kAbortController] = ac; + + const acRef = new WeakRef(ac); + const abort = buildAbort(acRef); + + // Third-party AbortControllers may not work with these. + // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. + try { + // If the max amount of listeners is equal to the default, increase it + // This is only available in node >= v19.9.0 + if ( + typeof getMaxListeners === "function" && + getMaxListeners(signal) === defaultMaxListeners + ) { + setMaxListeners(1500, signal); + } else if ( + getEventListeners(signal, "abort").length >= + defaultMaxListeners + ) { + setMaxListeners(1500, signal); + } + } catch {} + + util.addAbortListener(signal, abort); + // The third argument must be a registry key to be unregistered. + // Without it, you cannot unregister. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + // abort is used as the unregister key. (because it is unique) + requestFinalizer.register(ac, { signal, abort }, abort); + } + } + + // 30. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is request’s header list and guard is + // "request". + this[kHeaders] = new Headers(kConstruct); + setHeadersList(this[kHeaders], request.headersList); + setHeadersGuard(this[kHeaders], "request"); + + // 31. If this’s request’s mode is "no-cors", then: + if (mode === "no-cors") { + // 1. If this’s request’s method is not a CORS-safelisted method, + // then throw a TypeError. + if (!corsSafeListedMethodsSet.has(request.method)) { + throw new TypeError( + `'${request.method} is unsupported in no-cors mode.`, + ); + } + + // 2. Set this’s headers’s guard to "request-no-cors". + setHeadersGuard(this[kHeaders], "request-no-cors"); + } + + // 32. If init is not empty, then: + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = getHeadersList(this[kHeaders]); + // 1. Let headers be a copy of this’s headers and its associated header + // list. + // 2. If init["headers"] exists, then set headers to init["headers"]. + const headers = + init.headers !== undefined + ? init.headers + : new 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 { name, value } of headers.rawValues()) { + headersList.append(name, value, false); + } + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies; + } else { + // 5. Otherwise, fill this’s headers with headers. + fillHeaders(this[kHeaders], headers); + } + } + + // 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 && + !getHeadersList(this[kHeaders]).contains("content-type", true) + ) { + this[kHeaders].append("content-type", contentType); + } + } + + // 37. Let inputOrInitBody be initBody if it is non-null; otherwise + // inputBody. + const inputOrInitBody = initBody ?? inputBody; + + // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is + // null, then: + if (inputOrInitBody != null && inputOrInitBody.source == null) { + // 1. If initBody is non-null and init["duplex"] does not exist, + // then throw a TypeError. + if (initBody != null && init.duplex == null) { + throw new TypeError( + "RequestInit: duplex option is required when sending a body.", + ); + } + + // 2. If this’s request’s mode is neither "same-origin" nor "cors", + // then throw a TypeError. + if (request.mode !== "same-origin" && request.mode !== "cors") { + throw new TypeError( + 'If request is made from ReadableStream, mode should be "same-origin" or "cors"', + ); + } + + // 3. Set this’s request’s use-CORS-preflight flag. + request.useCORSPreflightFlag = true; + } + + // 39. Let finalBody be inputOrInitBody. + let finalBody = inputOrInitBody; + + // 40. If initBody is null and inputBody is non-null, then: + if (initBody == null && inputBody != null) { + // 1. If input is unusable, then throw a TypeError. + if (bodyUnusable(input)) { + throw new TypeError( + "Cannot construct a Request with a Request object that has already been used.", + ); + } + + // 2. Set finalBody to the result of creating a proxy for inputBody. + // https://streams.spec.whatwg.org/#readablestream-create-a-proxy + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable, + }; + } + + // 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-forward 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 (bodyUnusable(this)) { + 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. + // 4. Make clonedRequestObject’s signal follow this’s signal. + const ac = new AbortController(); + if (this.signal.aborted) { + ac.abort(this.signal.reason); + } else { + let list = dependentControllerMap.get(this.signal); + if (list === undefined) { + list = new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener(ac.signal, buildAbort(acRef)); + } + + // 4. Return clonedRequestObject. + return fromInnerRequest( + clonedRequest, + ac.signal, + getHeadersGuard(this[kHeaders]), + ); + } + + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) { + options.depth = 2; + } + + options.colors ??= true; + + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal, + }; + + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + } + + mixinBody(Request); + + // https://fetch.spec.whatwg.org/#requests + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: + init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList + ? new HeadersList(init.headersList) + : new HeadersList(), + }; + } + + // 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(newRequest, request.body); + } + + // 3. Return newRequest. + return newRequest; + } + + /** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ + function fromInnerRequest(innerRequest, signal, guard) { + const request = new Request(kConstruct); + request[kState] = innerRequest; + request[kSignal] = signal; + request[kHeaders] = new Headers(kConstruct); + setHeadersList(request[kHeaders], innerRequest.headersList); + setHeadersGuard(request[kHeaders], guard); + return request; + } + + 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, prefix, argument) { + if (typeof V === "string") { + return webidl.converters.USVString(V, prefix, argument); + } + + if (V instanceof Request) { + return webidl.converters.Request(V, prefix, argument); + } + + return webidl.converters.USVString(V, prefix, argument); + }; + + 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, "RequestInit", "signal", { + strict: false, + }), + ), + }, + { + key: "window", + converter: webidl.converters.any, + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex, + }, + { + key: "dispatcher", // undici specific option + converter: webidl.converters.any, + }, + ]); + + module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest }; + + /***/ + }, + + /***/ 9051: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { + Headers, + HeadersList, + fill, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + } = __nccwpck_require__(660); + const { + extractBody, + cloneBody, + mixinBody, + hasFinalizationRegistry, + streamRegistry, + bodyUnusable, + } = __nccwpck_require__(4492); + const util = __nccwpck_require__(3440); + const nodeUtil = __nccwpck_require__(7975); + const { kEnumerableProperty } = util; + const { + isValidReasonPhrase, + isCancelled, + isAborted, + isBlobLike, + serializeJavascriptValueToJSONString, + isErrorLike, + isomorphicEncode, + environmentSettingsObject: relevantRealm, + } = __nccwpck_require__(3168); + const { redirectStatusSet, nullBodyStatus } = __nccwpck_require__(4495); + const { kState, kHeaders } = __nccwpck_require__(3627); + const { webidl } = __nccwpck_require__(5893); + const { FormData } = __nccwpck_require__(5910); + const { URLSerializer } = __nccwpck_require__(1900); + const { kConstruct } = __nccwpck_require__(6443); + const assert = __nccwpck_require__(4589); + const { types } = __nccwpck_require__(7975); + + const textEncoder = new TextEncoder("utf-8"); + + // https://fetch.spec.whatwg.org/#response-class + class Response { + // Creates network error Response. + static error() { + // The static error() method steps are to return the result of creating a + // Response object, given a new network error, "immutable", and this’s + // relevant Realm. + const responseObject = fromInnerResponse( + makeNetworkError(), + "immutable", + ); + + return responseObject; + } + + // https://fetch.spec.whatwg.org/#dom-response-json + static json(data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, "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 responseObject = fromInnerResponse( + makeResponse({}), + "response", + ); + + // 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) { + webidl.argumentLengthCheck(arguments, 1, "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, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw 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 = fromInnerResponse( + makeResponse({}), + "immutable", + ); + + // 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, true); + + // 8. Return responseObject. + return responseObject; + } + + // https://fetch.spec.whatwg.org/#dom-response + constructor(body = null, init = {}) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) { + return; + } + + if (body !== null) { + body = webidl.converters.BodyInit(body); + } + + init = webidl.converters.ResponseInit(init); + + // 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); + setHeadersGuard(this[kHeaders], "response"); + setHeadersList(this[kHeaders], this[kState].headersList); + + // 3. Let bodyWithType be null. + let bodyWithType = null; + + // 4. If body is non-null, then set bodyWithType to the result of extracting body. + if (body != null) { + const [extractedBody, type] = 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 (bodyUnusable(this)) { + 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]); + + // Note: To re-register because of a new stream. + if (hasFinalizationRegistry && this[kState].body?.stream) { + streamRegistry.register( + this, + new WeakRef(this[kState].body.stream), + ); + } + + // 3. Return the result of creating a Response object, given + // clonedResponse, this’s headers’s guard, and this’s relevant Realm. + return fromInnerResponse( + clonedResponse, + getHeadersGuard(this[kHeaders]), + ); + } + + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) { + options.depth = 2; + } + + options.colors ??= true; + + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url, + }; + + return `Response ${nodeUtil.formatWithOptions(options, properties)}`; + } + } + + 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(newResponse, 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", + }); + } + + // @see https://fetch.spec.whatwg.org/#concept-network-error + function isNetworkError(response) { + return ( + // A network error is a response whose type is "error", + response.type === "error" && + // status is 0 + response.status === 0 + ); + } + + 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", true) + ) { + response[kState].headersList.append( + "content-type", + body.type, + true, + ); + } + } + } + + /** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ + function fromInnerResponse(innerResponse, guard) { + const response = new Response(kConstruct); + response[kState] = innerResponse; + response[kHeaders] = new Headers(kConstruct); + setHeadersList(response[kHeaders], innerResponse.headersList); + setHeadersGuard(response[kHeaders], guard); + + if (hasFinalizationRegistry && innerResponse.body?.stream) { + // If the target (response) is reclaimed, the cleanup callback may be called at some point with + // the held value provided for it (innerResponse.body.stream). The held value can be any value: + // a primitive or an object, even undefined. If the held value is an object, the registry keeps + // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + streamRegistry.register( + response, + new WeakRef(innerResponse.body.stream), + ); + } + + return response; + } + + 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, prefix, name) { + if (typeof V === "string") { + return webidl.converters.USVString(V, prefix, name); + } + + if (isBlobLike(V)) { + return webidl.converters.Blob(V, prefix, name, { strict: false }); + } + + if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { + return webidl.converters.BufferSource(V, prefix, name); + } + + if (util.isFormDataLike(V)) { + return webidl.converters.FormData(V, prefix, name, { strict: false }); + } + + if (V instanceof URLSearchParams) { + return webidl.converters.URLSearchParams(V, prefix, name); + } + + return webidl.converters.DOMString(V, prefix, name); + }; + + // https://fetch.spec.whatwg.org/#bodyinit + webidl.converters.BodyInit = function (V, prefix, argument) { + if (V instanceof ReadableStream) { + return webidl.converters.ReadableStream(V, prefix, argument); + } + + // Note: the spec doesn't include async iterables, + // this is an undici extension. + if (V?.[Symbol.asyncIterator]) { + return V; + } + + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + + 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 = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse, + fromInnerResponse, + }; + + /***/ + }, + + /***/ 3627: /***/ (module) => { + "use strict"; + + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher"), + }; + + /***/ + }, + + /***/ 3168: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { Transform } = __nccwpck_require__(7075); + const zlib = __nccwpck_require__(8522); + const { + redirectStatusSet, + referrerPolicySet: referrerPolicyTokens, + badPortsSet, + } = __nccwpck_require__(4495); + const { getGlobalOrigin } = __nccwpck_require__(1059); + const { + collectASequenceOfCodePoints, + collectAnHTTPQuotedString, + removeChars, + parseMIMEType, + } = __nccwpck_require__(1900); + const { performance } = __nccwpck_require__(643); + const { + isBlobLike, + ReadableStreamFrom, + isValidHTTPToken, + normalizedMethodRecordsBase, + } = __nccwpck_require__(3440); + const assert = __nccwpck_require__(4589); + const { isUint8Array } = __nccwpck_require__(3429); + const { webidl } = __nccwpck_require__(5893); + + let supportedHashes = []; + + // https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __nccwpck_require__(7598); + 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", true); + + // 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)) { + if (!isValidEncodedURL(location)) { + // Some websites respond location header in UTF-8 form without encoding them as ASCII + // and major browsers redirect them to correctly UTF-8 encoded addresses. + // Here, we handle that behavior in the same way. + location = normalizeBinaryStringToUtf8(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; + } + + /** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + + if ( + code > 0x7e || // Non-US-ASCII + DEL + code < 0x20 // Control characters NUL - US + ) { + return false; + } + } + return true; + } + + /** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + + /** @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://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + const isValidHeaderName = isValidHTTPToken; + + /** + * @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. + return ( + (potentialValue[0] === "\t" || + potentialValue[0] === " " || + potentialValue[potentialValue.length - 1] === "\t" || + potentialValue[potentialValue.length - 1] === " " || + potentialValue.includes("\n") || + potentialValue.includes("\r") || + potentialValue.includes("\0")) === false + ); + } + + // https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect + function 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", true) ?? "" + ).split(","); + + // Note: As the referrer-policy can contain multiple policies + // separated by comma, we need to loop through all of them + // and pick the first valid one. + // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy + let policy = ""; + if (policyHeader.length > 0) { + // The right-most policy takes precedence. + // The left-most policy is the fallback. + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + } + + // 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, true); + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header + // TODO + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header + // TODO + } + + // https://fetch.spec.whatwg.org/#append-a-request-origin-header + function appendRequestOriginHeader(request) { + // 1. Let serializedOrigin be the result of byte-serializing a request origin + // with request. + // TODO: implement "byte-serializing a request origin" + let serializedOrigin = request.origin; + + // - "'client' is changed to an origin during fetching." + // This doesn't happen in undici (in most cases) because undici, by default, + // has no concept of origin. + // - request.origin can also be set to request.client.origin (client being + // an environment settings object), which is undefined without using + // setGlobalOrigin. + if (serializedOrigin === "client" || serializedOrigin === undefined) { + return; + } + + // 2. If request’s response tainting is "cors" or request’s mode is "websocket", + // then append (`Origin`, serializedOrigin) to request’s header list. + // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: + if ( + request.responseTainting === "cors" || + request.mode === "websocket" + ) { + request.headersList.append("origin", serializedOrigin, true); + } else if (request.method !== "GET" && request.method !== "HEAD") { + // 1. Switch on request’s referrer policy: + switch (request.referrerPolicy) { + case "no-referrer": + // Set serializedOrigin to `null`. + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + // If request’s origin is a tuple origin, its scheme is "https", and + // request’s current URL’s scheme is not "https", then set + // serializedOrigin to `null`. + if ( + request.origin && + 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; + } + break; + default: + // Do nothing. + } + + // 2. Append (`Origin`, serializedOrigin) to request’s header list. + request.headersList.append("origin", serializedOrigin, true); + } + } + + // https://w3c.github.io/hr-time/#dfn-coarsen-time + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + // TODO + return timestamp; + } + + // https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info + function clampAndCoarsenConnectionTimingInfo( + connectionTimingInfo, + defaultStartTime, + crossOriginIsolatedCapability, + ) { + if ( + !connectionTimingInfo?.startTime || + connectionTimingInfo.startTime < defaultStartTime + ) { + return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: + connectionTimingInfo?.ALPNNegotiatedProtocol, + }; + } + + return { + domainLookupStartTime: coarsenTime( + connectionTimingInfo.domainLookupStartTime, + crossOriginIsolatedCapability, + ), + domainLookupEndTime: coarsenTime( + connectionTimingInfo.domainLookupEndTime, + crossOriginIsolatedCapability, + ), + connectionStartTime: coarsenTime( + connectionTimingInfo.connectionStartTime, + crossOriginIsolatedCapability, + ), + connectionEndTime: coarsenTime( + connectionTimingInfo.connectionEndTime, + crossOriginIsolatedCapability, + ), + secureConnectionStartTime: coarsenTime( + connectionTimingInfo.secureConnectionStartTime, + crossOriginIsolatedCapability, + ), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol, + }; + } + + // https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance.now(), crossOriginIsolatedCapability); + } + + // 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; + } + + // 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"; + } + + // 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 + /** + * 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); + + url = new URL(url); + + // 2. If url’s scheme is a local scheme, then return no referrer. + if ( + url.protocol === "file:" || + url.protocol === "about:" || + url.protocol === "blank:" + ) { + return "no-referrer"; + } + + // 3. Set url’s username to the empty string. + url.username = ""; + + // 4. Set url’s password to the empty string. + url.password = ""; + + // 5. Set url’s fragment to null. + url.hash = ""; + + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 1. Set url’s path to « the empty string ». + url.pathname = ""; + + // 2. Set url’s query to null. + url.search = ""; + } + + // 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); + } + } + + // 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; + } + 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" + ); + } + + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod(method) { + return normalizedMethodRecordsBase[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 {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function createIterator( + name, + kInternalIterator, + keyIndex = 0, + valueIndex = 1, + ) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + + next() { + // 1. Let interface be the interface for which the iterator prototype object exists. + // 2. Let thisValue be the this value. + // 3. Let object be ? ToObject(thisValue). + // 4. If object is a platform object, then perform a security + // check, passing: + // 5. If object is not a default iterator object for interface, + // then throw a TypeError. + if ( + typeof this !== "object" || + this === null || + !(#target in this) + ) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.`, + ); + } + + // 6. Let index be object’s index. + // 7. Let kind be object’s kind. + // 8. Let values be object’s target's value pairs to iterate over. + const index = this.#index; + const values = this.#target[kInternalIterator]; + + // 9. Let len be the length of values. + const len = values.length; + + // 10. If index is greater than or equal to len, then return + // CreateIterResultObject(undefined, true). + if (index >= len) { + return { + value: undefined, + done: true, + }; + } + + // 11. Let pair be the entry in values at index index. + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + + // 12. Set object’s index to index + 1. + this.#index = index + 1; + + // 13. Return the iterator result for pair and kind. + + // https://webidl.spec.whatwg.org/#iterator-result + + // 1. Let result be a value determined by the value of kind: + let result; + switch (this.#kind) { + case "key": + // 1. Let idlKey be pair’s key. + // 2. Let key be the result of converting idlKey to an + // ECMAScript value. + // 3. result is key. + result = key; + break; + case "value": + // 1. Let idlValue be pair’s value. + // 2. Let value be the result of converting idlValue to + // an ECMAScript value. + // 3. result is value. + result = value; + break; + case "key+value": + // 1. Let idlKey be pair’s key. + // 2. Let idlValue be pair’s value. + // 3. Let key be the result of converting idlKey to an + // ECMAScript value. + // 4. Let value be the result of converting idlValue to + // an ECMAScript value. + // 5. Let array be ! ArrayCreate(2). + // 6. Call ! CreateDataProperty(array, "0", key). + // 7. Call ! CreateDataProperty(array, "1", value). + // 8. result is array. + result = [key, value]; + break; + } + + // 2. Return CreateIterResultObject(result, false). + return { + value: result, + done: false, + }; + } + } + + // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + // @ts-ignore + delete FastIterableIterator.prototype.constructor; + + Object.setPrototypeOf( + FastIterableIterator.prototype, + esIteratorPrototype, + ); + + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator`, + }, + next: { writable: true, enumerable: true, configurable: true }, + }); + + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ + return function (target, kind) { + return new FastIterableIterator(target, kind); + }; + } + + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function iteratorMixin( + name, + object, + kInternalIterator, + keyIndex = 0, + valueIndex = 1, + ) { + const makeIterator = createIterator( + name, + kInternalIterator, + keyIndex, + valueIndex, + ); + + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + }, + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + }, + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + }, + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") { + throw new TypeError( + `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`, + ); + } + for (const { 0: key, 1: value } of makeIterator( + this, + "key+value", + )) { + callbackfn.call(thisArg, value, key, this); + } + }, + }, + }; + + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value, + }, + }); + } + + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function 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 { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + + function isReadableStreamLike(stream) { + return ( + stream instanceof ReadableStream || + (stream[Symbol.toStringTag] === "ReadableStream" && + typeof stream.tee === "function") + ); + } + + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + // TODO: add comment explaining why this error occurs. + if ( + !err.message.includes("Controller is already closed") && + !err.message.includes("ReadableStream is already closed") + ) { + throw err; + } + } + } + + const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; // eslint-disable-line + + /** + * @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. + assert(!invalidIsomorphicEncodeValueRegex.test(input)); + + // 2. Return a byte sequence whose length is equal to input’s code + // point length and whose bytes have the same values as the + // values of input’s code points, in the same order + return input; + } + + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function 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 + * @returns {boolean} + */ + function urlHasHttpsScheme(url) { + return ( + (typeof url === "string" && + url[5] === ":" && + url[0] === "h" && + url[1] === "t" && + url[2] === "t" && + url[3] === "p" && + url[4] === "s") || + url.protocol === "https:" + ); + } + + /** + * @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:"; + } + + /** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ + function simpleRangeHeaderValue(value, allowWhitespace) { + // 1. Let data be the isomorphic decoding of value. + // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, + // nothing more. We obviously don't need to do that if value is a string already. + const data = value; + + // 2. If data does not start with "bytes", then return failure. + if (!data.startsWith("bytes")) { + return "failure"; + } + + // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. + const position = { position: 5 }; + + // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, + // from data given position. + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === "\t" || char === " ", + data, + position, + ); + } + + // 5. If the code point at position within data is not U+003D (=), then return failure. + if (data.charCodeAt(position.position) !== 0x3d) { + return "failure"; + } + + // 6. Advance position by 1. + position.position++; + + // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from + // data given position. + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === "\t" || char === " ", + data, + position, + ); + } + + // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, + // from data given position. + const rangeStart = collectASequenceOfCodePoints( + (char) => { + const code = char.charCodeAt(0); + + return code >= 0x30 && code <= 0x39; + }, + data, + position, + ); + + // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the + // empty string; otherwise null. + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + + // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, + // from data given position. + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === "\t" || char === " ", + data, + position, + ); + } + + // 11. If the code point at position within data is not U+002D (-), then return failure. + if (data.charCodeAt(position.position) !== 0x2d) { + return "failure"; + } + + // 12. Advance position by 1. + position.position++; + + // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab + // or space, from data given position. + // Note from Khafra: its the same step as in #8 again lol + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === "\t" || char === " ", + data, + position, + ); + } + + // 14. Let rangeEnd be the result of collecting a sequence of code points that are + // ASCII digits, from data given position. + // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 + const rangeEnd = collectASequenceOfCodePoints( + (char) => { + const code = char.charCodeAt(0); + + return code >= 0x30 && code <= 0x39; + }, + data, + position, + ); + + // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd + // is not the empty string; otherwise null. + // Note from Khafra: THE SAME STEP, AGAIN!!! + // Note: why interpret as a decimal if we only collect ascii digits? + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + + // 16. If position is not past the end of data, then return failure. + if (position.position < data.length) { + return "failure"; + } + + // 17. If rangeEndValue and rangeStartValue are null, then return failure. + if (rangeEndValue === null && rangeStartValue === null) { + return "failure"; + } + + // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is + // greater than rangeEndValue, then return failure. + // Note: ... when can they not be numbers? + if (rangeStartValue > rangeEndValue) { + return "failure"; + } + + // 19. Return (rangeStartValue, rangeEndValue). + return { rangeStartValue, rangeEndValue }; + } + + /** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ + function buildContentRange(rangeStart, rangeEnd, fullLength) { + // 1. Let contentRange be `bytes `. + let contentRange = "bytes "; + + // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. + contentRange += isomorphicEncode(`${rangeStart}`); + + // 3. Append 0x2D (-) to contentRange. + contentRange += "-"; + + // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. + contentRange += isomorphicEncode(`${rangeEnd}`); + + // 5. Append 0x2F (/) to contentRange. + contentRange += "/"; + + // 6. Append fullLength, serialized and isomorphic encoded to contentRange. + contentRange += isomorphicEncode(`${fullLength}`); + + // 7. Return contentRange. + return contentRange; + } + + // A Stream, which pipes the response to zlib.createInflate() or + // zlib.createInflateRaw() depending on the first byte of the Buffer. + // If the lower byte of the first byte is 0x08, then the stream is + // interpreted as a zlib stream, otherwise it's interpreted as a + // raw deflate stream. + class InflateStream extends Transform { + #zlibOptions; + + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = + (chunk[0] & 0x0f) === 0x08 + ? zlib.createInflate(this.#zlibOptions) + : zlib.createInflateRaw(this.#zlibOptions); + + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + + this._inflateStream.write(chunk, encoding, callback); + } + + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + } + + /** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + + /** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ + function extractMimeType(headers) { + // 1. Let charset be null. + let charset = null; + + // 2. Let essence be null. + let essence = null; + + // 3. Let mimeType be null. + let mimeType = null; + + // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. + const values = getDecodeSplit("content-type", headers); + + // 5. If values is null, then return failure. + if (values === null) { + return "failure"; + } + + // 6. For each value of values: + for (const value of values) { + // 6.1. Let temporaryMimeType be the result of parsing value. + const temporaryMimeType = parseMIMEType(value); + + // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. + if ( + temporaryMimeType === "failure" || + temporaryMimeType.essence === "*/*" + ) { + continue; + } + + // 6.3. Set mimeType to temporaryMimeType. + mimeType = temporaryMimeType; + + // 6.4. If mimeType’s essence is not essence, then: + if (mimeType.essence !== essence) { + // 6.4.1. Set charset to null. + charset = null; + + // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to + // mimeType’s parameters["charset"]. + if (mimeType.parameters.has("charset")) { + charset = mimeType.parameters.get("charset"); + } + + // 6.4.3. Set essence to mimeType’s essence. + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) { + // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and + // charset is non-null, set mimeType’s parameters["charset"] to charset. + mimeType.parameters.set("charset", charset); + } + } + + // 7. If mimeType is null, then return failure. + if (mimeType == null) { + return "failure"; + } + + // 8. Return mimeType. + return mimeType; + } + + /** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ + function gettingDecodingSplitting(value) { + // 1. Let input be the result of isomorphic decoding value. + const input = value; + + // 2. Let position be a position variable for input, initially pointing at the start of input. + const position = { position: 0 }; + + // 3. Let values be a list of strings, initially empty. + const values = []; + + // 4. Let temporaryValue be the empty string. + let temporaryValue = ""; + + // 5. While position is not past the end of input: + while (position.position < input.length) { + // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") + // or U+002C (,) from input, given position, to temporaryValue. + temporaryValue += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== ",", + input, + position, + ); + + // 5.2. If position is not past the end of input, then: + if (position.position < input.length) { + // 5.2.1. If the code point at position within input is U+0022 ("), then: + if (input.charCodeAt(position.position) === 0x22) { + // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. + temporaryValue += collectAnHTTPQuotedString(input, position); + + // 5.2.1.2. If position is not past the end of input, then continue. + if (position.position < input.length) { + continue; + } + } else { + // 5.2.2. Otherwise: + + // 5.2.2.1. Assert: the code point at position within input is U+002C (,). + assert(input.charCodeAt(position.position) === 0x2c); + + // 5.2.2.2. Advance position by 1. + position.position++; + } + } + + // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. + temporaryValue = removeChars( + temporaryValue, + true, + true, + (char) => char === 0x9 || char === 0x20, + ); + + // 5.4. Append temporaryValue to values. + values.push(temporaryValue); + + // 5.6. Set temporaryValue to the empty string. + temporaryValue = ""; + } + + // 6. Return values. + return values; + } + + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ + function getDecodeSplit(name, list) { + // 1. Let value be the result of getting name from list. + const value = list.get(name, true); + + // 2. If value is null, then return null. + if (value === null) { + return null; + } + + // 3. Return the result of getting, decoding, and splitting value. + return gettingDecodingSplitting(value); + } + + const textDecoder = new TextDecoder(); + + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) { + return ""; + } + + // 1. Let buffer be the result of peeking three bytes from + // ioQueue, converted to a byte sequence. + + // 2. If buffer is 0xEF 0xBB 0xBF, then read three + // bytes from ioQueue. (Do nothing with those bytes.) + if (buffer[0] === 0xef && buffer[1] === 0xbb && buffer[2] === 0xbf) { + buffer = buffer.subarray(3); + } + + // 3. Process a queue with an instance of UTF-8’s + // decoder, ioQueue, output, and "replacement". + const output = textDecoder.decode(buffer); + + // 4. Return output. + return output; + } + + class EnvironmentSettingsObjectBase { + get baseUrl() { + return getGlobalOrigin(); + } + + get origin() { + return this.baseUrl?.origin; + } + + policyContainer = makePolicyContainer(); + } + + class EnvironmentSettingsObject { + settingsObject = new EnvironmentSettingsObjectBase(); + } + + const environmentSettingsObject = new EnvironmentSettingsObject(); + + module.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject, + }; + + /***/ + }, + + /***/ 5893: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { types, inspect } = __nccwpck_require__(7975); + const { markAsUncloneable } = __nccwpck_require__(5919); + const { toUSVString } = __nccwpck_require__(3440); + + /** @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) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; // node compat. + throw err; + } + } else { + if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; // node compat. + throw err; + } + } + }; + + 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.`, + header: 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"; + } + + return "Object"; + } + } + }; + + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}); + // 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 ${webidl.util.Stringify(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; + }; + + webidl.util.Stringify = function (V) { + const type = webidl.util.Type(V); + + switch (type) { + case "Symbol": + return `Symbol(${V.description})`; + case "Object": + return inspect(V); + case "String": + return `"${V}"`; + default: + return `${V}`; + } + }; + + // https://webidl.spec.whatwg.org/#es-sequence + webidl.sequenceConverter = function (converter) { + return (V, prefix, argument, Iterable) => { + // 1. If Type(V) is not Object, throw a TypeError. + if (webidl.util.Type(V) !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.`, + }); + } + + // 2. Let method be ? GetMethod(V, @@iterator). + /** @type {Generator} */ + const method = + typeof Iterable === "function" + ? Iterable() + : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + + // 3. If method is undefined, throw a TypeError. + if (method === undefined || typeof method.next !== "function") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.`, + }); + } + + // https://webidl.spec.whatwg.org/#create-sequence-from-iterable + while (true) { + const { done, value } = method.next(); + + if (done) { + break; + } + + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + + return seq; + }; + }; + + // https://webidl.spec.whatwg.org/#es-to-record + webidl.recordConverter = function (keyConverter, valueConverter) { + return (O, prefix, argument) => { + // 1. If Type(O) is not Object, throw a TypeError. + if (webidl.util.Type(O) !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.`, + }); + } + + // 2. Let result be a new empty instance of record. + const result = {}; + + if (!types.isProxy(O)) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const keys = [ + ...Object.getOwnPropertyNames(O), + ...Object.getOwnPropertySymbols(O), + ]; + + for (const key of keys) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key, prefix, argument); + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key], prefix, argument); + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue; + } + + // 5. Return result. + return result; + } + + // 3. Let keys be ? O.[[OwnPropertyKeys]](). + const keys = Reflect.ownKeys(O); + + // 4. For each key of keys. + for (const key of keys) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const desc = Reflect.getOwnPropertyDescriptor(O, key); + + // 2. If desc is not undefined and desc.[[Enumerable]] is true: + if (desc?.enumerable) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key, prefix, argument); + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key], prefix, argument); + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue; + } + } + + // 5. Return result. + return result; + }; + }; + + webidl.interfaceConverter = function (i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.`, + }); + } + + return V; + }; + }; + + webidl.dictionaryConverter = function (converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + + if (type === "Null" || type === "Undefined") { + return dict; + } else if (type !== "Object") { + throw webidl.errors.exception({ + header: prefix, + 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 (!Object.hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".`, + }); + } + } + + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + + // Only use defaultValue if value is undefined and + // a defaultValue options was provided. + if (hasDefault && value !== null) { + value ??= defaultValue(); + } + + // A key can be optional and have no default value. + // When this happens, do not perform a conversion, + // and do not assign the key a value. + if (required || hasDefault || value !== undefined) { + value = converter(value, prefix, `${argument}.${key}`); + + if ( + options.allowedValues && + !options.allowedValues.includes(value) + ) { + throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.`, + }); + } + + dict[key] = value; + } + } + + return dict; + }; + }; + + webidl.nullableConverter = function (converter) { + return (V, prefix, argument) => { + if (V === null) { + return V; + } + + return converter(V, prefix, argument); + }; + }; + + // https://webidl.spec.whatwg.org/#es-DOMString + webidl.converters.DOMString = function (V, prefix, argument, opts) { + // 1. If V is null and the conversion is to an IDL type + // associated with the [LegacyNullToEmptyString] + // extended attribute, then return the DOMString value + // that represents the empty string. + if (V === null && opts?.legacyNullToEmptyString) { + return ""; + } + + // 2. Let x be ? ToString(V). + if (typeof V === "symbol") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.`, + }); + } + + // 3. Return the IDL DOMString value that represents the + // same sequence of code units as the one the + // ECMAScript String value x represents. + return String(V); + }; + + // https://webidl.spec.whatwg.org/#es-ByteString + webidl.converters.ByteString = function (V, prefix, argument) { + // 1. Let x be ? ToString(V). + // Note: DOMString converter perform ? ToString(V) + const x = webidl.converters.DOMString(V, prefix, argument); + + // 2. If the value of any element of x is greater than + // 255, then throw a TypeError. + for (let index = 0; index < x.length; index++) { + if (x.charCodeAt(index) > 255) { + throw new TypeError( + "Cannot convert argument to a ByteString because the character at " + + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`, + ); + } + } + + // 3. Return an IDL ByteString value whose length is the + // length of x, and where the value of each element is + // the value of the corresponding element of x. + return x; + }; + + // https://webidl.spec.whatwg.org/#es-USVString + // TODO: rewrite this so we can control the errors thrown + 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, prefix, argument) { + // 1. Let x be ? ConvertToInt(V, 64, "signed"). + const x = webidl.util.ConvertToInt( + V, + 64, + "signed", + undefined, + prefix, + argument, + ); + + // 2. Return the IDL long long value that represents + // the same numeric value as x. + return x; + }; + + // https://webidl.spec.whatwg.org/#es-unsigned-long-long + webidl.converters["unsigned long long"] = function (V, prefix, argument) { + // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). + const x = webidl.util.ConvertToInt( + V, + 64, + "unsigned", + undefined, + prefix, + argument, + ); + + // 2. Return the IDL unsigned long long value that + // represents the same numeric value as x. + return x; + }; + + // https://webidl.spec.whatwg.org/#es-unsigned-long + webidl.converters["unsigned long"] = function (V, prefix, argument) { + // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). + const x = webidl.util.ConvertToInt( + V, + 32, + "unsigned", + undefined, + prefix, + argument, + ); + + // 2. Return the IDL unsigned long value that + // represents the same numeric value as x. + return x; + }; + + // https://webidl.spec.whatwg.org/#es-unsigned-short + webidl.converters["unsigned short"] = function ( + V, + prefix, + argument, + opts, + ) { + // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). + const x = webidl.util.ConvertToInt( + V, + 16, + "unsigned", + opts, + prefix, + argument, + ); + + // 2. Return the IDL unsigned short value that represents + // the same numeric value as x. + return x; + }; + + // https://webidl.spec.whatwg.org/#idl-ArrayBuffer + webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { + // 1. If Type(V) is not Object, or V does not have an + // [[ArrayBufferData]] internal slot, then throw a + // TypeError. + // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances + // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances + if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(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. + if (V.resizable || V.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer.", + }); + } + + // 4. Return the IDL ArrayBuffer value that is a + // reference to the same object as V. + return V; + }; + + webidl.converters.TypedArray = function (V, T, prefix, name, opts) { + // 1. Let T be the IDL type V is being converted to. + + // 2. If Type(V) is not Object, or V does not have a + // [[TypedArrayName]] internal slot with a value + // equal to T’s name, then throw a TypeError. + if ( + webidl.util.Type(V) !== "Object" || + !types.isTypedArray(V) || + V.constructor.name !== T.name + ) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name], + }); + } + + // 3. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if ( + opts?.allowShared === false && + 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. + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer.", + }); + } + + // 5. Return the IDL value of type T that is a reference + // to the same object as V. + return V; + }; + + webidl.converters.DataView = function (V, prefix, name, opts) { + // 1. If Type(V) is not Object, or V does not have a + // [[DataView]] internal slot, then throw a TypeError. + if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.`, + }); + } + + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, + // then throw a TypeError. + if ( + opts?.allowShared === false && + 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. + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer.", + }); + } + + // 4. Return the IDL DataView value that is a reference + // to the same object as V. + return V; + }; + + // https://webidl.spec.whatwg.org/#BufferSource + webidl.converters.BufferSource = function (V, prefix, name, opts) { + if (types.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false, + }); + } + + if (types.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false, + }); + } + + if (types.isDataView(V)) { + return webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false, + }); + } + + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["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, + }; + + /***/ + }, + + /***/ 2607: /***/ (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, + }; + + /***/ + }, + + /***/ 8355: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = + __nccwpck_require__(3610); + const { kState, kError, kResult, kEvents, kAborted } = + __nccwpck_require__(961); + const { webidl } = __nccwpck_require__(5893); + const { kEnumerableProperty } = __nccwpck_require__(3440); + + 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, + "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, + "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, "FileReader.readAsText"); + + blob = webidl.converters.Blob(blob, { strict: false }); + + if (encoding !== undefined) { + encoding = webidl.converters.DOMString( + encoding, + "FileReader.readAsText", + "encoding", + ); + } + + // The readAsText(blob, encoding) method, when invoked, + // must initiate a read operation for blob with Text and encoding. + readOperation(this, blob, "Text", encoding); + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, FileReader); + + webidl.argumentLengthCheck(arguments, 1, "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"); + } + + /** + * @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; + } + + // 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); + } + } + + /** + * @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); + + // 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]; + } + + 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; + } + } + } + + // 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, + }; + + /***/ + }, + + /***/ 8573: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { webidl } = __nccwpck_require__(5893); + + const kState = Symbol("ProgressEvent state"); + + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + class ProgressEvent extends Event { + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString( + type, + "ProgressEvent constructor", + "type", + ); + eventInitDict = webidl.converters.ProgressEventInit( + eventInitDict ?? {}, + ); + + super(type, 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, + }, + ]); + + module.exports = { + ProgressEvent, + }; + + /***/ + }, + + /***/ 961: /***/ (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"), + }; + + /***/ + }, + + /***/ 3610: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { kState, kError, kResult, kAborted, kLastProgressEventFired } = + __nccwpck_require__(961); + const { ProgressEvent } = __nccwpck_require__(8573); + const { getEncoding } = __nccwpck_require__(2607); + const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(1900); + const { types } = __nccwpck_require__(7975); + const { StringDecoder } = __nccwpck_require__(3193); + const { btoa } = __nccwpck_require__(4573); + + /** @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); + }); + } + + // 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); + } + }); + + 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); + } + }); + + break; + } + } + })(); + } + + /** + * @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)); + } + + dataURL += btoa(decoder.end()); + + return dataURL; + } + case "Text": { + // 1. Let encoding be failure + let encoding = "failure"; + + // 2. If the encodingName is present, set encoding to the + // result of getting an encoding from encodingName. + if (encodingName) { + encoding = 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")); + } + } + + // 4. If encoding is failure, then set encoding to UTF-8. + if (encoding === "failure") { + encoding = "UTF-8"; + } + + // 5. Decode bytes using fallback encoding encoding, and + // return the result. + return 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); + } + + binaryString += decoder.end(); + + return binaryString; + } + } + } + + /** + * @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, + }; + + /***/ + }, + + /***/ 6897: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = + __nccwpck_require__(736); + const { + kReadyState, + kSentClose, + kByteParser, + kReceivedClose, + kResponse, + } = __nccwpck_require__(1216); + const { + fireEvent, + failWebsocketConnection, + isClosing, + isClosed, + isEstablished, + parseExtensions, + } = __nccwpck_require__(8625); + const { channels } = __nccwpck_require__(2414); + const { CloseEvent } = __nccwpck_require__(5188); + const { makeRequest } = __nccwpck_require__(9967); + const { fetching } = __nccwpck_require__(4398); + const { Headers, getHeadersList } = __nccwpck_require__(660); + const { getDecodeSplit } = __nccwpck_require__(3168); + const { WebsocketFrameSend } = __nccwpck_require__(3264); + + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __nccwpck_require__(7598); + /* c8 ignore next 3 */ + } catch {} + + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection( + url, + protocols, + client, + ws, + onEstablish, + options, + ) { + // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s + // scheme is "ws", and to "https" otherwise. + const requestURL = url; + + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + + // 2. Let request be a new request, whose URL is requestURL, client is client, + // service-workers mode is "none", referrer is "no-referrer", mode is + // "websocket", credentials mode is "include", cache mode is "no-store" , + // and redirect mode is "error". + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error", + }); + + // Note: undici extension, allow setting custom headers. + if (options.headers) { + const headersList = getHeadersList(new Headers(options.headers)); + + 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 + const permessageDeflate = "permessage-deflate; client_max_window_bits"; + + // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to + // request’s header list. + request.headersList.append( + "sec-websocket-extensions", + permessageDeflate, + ); + + // 11. Fetch request with useParallelQueue set to true, and + // processResponse given response being these steps: + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + // 1. If response is a network error or its status is not 101, + // fail the WebSocket connection. + if (response.type === "error" || response.status !== 101) { + 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", + ); + let extensions; + + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection( + ws, + "Sec-WebSocket-Extensions header does not match.", + ); + return; + } + } + + // 6. If the response includes a |Sec-WebSocket-Protocol| header field + // and this header field indicates the use of a subprotocol that was + // not present in the client's handshake (the server has indicated a + // subprotocol not requested by the client), the client MUST _Fail + // the WebSocket Connection_. + const secProtocol = response.headersList.get( + "Sec-WebSocket-Protocol", + ); + + if (secProtocol !== null) { + const requestProtocols = getDecodeSplit( + "sec-websocket-protocol", + request.headersList, + ); + + // The client can request that the server use a specific subprotocol by + // including the |Sec-WebSocket-Protocol| field in its handshake. If it + // is specified, the server needs to include the same field and one of + // the selected subprotocol values in its response for the connection to + // be established. + if (!requestProtocols.includes(secProtocol)) { + 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, extensions); + }, + }); + + return controller; + } + + function closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if (isClosing(ws) || isClosed(ws)) { + // If this's ready state is CLOSING (2) or CLOSED (3) + // Do nothing. + } else if (!isEstablished(ws)) { + // If the WebSocket connection is not yet established + // Fail the WebSocket connection and set this's ready state + // to CLOSING (2). + failWebsocketConnection( + ws, + "Connection was closed before it was established.", + ); + ws[kReadyState] = states.CLOSING; + } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { + // If the WebSocket closing handshake has not yet been started + // Start the WebSocket closing handshake and set this's ready + // state to CLOSING (2). + // - If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // - If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + // - If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + + ws[kSentClose] = sentCloseFrameState.PROCESSING; + + 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; + } + + /** @type {import('stream').Duplex} */ + const socket = ws[kResponse].socket; + + socket.write(frame.createFrame(opcodes.CLOSE)); + + ws[kSentClose] = sentCloseFrameState.SENT; + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + ws[kReadyState] = states.CLOSING; + } else { + // Otherwise + // Set this's ready state to CLOSING (2). + ws[kReadyState] = states.CLOSING; + } + } + + /** + * @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; + const { [kResponse]: response } = ws; + + response.socket.off("data", onSocketData); + response.socket.off("close", onSocketClose); + response.socket.off("error", onSocketError); + + // If the TCP connection was closed after the + // WebSocket closing handshake was completed, the WebSocket connection + // is said to have been closed _cleanly_. + const wasClean = + ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]; + + let code = 1005; + let reason = ""; + + const result = ws[kByteParser].closingInfo; + + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kReceivedClose]) { + // If _The WebSocket + // Connection is Closed_ and no Close control frame was received by the + // endpoint (such as could occur if the underlying transport connection + // is lost), _The WebSocket Connection Close Code_ is considered to be + // 1006. + code = 1006; + } + + // 1. Change the ready state to CLOSED (3). + ws[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. + // TODO: process.nextTick + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { + 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, + closeWebSocketConnection, + }; + + /***/ + }, + + /***/ 736: /***/ (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 sentCloseFrameState = { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2, + }; + + 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); + + const sendHints = { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4, + }; + + module.exports = { + uid, + sentCloseFrameState, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer, + sendHints, + }; + + /***/ + }, + + /***/ 5188: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { webidl } = __nccwpck_require__(5893); + const { kEnumerableProperty } = __nccwpck_require__(3440); + const { kConstruct } = __nccwpck_require__(6443); + const { MessagePort } = __nccwpck_require__(5919); + + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + class MessageEvent extends Event { + #eventInit; + + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit( + eventInitDict, + prefix, + "eventInitDict", + ); + + super(type, eventInitDict); + + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + + 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, + "MessageEvent.initMessageEvent", + ); + + return new MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports, + }); + } + + static createFastMessageEvent(type, init) { + const messageEvent = new MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + } + + const { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + class CloseEvent extends Event { + #eventInit; + + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + + super(type, eventInitDict); + + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + + 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) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + + type = webidl.converters.DOMString(type, prefix, "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"], + defaultValue: () => new Array(0), + }, + ]); + + 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, + createFastMessageEvent, + }; + + /***/ + }, + + /***/ 3264: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { maxUnsigned16Bit } = __nccwpck_require__(736); + + const BUFFER_SIZE = 16386; + + /** @type {import('crypto')} */ + let crypto; + let buffer = null; + let bufIdx = BUFFER_SIZE; + + try { + crypto = __nccwpck_require__(7598); + /* c8 ignore next 3 */ + } catch { + crypto = { + // not full compatibility, but minimum. + randomFillSync: function randomFillSync(buffer, _offset, _size) { + for (let i = 0; i < buffer.length; ++i) { + buffer[i] = (Math.random() * 255) | 0; + } + return buffer; + }, + }; + } + + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto.randomFillSync( + (buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), + 0, + BUFFER_SIZE, + ); + } + return [ + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + ]; + } + + class WebsocketFrameSend { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = 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; + } + + const buffer = Buffer.allocUnsafe(bodyLength + offset); + + // Clear first 2 bytes, everything else is overwritten + buffer[0] = buffer[1] = 0; + buffer[0] |= 0x80; // FIN + buffer[0] = (buffer[0] & 0xf0) + opcode; // opcode + + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + + buffer[1] = payloadLength; + + if (payloadLength === 126) { + buffer.writeUInt16BE(bodyLength, 2); + } else if (payloadLength === 127) { + // Clear extended payload length + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + + buffer[1] |= 0x80; // MASK + + // mask body + for (let i = 0; i < bodyLength; ++i) { + buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + } + + return buffer; + } + } + + module.exports = { + WebsocketFrameSend, + }; + + /***/ + }, + + /***/ 9469: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = + __nccwpck_require__(8522); + const { isValidClientWindowBits } = __nccwpck_require__(8625); + const { MessageSizeExceededError } = __nccwpck_require__(8707); + + const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]); + const kBuffer = Symbol("kBuffer"); + const kLength = Symbol("kLength"); + + class PerMessageDeflate { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + + #options = {}; + + #maxPayloadSize = 0; + + /** + * @param {Map} extensions + */ + constructor(extensions, options) { + this.#options.serverNoContextTakeover = extensions.has( + "server_no_context_takeover", + ); + this.#options.serverMaxWindowBits = extensions.get( + "server_max_window_bits", + ); + + this.#maxPayloadSize = options.maxPayloadSize; + } + + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ + decompress(chunk, fin, callback) { + // An endpoint uses the following algorithm to decompress a message. + // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the + // payload of the message. + // 2. Decompress the resulting data using DEFLATE. + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + + if (this.#options.serverMaxWindowBits) { + // empty values default to Z_DEFAULT_WINDOWBITS + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(new Error("Invalid server_max_window_bits")); + return; + } + + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + + try { + this.#inflate = createInflateRaw({ windowBits }); + } catch (err) { + callback(err); + return; + } + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + + this.#inflate.on("data", (data) => { + this.#inflate[kLength] += data.length; + + if ( + this.#maxPayloadSize > 0 && + this.#inflate[kLength] > this.#maxPayloadSize + ) { + callback(new MessageSizeExceededError()); + this.#inflate.removeAllListeners(); + this.#inflate = null; + return; + } + + this.#inflate[kBuffer].push(data); + }); + + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + + this.#inflate.write(chunk); + if (fin) { + this.#inflate.write(tail); + } + + this.#inflate.flush(() => { + if (!this.#inflate) { + return; + } + + const full = Buffer.concat( + this.#inflate[kBuffer], + this.#inflate[kLength], + ); + + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + + callback(null, full); + }); + } + } + + module.exports = { PerMessageDeflate }; + + /***/ + }, + + /***/ 1652: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { Writable } = __nccwpck_require__(7075); + const assert = __nccwpck_require__(4589); + const { + parserStates, + opcodes, + states, + emptyBuffer, + sentCloseFrameState, + } = __nccwpck_require__(736); + const { kReadyState, kSentClose, kResponse, kReceivedClose } = + __nccwpck_require__(1216); + const { channels } = __nccwpck_require__(2414); + const { + isValidStatusCode, + isValidOpcode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isTextBinaryFrame, + isContinuationFrame, + } = __nccwpck_require__(8625); + const { WebsocketFrameSend } = __nccwpck_require__(3264); + const { closeWebSocketConnection } = __nccwpck_require__(6897); + const { PerMessageDeflate } = __nccwpck_require__(9469); + const { MessageSizeExceededError } = __nccwpck_require__(8707); + + function failWebsocketConnectionWithCode(ws, code, reason) { + closeWebSocketConnection(ws, code, reason, Buffer.byteLength(reason)); + failWebsocketConnection(ws, reason); + } + + // This code was influenced by ws released under the MIT license. + // Copyright (c) 2011 Einar Otto Stangvik + // Copyright (c) 2013 Arnout Kazemier and contributors + // Copyright (c) 2016 Luigi Pinca and contributors + + class ByteParser extends Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + + #state = parserStates.INFO; + + #info = {}; + #fragments = []; + + /** @type {Map} */ + #extensions; + + /** @type {number} */ + #maxFragments; + + /** @type {number} */ + #maxPayloadSize; + + /** + * @param {import('./websocket').WebSocket} ws + * @param {Map|null} extensions + * @param {{ maxFragments?: number, maxPayloadSize?: number }} [options] + */ + constructor(ws, extensions, options = {}) { + super(); + + this.ws = ws; + this.#extensions = extensions == null ? new Map() : extensions; + this.#maxFragments = options.maxFragments ?? 0; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; + + if (this.#extensions.has("permessage-deflate")) { + this.#extensions.set( + "permessage-deflate", + new PerMessageDeflate(extensions, options), + ); + } + } + + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + + this.run(callback); + } + + #validatePayloadLength() { + if ( + this.#maxPayloadSize > 0 && + !isControlFrame(this.#info.opcode) && + this.#info.payloadLength + this.#fragmentsBytes > + this.#maxPayloadSize + ) { + failWebsocketConnectionWithCode( + this.ws, + 1009, + "Payload size exceeds maximum allowed size", + ); + return false; + } + + return true; + } + + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) { + if (this.#state === parserStates.INFO) { + // If there aren't enough bytes to parse the payload length, etc. + if (this.#byteOffset < 2) { + return callback(); + } + + const buffer = this.consume(2); + const fin = (buffer[0] & 0x80) !== 0; + const opcode = buffer[0] & 0x0f; + const masked = (buffer[1] & 0x80) === 0x80; + + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 0x7f; + + const rsv1 = buffer[0] & 0x40; + const rsv2 = buffer[0] & 0x20; + const rsv3 = buffer[0] & 0x10; + + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.ws, "Invalid opcode received"); + return callback(); + } + + if (masked) { + failWebsocketConnection(this.ws, "Frame cannot be masked"); + return callback(); + } + + // MUST be 0 unless an extension is negotiated that defines meanings + // for non-zero values. If a nonzero value is received and none of + // the negotiated extensions defines the meaning of such a nonzero + // value, the receiving endpoint MUST _Fail the WebSocket + // Connection_. + // This document allocates the RSV1 bit of the WebSocket header for + // PMCEs and calls the bit the "Per-Message Compressed" bit. On a + // WebSocket connection where a PMCE is in use, this bit indicates + // whether a message is compressed or not. + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.ws, "Expected RSV1 to be clear."); + return; + } + + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection( + this.ws, + "RSV1, RSV2, RSV3 must be clear", + ); + return; + } + + if (fragmented && !isTextBinaryFrame(opcode)) { + // Only text and binary frames can be fragmented + failWebsocketConnection( + this.ws, + "Invalid frame type was fragmented.", + ); + return; + } + + // If we are already parsing a text/binary frame and do not receive either + // a continuation frame or close frame, fail the connection. + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.ws, "Expected continuation frame"); + return; + } + + if (this.#info.fragmented && fragmented) { + // A fragmented frame can't be fragmented itself + failWebsocketConnection( + this.ws, + "Fragmented frame exceeded 125 bytes.", + ); + return; + } + + // "All control frames MUST have a payload length of 125 bytes or less + // and MUST NOT be fragmented." + if ( + (payloadLength > 125 || fragmented) && + isControlFrame(opcode) + ) { + failWebsocketConnection( + this.ws, + "Control frame either too large or fragmented", + ); + return; + } + + if ( + isContinuationFrame(opcode) && + this.#fragments.length === 0 && + !this.#info.compressed + ) { + failWebsocketConnection( + this.ws, + "Unexpected continuation frame", + ); + return; + } + + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + + if (!this.#validatePayloadLength()) { + return; + } + } else if (payloadLength === 126) { + this.#state = parserStates.PAYLOADLENGTH_16; + } else if (payloadLength === 127) { + this.#state = parserStates.PAYLOADLENGTH_64; + } + + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === 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; + + if (!this.#validatePayloadLength()) { + return; + } + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) { + return callback(); + } + + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + const lower = buffer.readUInt32BE(4); + + // 2^31 is the maximum bytes an arraybuffer can contain + // on 32-bit systems. Although, on 64-bit systems, this is + // 2^53-1 bytes. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e + if (upper !== 0 || lower > 2 ** 31 - 1) { + failWebsocketConnection( + this.ws, + "Received payload length > 2^31 bytes.", + ); + return; + } + + this.#info.payloadLength = lower; + this.#state = parserStates.READ_DATA; + + if (!this.#validatePayloadLength()) { + return; + } + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) { + return callback(); + } + + const body = this.consume(this.#info.payloadLength); + + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else { + if (!this.#info.compressed) { + if (!this.writeFragments(body)) { + return; + } + + if ( + this.#maxPayloadSize > 0 && + this.#fragmentsBytes > this.#maxPayloadSize + ) { + failWebsocketConnectionWithCode( + this.ws, + 1009, + new MessageSizeExceededError().message, + ); + return; + } + + // If the frame is not fragmented, a message has been received. + // If the frame is fragmented, it will terminate with a fin bit set + // and an opcode of 0 (continuation), therefore we handle that when + // parsing continuation frames, not here. + if (!this.#info.fragmented && this.#info.fin) { + websocketMessageReceived( + this.ws, + this.#info.binaryType, + this.consumeFragments(), + ); + } + + this.#state = parserStates.INFO; + } else { + this.#extensions + .get("permessage-deflate") + .decompress(body, this.#info.fin, (error, data) => { + if (error) { + const code = + error instanceof MessageSizeExceededError + ? 1009 + : 1007; + failWebsocketConnectionWithCode( + this.ws, + code, + error.message, + ); + return; + } + + if (!this.writeFragments(data)) { + return; + } + + if ( + this.#maxPayloadSize > 0 && + this.#fragmentsBytes > this.#maxPayloadSize + ) { + failWebsocketConnectionWithCode( + this.ws, + 1009, + new MessageSizeExceededError().message, + ); + return; + } + + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + + websocketMessageReceived( + this.ws, + this.#info.binaryType, + this.consumeFragments(), + ); + + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + + this.#loop = false; + break; + } + } + } + } + } + + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) { + throw new Error("Called consume() before buffers satiated."); + } else if (n === 0) { + return 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; + } + + writeFragments(fragment) { + if ( + this.#maxFragments > 0 && + this.#fragments.length === this.#maxFragments + ) { + failWebsocketConnectionWithCode( + this.ws, + 1008, + "Too many message fragments", + ); + return false; + } + + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + return true; + } + + consumeFragments() { + const fragments = this.#fragments; + + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + + return output; + } + + parseCloseBody(data) { + assert(data.length !== 1); + + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + /** @type {number|undefined} */ + let code; + + if (data.length >= 2) { + // _The WebSocket Connection Close Code_ is + // defined as the status code (Section 7.4) contained in the first Close + // control frame received by the application + code = data.readUInt16BE(0); + } + + if (code !== undefined && !isValidStatusCode(code)) { + return { code: 1002, reason: "Invalid status code", error: true }; + } + + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 + /** @type {Buffer} */ + let reason = data.subarray(2); + + // Remove BOM + if (reason[0] === 0xef && reason[1] === 0xbb && reason[2] === 0xbf) { + reason = reason.subarray(3); + } + + try { + reason = utf8Decode(reason); + } catch { + return { code: 1007, reason: "Invalid UTF-8", error: true }; + } + + return { code, reason, error: false }; + } + + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection( + this.ws, + "Received close frame with a 1-byte body.", + ); + return false; + } + + this.#info.closeInfo = this.parseCloseBody(body); + + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + + closeWebSocketConnection(this.ws, code, reason, reason.length); + failWebsocketConnection(this.ws, reason); + return false; + } + + if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + // If an endpoint receives a Close frame and did not previously send a + // Close frame, the endpoint MUST send a Close frame in response. (When + // sending a Close frame in response, the endpoint typically echos the + // status code it received.) + let body = emptyBuffer; + if (this.#info.closeInfo.code) { + 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] = sentCloseFrameState.SENT; + } + }, + ); + } + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + + return false; + } else if (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" + + 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, + }); + } + } + } else if (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. + + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body, + }); + } + } + + return true; + } + + get closingInfo() { + return this.#info.closeInfo; + } + } + + module.exports = { + ByteParser, + }; + + /***/ + }, + + /***/ 3900: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { WebsocketFrameSend } = __nccwpck_require__(3264); + const { opcodes, sendHints } = __nccwpck_require__(736); + const FixedQueue = __nccwpck_require__(4660); + + /** @type {typeof Uint8Array} */ + const FastBuffer = Buffer[Symbol.species]; + + /** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ + + class SendQueue { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + + /** + * @type {boolean} + */ + #running = false; + + /** @type {import('node:net').Socket} */ + #socket; + + constructor(socket) { + this.#socket = socket; + } + + add(item, cb, hint) { + if (hint !== sendHints.blob) { + const frame = createFrame(item, hint); + if (!this.#running) { + // fast-path + this.#socket.write(frame, cb); + } else { + /** @type {SendQueueNode} */ + const node = { + promise: null, + callback: cb, + frame, + }; + this.#queue.push(node); + } + return; + } + + /** @type {SendQueueNode} */ + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null, + }; + + this.#queue.push(node); + + if (!this.#running) { + this.#run(); + } + } + + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + // wait pending promise + if (node.promise !== null) { + await node.promise; + } + // write + this.#socket.write(node.frame, node.callback); + // cleanup + node.callback = node.frame = null; + } + this.#running = false; + } + } + + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame( + hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY, + ); + } + + function toBuffer(data, hint) { + switch (hint) { + case sendHints.string: + return Buffer.from(data); + case sendHints.arrayBuffer: + case sendHints.blob: + return new FastBuffer(data); + case sendHints.typedArray: + return new FastBuffer( + data.buffer, + data.byteOffset, + data.byteLength, + ); + } + } + + module.exports = { SendQueue }; + + /***/ + }, + + /***/ 1216: /***/ (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"), + }; + + /***/ + }, + + /***/ 8625: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { + kReadyState, + kController, + kResponse, + kBinaryType, + kWebSocketURL, + } = __nccwpck_require__(1216); + const { states, opcodes } = __nccwpck_require__(736); + const { ErrorEvent, createFastMessageEvent } = __nccwpck_require__(5188); + const { isUtf8 } = __nccwpck_require__(4573); + const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = + __nccwpck_require__(1900); + + /* globals Blob */ + + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isConnecting(ws) { + // If the WebSocket connection is not yet established, and the connection + // is not yet closed, then the WebSocket connection is in the CONNECTING state. + return ws[kReadyState] === states.CONNECTING; + } + + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + 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 + * @returns {boolean} + */ + 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 + * @returns {boolean} + */ + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; + } + + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent( + e, + target, + eventFactory = (type, init) => new Event(type, init), + eventInitDict = {}, + ) { + // 1. If eventConstructor is not given, then let eventConstructor be Event. + + // 2. Let event be the result of creating an event given eventConstructor, + // in the relevant realm of target. + // 3. Initialize event’s type attribute to e. + const event = eventFactory(e, eventInitDict); + + // 4. Initialize any other IDL attributes of event as described in the + // invocation of this algorithm. + + // 5. Return the result of dispatching event at target, with legacy target + // override flag set if set. + target.dispatchEvent(event); + } + + /** + * @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 = utf8Decode(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 = toArrayBuffer(data); + } + } + + // 3. Fire an event named message at the WebSocket object, using MessageEvent, + // with the origin attribute initialized to the serialization of the WebSocket + // object’s url's origin, and the data attribute initialized to dataForEvent. + fireEvent("message", ws, createFastMessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent, + }); + } + + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) { + return buffer.buffer; + } + return buffer.buffer.slice( + buffer.byteOffset, + buffer.byteOffset + buffer.byteLength, + ); + } + + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol(protocol) { + // If present, this value indicates one + // or more comma-separated subprotocol the client wishes to speak, + // ordered by preference. The elements that comprise this value + // MUST be non-empty strings with characters in the range U+0021 to + // U+007E not including separator characters as defined in + // [RFC2616] and MUST all be unique strings. + if (protocol.length === 0) { + return false; + } + + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + + if ( + code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) + code > 0x7e || + code === 0x22 || // " + code === 0x28 || // ( + code === 0x29 || // ) + code === 0x2c || // , + code === 0x2f || // / + code === 0x3a || // : + code === 0x3b || // ; + code === 0x3c || // < + code === 0x3d || // = + code === 0x3e || // > + code === 0x3f || // ? + code === 0x40 || // @ + code === 0x5b || // [ + code === 0x5c || // \ + code === 0x5d || // ] + code === 0x7b || // { + code === 0x7d // } + ) { + return false; + } + } + + 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) { + // TODO: process.nextTick + fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason, + }); + } + } + + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ + function isControlFrame(opcode) { + return ( + opcode === opcodes.CLOSE || + opcode === opcodes.PING || + opcode === opcodes.PONG + ); + } + + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + + function isValidOpcode(opcode) { + return ( + isTextBinaryFrame(opcode) || + isContinuationFrame(opcode) || + isControlFrame(opcode) + ); + } + + /** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ + // TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = new Map(); + + while (position.position < extensions.length) { + const pair = collectASequenceOfCodePointsFast( + ";", + extensions, + position, + ); + const [name, value = ""] = pair.split("="); + + extensionList.set( + removeHTTPWhitespace(name, true, false), + removeHTTPWhitespace(value, false, true), + ); + + position.position++; + } + + return extensionList; + } + + /** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ + function isValidClientWindowBits(value) { + // Must have at least one character + if (value.length === 0) { + return false; + } + + // Check all characters are ASCII digits + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + + if (byte < 0x30 || byte > 0x39) { + return false; + } + } + + // Check numeric range: zlib requires windowBits in range 8-15 + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; + } + + // https://nodejs.org/api/intl.html#detecting-internationalization-support + const hasIntl = typeof process.versions.icu === "string"; + const fatalDecoder = hasIntl + ? new TextDecoder("utf-8", { fatal: true }) + : undefined; + + /** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ + const utf8Decode = hasIntl + ? fatalDecoder.decode.bind(fatalDecoder) + : function (buffer) { + if (isUtf8(buffer)) { + return buffer.toString("utf-8"); + } + throw new TypeError("Invalid utf-8 received."); + }; + + module.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits, + }; + + /***/ + }, + + /***/ 3726: /***/ ( + module, + __unused_webpack_exports, + __nccwpck_require__, + ) => { + "use strict"; + + const { webidl } = __nccwpck_require__(5893); + const { URLSerializer } = __nccwpck_require__(1900); + const { environmentSettingsObject } = __nccwpck_require__(3168); + const { + staticPropertyDescriptors, + states, + sentCloseFrameState, + sendHints, + } = __nccwpck_require__(736); + const { + kWebSocketURL, + kReadyState, + kController, + kBinaryType, + kResponse, + kSentClose, + kByteParser, + } = __nccwpck_require__(1216); + const { + isConnecting, + isEstablished, + isClosing, + isValidSubprotocol, + fireEvent, + } = __nccwpck_require__(8625); + const { establishWebSocketConnection, closeWebSocketConnection } = + __nccwpck_require__(6897); + const { ByteParser } = __nccwpck_require__(1652); + const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(3440); + const { getGlobalDispatcher } = __nccwpck_require__(2581); + const { types } = __nccwpck_require__(7975); + const { ErrorEvent, CloseEvent } = __nccwpck_require__(5188); + const { SendQueue } = __nccwpck_require__(3900); + + // https://websockets.spec.whatwg.org/#interface-definition + class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null, + }; + + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + + /** @type {SendQueue} */ + #sendQueue; + + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + + webidl.util.markAsUncloneable(this); + + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + const options = webidl.converters[ + "DOMString or sequence or WebSocketInit" + ](protocols, prefix, "options"); + + url = webidl.converters.USVString(url, prefix, "url"); + protocols = options.protocols; + + // 1. Let baseURL be this's relevant settings object's API base URL. + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. + let urlRecord; + + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, "SyntaxError"); + } + + // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". + if (urlRecord.protocol === "http:") { + urlRecord.protocol = "ws:"; + } else if (urlRecord.protocol === "https:") { + // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". + urlRecord.protocol = "wss:"; + } + + // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") { + throw new DOMException( + `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, + "SyntaxError", + ); + } + + // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" + // DOMException. + if (urlRecord.hash || urlRecord.href.endsWith("#")) { + throw new DOMException("Got fragment", "SyntaxError"); + } + + // 8. If protocols is a string, set protocols to a sequence consisting + // of just that string. + if (typeof protocols === "string") { + protocols = [protocols]; + } + + // 9. If any of the values in protocols occur more than once or otherwise + // fail to match the requirements for elements that comprise the value + // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket + // protocol, then throw a "SyntaxError" DOMException. + if ( + protocols.length !== + new Set(protocols.map((p) => p.toLowerCase())).size + ) { + throw new DOMException( + "Invalid Sec-WebSocket-Protocol value", + "SyntaxError", + ); + } + + if ( + protocols.length > 0 && + !protocols.every((p) => isValidSubprotocol(p)) + ) { + throw new DOMException( + "Invalid Sec-WebSocket-Protocol value", + "SyntaxError", + ); + } + + // 10. Set this's url to urlRecord. + this[kWebSocketURL] = new URL(urlRecord.href); + + // 11. Let client be this's relevant settings object. + const client = environmentSettingsObject.settingsObject; + + // 12. Run this step in parallel: + + // 1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this[kController] = establishWebSocketConnection( + urlRecord, + protocols, + client, + this, + (response, extensions) => + this.#onConnectionEstablished(response, extensions), + options, + ); + + // Each WebSocket object has an associated ready state, which is a + // number representing the state of the connection. Initially it must + // be CONNECTING (0). + this[kReadyState] = WebSocket.CONNECTING; + + this[kSentClose] = sentCloseFrameState.NOT_SENT; + + // The extensions attribute must initially return the empty string. + + // The protocol attribute must initially return the empty string. + + // Each WebSocket object has an associated binary type, which is a + // BinaryType. Initially it must be "blob". + this[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); + + const prefix = "WebSocket.close"; + + if (code !== undefined) { + code = webidl.converters["unsigned short"](code, prefix, "code", { + clamp: true, + }); + } + + if (reason !== undefined) { + reason = webidl.converters.USVString(reason, prefix, "reason"); + } + + // 1. If code is present, but is neither an integer equal to 1000 nor an + // integer in the range 3000 to 4999, inclusive, throw an + // "InvalidAccessError" DOMException. + if (code !== undefined) { + if (code !== 1000 && (code < 3000 || code > 4999)) { + throw new DOMException("invalid code", "InvalidAccessError"); + } + } + + let reasonByteLength = 0; + + // 2. If reason is present, then run these substeps: + if (reason !== undefined) { + // 1. Let reasonBytes be the result of encoding reason. + // 2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + reasonByteLength = Buffer.byteLength(reason); + + if (reasonByteLength > 123) { + throw new DOMException( + `Reason must be less than 123 bytes; received ${reasonByteLength}`, + "SyntaxError", + ); + } + } + + // 3. Run the first matching steps from the following list: + closeWebSocketConnection(this, code, reason, reasonByteLength); + } + + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + + // 1. If this's ready state is CONNECTING, then throw an + // "InvalidStateError" DOMException. + if (isConnecting(this)) { + throw new DOMException( + "Sent before connected.", + "InvalidStateError", + ); + } + + // 2. Run the appropriate set of steps from the following list: + // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 + // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 + + if (!isEstablished(this) || isClosing(this)) { + return; + } + + // If data is a string + if (typeof data === "string") { + // If the WebSocket connection is established and the WebSocket + // closing handshake has not yet started, then the user agent + // must send a WebSocket Message comprised of the data argument + // using a text frame opcode; if the data cannot be sent, e.g. + // because it would need to be buffered but the buffer is full, + // the user agent must flag the WebSocket as full and then close + // the WebSocket connection. Any invocation of this method with a + // string argument that does not throw an exception must increase + // the bufferedAmount attribute by the number of bytes needed to + // express the argument as UTF-8. + + const length = Buffer.byteLength(data); + + this.#bufferedAmount += length; + this.#sendQueue.add( + data, + () => { + this.#bufferedAmount -= length; + }, + sendHints.string, + ); + } 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. + + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add( + data, + () => { + this.#bufferedAmount -= data.byteLength; + }, + sendHints.arrayBuffer, + ); + } else if (ArrayBuffer.isView(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The + // data to be sent is the data stored in the section of the buffer + // described by the ArrayBuffer object that data references. Any + // invocation of this method with this kind of argument that does + // not throw an exception must increase the bufferedAmount attribute + // by the length of data’s buffer in bytes. + + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add( + data, + () => { + this.#bufferedAmount -= data.byteLength; + }, + sendHints.typedArray, + ); + } 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. + + this.#bufferedAmount += data.size; + this.#sendQueue.add( + data, + () => { + this.#bufferedAmount -= data.size; + }, + sendHints.blob, + ); + } + } + + 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; + } + + 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(type) { + webidl.brandCheck(this, WebSocket); + + if (type !== "blob" && type !== "arraybuffer") { + this[kBinaryType] = "blob"; + } else { + this[kBinaryType] = type; + } + } + + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + // processResponse is called when the "response's header list has been received and initialized." + // once this happens, the connection is open + this[kResponse] = response; + + const webSocketOptions = + this[kController]?.dispatcher?.webSocketOptions; + const maxFragments = webSocketOptions?.maxFragments; + const maxPayloadSize = webSocketOptions?.maxPayloadSize; + + const parser = new ByteParser(this, parsedExtensions, { + maxFragments, + maxPayloadSize, + }); + parser.on("drain", onParserDrain); + parser.on("error", onParserError.bind(this)); + + response.socket.ws = this; + this[kByteParser] = parser; + + this.#sendQueue = new SendQueue(response.socket); + + // 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; + } + + // 3. Change the protocol attribute’s value to the subprotocol in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 + const protocol = response.headersList.get("sec-websocket-protocol"); + + if (protocol !== null) { + this.#protocol = protocol; + } + + // 4. Fire an event named open at the WebSocket object. + 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, + prefix, + argument, + ) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) { + return webidl.converters["sequence"](V); + } + + return webidl.converters.DOMString(V, prefix, argument); + }; + + // This implements the proposal made in https://github.com/whatwg/websockets/issues/42 + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0), + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher(), + }, + { + 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 }); + } + + if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { + return webidl.converters.BufferSource(V); + } + } + + return webidl.converters.USVString(V); + }; + + function onParserDrain() { + this.ws[kResponse].socket.resume(); + } + + function onParserError(err) { + let message; + let code; + + if (err instanceof CloseEvent) { + message = err.reason; + code = err.code; + } else { + message = err.message; + } + + fireEvent( + "error", + this, + () => new ErrorEvent("error", { error: err, message }), + ); + + closeWebSocketConnection(this, code); + } + + module.exports = { + WebSocket, + }; + + /***/ + }, + + /***/ 2613: /***/ (module) => { + "use strict"; + module.exports = require("assert"); + + /***/ + }, + + /***/ 4434: /***/ (module) => { + "use strict"; + module.exports = require("events"); + + /***/ + }, + + /***/ 9896: /***/ (module) => { + "use strict"; + module.exports = require("fs"); + + /***/ + }, + + /***/ 8611: /***/ (module) => { + "use strict"; + module.exports = require("http"); + + /***/ + }, + + /***/ 5675: /***/ (module) => { + "use strict"; + module.exports = require("http2"); + + /***/ + }, + + /***/ 5692: /***/ (module) => { + "use strict"; + module.exports = require("https"); + + /***/ + }, + + /***/ 9278: /***/ (module) => { + "use strict"; + module.exports = require("net"); + + /***/ + }, + + /***/ 4589: /***/ (module) => { + "use strict"; + module.exports = require("node:assert"); + + /***/ + }, + + /***/ 6698: /***/ (module) => { + "use strict"; + module.exports = require("node:async_hooks"); + + /***/ + }, + + /***/ 4573: /***/ (module) => { + "use strict"; + module.exports = require("node:buffer"); + + /***/ + }, + + /***/ 7540: /***/ (module) => { + "use strict"; + module.exports = require("node:console"); + + /***/ + }, + + /***/ 7598: /***/ (module) => { + "use strict"; + module.exports = require("node:crypto"); + + /***/ + }, + + /***/ 3053: /***/ (module) => { + "use strict"; + module.exports = require("node:diagnostics_channel"); + + /***/ + }, + + /***/ 610: /***/ (module) => { + "use strict"; + module.exports = require("node:dns"); + + /***/ + }, + + /***/ 8474: /***/ (module) => { + "use strict"; + module.exports = require("node:events"); + + /***/ + }, + + /***/ 3024: /***/ (module) => { + "use strict"; + module.exports = require("node:fs"); + + /***/ + }, + + /***/ 1455: /***/ (module) => { + "use strict"; + module.exports = require("node:fs/promises"); + + /***/ + }, + + /***/ 7067: /***/ (module) => { + "use strict"; + module.exports = require("node:http"); + + /***/ + }, + + /***/ 2467: /***/ (module) => { + "use strict"; + module.exports = require("node:http2"); + + /***/ + }, + + /***/ 7030: /***/ (module) => { + "use strict"; + module.exports = require("node:net"); + + /***/ + }, + + /***/ 6760: /***/ (module) => { + "use strict"; + module.exports = require("node:path"); + + /***/ + }, + + /***/ 643: /***/ (module) => { + "use strict"; + module.exports = require("node:perf_hooks"); + + /***/ + }, + + /***/ 1792: /***/ (module) => { + "use strict"; + module.exports = require("node:querystring"); + + /***/ + }, + + /***/ 7075: /***/ (module) => { + "use strict"; + module.exports = require("node:stream"); + + /***/ + }, + + /***/ 6193: /***/ (module) => { + "use strict"; + module.exports = require("node:string_decoder"); + + /***/ + }, + + /***/ 1692: /***/ (module) => { + "use strict"; + module.exports = require("node:tls"); + + /***/ + }, + + /***/ 3136: /***/ (module) => { + "use strict"; + module.exports = require("node:url"); + + /***/ + }, + + /***/ 7975: /***/ (module) => { + "use strict"; + module.exports = require("node:util"); + + /***/ + }, + + /***/ 3429: /***/ (module) => { + "use strict"; + module.exports = require("node:util/types"); + + /***/ + }, + + /***/ 5919: /***/ (module) => { + "use strict"; + module.exports = require("node:worker_threads"); + + /***/ + }, + + /***/ 8522: /***/ (module) => { + "use strict"; + module.exports = require("node:zlib"); + + /***/ + }, + + /***/ 4584: /***/ (module) => { + "use strict"; + module.exports = require("stream"); + + /***/ + }, + + /***/ 3193: /***/ (module) => { + "use strict"; + module.exports = require("string_decoder"); + + /***/ + }, + + /***/ 4756: /***/ (module) => { + "use strict"; + module.exports = require("tls"); + + /***/ + }, + + /***/ 7016: /***/ (module) => { + "use strict"; + module.exports = require("url"); + + /***/ + }, + + /***/ 9023: /***/ (module) => { + "use strict"; + module.exports = require("util"); + + /***/ + }, + + /***/ 8941: /***/ ( + __unused_webpack_module, + exports, + __nccwpck_require__, + ) => { + "use strict"; + var R = (n, t) => () => ( + t || n((t = { exports: {} }).exports, t), + t.exports + ); + var Ge = R((Y) => { + "use strict"; + Object.defineProperty(Y, "__esModule", { value: !0 }); + Y.range = Y.balanced = void 0; + var Gs = (n, t, e) => { + let s = n instanceof RegExp ? Ie(n, e) : n, + i = t instanceof RegExp ? Ie(t, e) : t, + r = s !== null && i != null && (0, Y.range)(s, i, e); + return ( + r && { + start: r[0], + end: r[1], + pre: e.slice(0, r[0]), + body: e.slice(r[0] + s.length, r[1]), + post: e.slice(r[1] + i.length), + } + ); + }; + Y.balanced = Gs; + var Ie = (n, t) => { + let e = t.match(n); + return e ? e[0] : null; + }, + zs = (n, t, e) => { + let s, + i, + r, + h, + o, + a = e.indexOf(n), + l = e.indexOf(t, a + 1), + f = a; + if (a >= 0 && l > 0) { + if (n === t) return [a, l]; + for (s = [], r = e.length; f >= 0 && !o; ) { + if (f === a) (s.push(f), (a = e.indexOf(n, f + 1))); + else if (s.length === 1) { + let c = s.pop(); + c !== void 0 && (o = [c, l]); + } else + ((i = s.pop()), + i !== void 0 && i < r && ((r = i), (h = l)), + (l = e.indexOf(t, f + 1))); + f = a < l && a >= 0 ? a : l; + } + s.length && h !== void 0 && (o = [r, h]); + } + return o; + }; + Y.range = zs; + }); + var Ke = R((it) => { + "use strict"; + Object.defineProperty(it, "__esModule", { value: !0 }); + it.EXPANSION_MAX = void 0; + it.expand = ei; + var ze = Ge(), + Ue = "\0SLASH" + Math.random() + "\0", + $e = "\0OPEN" + Math.random() + "\0", + ue = "\0CLOSE" + Math.random() + "\0", + qe = "\0COMMA" + Math.random() + "\0", + He = "\0PERIOD" + Math.random() + "\0", + Us = new RegExp(Ue, "g"), + $s = new RegExp($e, "g"), + qs = new RegExp(ue, "g"), + Hs = new RegExp(qe, "g"), + Vs = new RegExp(He, "g"), + Ks = /\\\\/g, + Xs = /\\{/g, + Ys = /\\}/g, + Js = /\\,/g, + Zs = /\\./g; + it.EXPANSION_MAX = 1e5; + function ce(n) { + return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10); + } + function Qs(n) { + return n + .replace(Ks, Ue) + .replace(Xs, $e) + .replace(Ys, ue) + .replace(Js, qe) + .replace(Zs, He); + } + function ti(n) { + return n + .replace(Us, "\\") + .replace($s, "{") + .replace(qs, "}") + .replace(Hs, ",") + .replace(Vs, "."); + } + function Ve(n) { + if (!n) return [""]; + let t = [], + e = (0, ze.balanced)("{", "}", n); + if (!e) return n.split(","); + let { pre: s, body: i, post: r } = e, + h = s.split(","); + h[h.length - 1] += "{" + i + "}"; + let o = Ve(r); + return ( + r.length && ((h[h.length - 1] += o.shift()), h.push.apply(h, o)), + t.push.apply(t, h), + t + ); + } + function ei(n, t = {}) { + if (!n) return []; + let { max: e = it.EXPANSION_MAX } = t; + return ( + n.slice(0, 2) === "{}" && (n = "\\{\\}" + n.slice(2)), + ht(Qs(n), e, !0).map(ti) + ); + } + function si(n) { + return "{" + n + "}"; + } + function ii(n) { + return /^-?0\d/.test(n); + } + function ri(n, t) { + return n <= t; + } + function ni(n, t) { + return n >= t; + } + function ht(n, t, e) { + let s = [], + i = (0, ze.balanced)("{", "}", n); + if (!i) return [n]; + let r = i.pre, + h = i.post.length ? ht(i.post, t, !1) : [""]; + if (/\$$/.test(i.pre)) + for (let o = 0; o < h.length && o < t; o++) { + let a = r + "{" + i.body + "}" + h[o]; + s.push(a); + } + else { + let o = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), + a = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), + l = o || a, + f = i.body.indexOf(",") >= 0; + if (!l && !f) + return i.post.match(/,(?!,).*\}/) + ? ((n = i.pre + "{" + i.body + ue + i.post), ht(n, t, !0)) + : [n]; + let c; + if (l) c = i.body.split(/\.\./); + else if ( + ((c = Ve(i.body)), + c.length === 1 && + c[0] !== void 0 && + ((c = ht(c[0], t, !1).map(si)), c.length === 1)) + ) + return h.map((u) => i.pre + c[0] + u); + let d; + if (l && c[0] !== void 0 && c[1] !== void 0) { + let u = ce(c[0]), + m = ce(c[1]), + p = Math.max(c[0].length, c[1].length), + b = c.length === 3 && c[2] !== void 0 ? Math.abs(ce(c[2])) : 1, + w = ri; + m < u && ((b *= -1), (w = ni)); + let E = c.some(ii); + d = []; + for (let y = u; w(y, m); y += b) { + let S; + if (a) ((S = String.fromCharCode(y)), S === "\\" && (S = "")); + else if (((S = String(y)), E)) { + let B = p - S.length; + if (B > 0) { + let U = new Array(B + 1).join("0"); + y < 0 ? (S = "-" + U + S.slice(1)) : (S = U + S); + } + } + d.push(S); + } + } else { + d = []; + for (let u = 0; u < c.length; u++) + d.push.apply(d, ht(c[u], t, !1)); + } + for (let u = 0; u < d.length; u++) + for (let m = 0; m < h.length && s.length < t; m++) { + let p = r + d[u] + h[m]; + (!e || l || p) && s.push(p); + } + } + return s; + } + }); + var Xe = R((Ct) => { + "use strict"; + Object.defineProperty(Ct, "__esModule", { value: !0 }); + Ct.assertValidPattern = void 0; + var hi = 1024 * 64, + oi = (n) => { + if (typeof n != "string") throw new TypeError("invalid pattern"); + if (n.length > hi) throw new TypeError("pattern is too long"); + }; + Ct.assertValidPattern = oi; + }); + var Je = R((Rt) => { + "use strict"; + Object.defineProperty(Rt, "__esModule", { value: !0 }); + Rt.parseClass = void 0; + var ai = { + "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0], + "[:alpha:]": ["\\p{L}\\p{Nl}", !0], + "[:ascii:]": ["\\x00-\\x7f", !1], + "[:blank:]": ["\\p{Zs}\\t", !0], + "[:cntrl:]": ["\\p{Cc}", !0], + "[:digit:]": ["\\p{Nd}", !0], + "[:graph:]": ["\\p{Z}\\p{C}", !0, !0], + "[:lower:]": ["\\p{Ll}", !0], + "[:print:]": ["\\p{C}", !0], + "[:punct:]": ["\\p{P}", !0], + "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0], + "[:upper:]": ["\\p{Lu}", !0], + "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0], + "[:xdigit:]": ["A-Fa-f0-9", !1], + }, + ot = (n) => n.replace(/[[\]\\-]/g, "\\$&"), + li = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), + Ye = (n) => n.join(""), + ci = (n, t) => { + let e = t; + if (n.charAt(e) !== "[") + throw new Error("not in a brace expression"); + let s = [], + i = [], + r = e + 1, + h = !1, + o = !1, + a = !1, + l = !1, + f = e, + c = ""; + t: for (; r < n.length; ) { + let p = n.charAt(r); + if ((p === "!" || p === "^") && r === e + 1) { + ((l = !0), r++); + continue; + } + if (p === "]" && h && !a) { + f = r + 1; + break; + } + if (((h = !0), p === "\\" && !a)) { + ((a = !0), r++); + continue; + } + if (p === "[" && !a) { + for (let [b, [w, v, E]] of Object.entries(ai)) + if (n.startsWith(b, r)) { + if (c) return ["$.", !1, n.length - e, !0]; + ((r += b.length), E ? i.push(w) : s.push(w), (o = o || v)); + continue t; + } + } + if (((a = !1), c)) { + (p > c ? s.push(ot(c) + "-" + ot(p)) : p === c && s.push(ot(p)), + (c = ""), + r++); + continue; + } + if (n.startsWith("-]", r + 1)) { + (s.push(ot(p + "-")), (r += 2)); + continue; + } + if (n.startsWith("-", r + 1)) { + ((c = p), (r += 2)); + continue; + } + (s.push(ot(p)), r++); + } + if (f < r) return ["", !1, 0, !1]; + if (!s.length && !i.length) return ["$.", !1, n.length - e, !0]; + if (i.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !l) { + let p = s[0].length === 2 ? s[0].slice(-1) : s[0]; + return [li(p), !1, f - e, !1]; + } + let d = "[" + (l ? "^" : "") + Ye(s) + "]", + u = "[" + (l ? "" : "^") + Ye(i) + "]"; + return [ + s.length && i.length ? "(" + d + "|" + u + ")" : s.length ? d : u, + o, + f - e, + !0, + ]; + }; + Rt.parseClass = ci; + }); + var kt = R((At) => { + "use strict"; + Object.defineProperty(At, "__esModule", { value: !0 }); + At.unescape = void 0; + var ui = ( + n, + { windowsPathsNoEscape: t = !1, magicalBraces: e = !0 } = {}, + ) => + e + ? t + ? n.replace(/\[([^\/\\])\]/g, "$1") + : n + .replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2") + .replace(/\\([^\/])/g, "$1") + : t + ? n.replace(/\[([^\/\\{}])\]/g, "$1") + : n + .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2") + .replace(/\\([^\/{}])/g, "$1"); + At.unescape = ui; + }); + var pe = R((Dt) => { + "use strict"; + Object.defineProperty(Dt, "__esModule", { value: !0 }); + Dt.AST = void 0; + var fi = Je(), + Mt = kt(), + di = new Set(["!", "?", "+", "*", "@"]), + Ze = (n) => di.has(n), + pi = "(?!(?:^|/)\\.\\.?(?:$|/))", + Pt = "(?!\\.)", + mi = new Set(["[", "."]), + gi = new Set(["..", "."]), + wi = new Set("().*{}+?[]^$\\!"), + bi = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), + de = "[^/]", + Qe = de + "*?", + ts = de + "+?", + fe = class n { + type; + #t; + #s; + #n = !1; + #r = []; + #h; + #S; + #w; + #c = !1; + #o; + #f; + #u = !1; + constructor(t, e, s = {}) { + ((this.type = t), + t && (this.#s = !0), + (this.#h = e), + (this.#t = this.#h ? this.#h.#t : this), + (this.#o = this.#t === this ? s : this.#t.#o), + (this.#w = this.#t === this ? [] : this.#t.#w), + t === "!" && !this.#t.#c && this.#w.push(this), + (this.#S = this.#h ? this.#h.#r.length : 0)); + } + get hasMagic() { + if (this.#s !== void 0) return this.#s; + for (let t of this.#r) + if (typeof t != "string" && (t.type || t.hasMagic)) + return (this.#s = !0); + return this.#s; + } + toString() { + return this.#f !== void 0 + ? this.#f + : this.type + ? (this.#f = + this.type + + "(" + + this.#r.map((t) => String(t)).join("|") + + ")") + : (this.#f = this.#r.map((t) => String(t)).join("")); + } + #a() { + if (this !== this.#t) throw new Error("should only call on root"); + if (this.#c) return this; + (this.toString(), (this.#c = !0)); + let t; + for (; (t = this.#w.pop()); ) { + if (t.type !== "!") continue; + let e = t, + s = e.#h; + for (; s; ) { + for (let i = e.#S + 1; !s.type && i < s.#r.length; i++) + for (let r of t.#r) { + if (typeof r == "string") + throw new Error("string part in extglob AST??"); + r.copyIn(s.#r[i]); + } + ((e = s), (s = e.#h)); + } + } + return this; + } + push(...t) { + for (let e of t) + if (e !== "") { + if ( + typeof e != "string" && + !(e instanceof n && e.#h === this) + ) + throw new Error("invalid part: " + e); + this.#r.push(e); + } + } + toJSON() { + let t = + this.type === null + ? this.#r + .slice() + .map((e) => (typeof e == "string" ? e : e.toJSON())) + : [this.type, ...this.#r.map((e) => e.toJSON())]; + return ( + this.isStart() && !this.type && t.unshift([]), + this.isEnd() && + (this === this.#t || (this.#t.#c && this.#h?.type === "!")) && + t.push({}), + t + ); + } + isStart() { + if (this.#t === this) return !0; + if (!this.#h?.isStart()) return !1; + if (this.#S === 0) return !0; + let t = this.#h; + for (let e = 0; e < this.#S; e++) { + let s = t.#r[e]; + if (!(s instanceof n && s.type === "!")) return !1; + } + return !0; + } + isEnd() { + if (this.#t === this || this.#h?.type === "!") return !0; + if (!this.#h?.isEnd()) return !1; + if (!this.type) return this.#h?.isEnd(); + let t = this.#h ? this.#h.#r.length : 0; + return this.#S === t - 1; + } + copyIn(t) { + typeof t == "string" ? this.push(t) : this.push(t.clone(this)); + } + clone(t) { + let e = new n(this.type, t); + for (let s of this.#r) e.copyIn(s); + return e; + } + static #i(t, e, s, i) { + let r = !1, + h = !1, + o = -1, + a = !1; + if (e.type === null) { + let u = s, + m = ""; + for (; u < t.length; ) { + let p = t.charAt(u++); + if (r || p === "\\") { + ((r = !r), (m += p)); + continue; + } + if (h) { + (u === o + 1 + ? (p === "^" || p === "!") && (a = !0) + : p === "]" && !(u === o + 2 && a) && (h = !1), + (m += p)); + continue; + } else if (p === "[") { + ((h = !0), (o = u), (a = !1), (m += p)); + continue; + } + if (!i.noext && Ze(p) && t.charAt(u) === "(") { + (e.push(m), (m = "")); + let b = new n(p, e); + ((u = n.#i(t, b, u, i)), e.push(b)); + continue; + } + m += p; + } + return (e.push(m), u); + } + let l = s + 1, + f = new n(null, e), + c = [], + d = ""; + for (; l < t.length; ) { + let u = t.charAt(l++); + if (r || u === "\\") { + ((r = !r), (d += u)); + continue; + } + if (h) { + (l === o + 1 + ? (u === "^" || u === "!") && (a = !0) + : u === "]" && !(l === o + 2 && a) && (h = !1), + (d += u)); + continue; + } else if (u === "[") { + ((h = !0), (o = l), (a = !1), (d += u)); + continue; + } + if (Ze(u) && t.charAt(l) === "(") { + (f.push(d), (d = "")); + let m = new n(u, f); + (f.push(m), (l = n.#i(t, m, l, i))); + continue; + } + if (u === "|") { + (f.push(d), (d = ""), c.push(f), (f = new n(null, e))); + continue; + } + if (u === ")") + return ( + d === "" && e.#r.length === 0 && (e.#u = !0), + f.push(d), + (d = ""), + e.push(...c, f), + l + ); + d += u; + } + return ( + (e.type = null), + (e.#s = void 0), + (e.#r = [t.substring(s - 1)]), + l + ); + } + static fromGlob(t, e = {}) { + let s = new n(null, void 0, e); + return (n.#i(t, s, 0, e), s); + } + toMMPattern() { + if (this !== this.#t) return this.#t.toMMPattern(); + let t = this.toString(), + [e, s, i, r] = this.toRegExpSource(); + if ( + !( + i || + this.#s || + (this.#o.nocase && + !this.#o.nocaseMagicOnly && + t.toUpperCase() !== t.toLowerCase()) + ) + ) + return s; + let o = (this.#o.nocase ? "i" : "") + (r ? "u" : ""); + return Object.assign(new RegExp(`^${e}$`, o), { + _src: e, + _glob: t, + }); + } + get options() { + return this.#o; + } + toRegExpSource(t) { + let e = t ?? !!this.#o.dot; + if ((this.#t === this && this.#a(), !this.type)) { + let a = + this.isStart() && + this.isEnd() && + !this.#r.some((u) => typeof u != "string"), + l = this.#r + .map((u) => { + let [m, p, b, w] = + typeof u == "string" + ? n.#v(u, this.#s, a) + : u.toRegExpSource(t); + return ( + (this.#s = this.#s || b), + (this.#n = this.#n || w), + m + ); + }) + .join(""), + f = ""; + if ( + this.isStart() && + typeof this.#r[0] == "string" && + !(this.#r.length === 1 && gi.has(this.#r[0])) + ) { + let m = mi, + p = + (e && m.has(l.charAt(0))) || + (l.startsWith("\\.") && m.has(l.charAt(2))) || + (l.startsWith("\\.\\.") && m.has(l.charAt(4))), + b = !e && !t && m.has(l.charAt(0)); + f = p ? pi : b ? Pt : ""; + } + let c = ""; + return ( + this.isEnd() && + this.#t.#c && + this.#h?.type === "!" && + (c = "(?:$|\\/)"), + [ + f + l + c, + (0, Mt.unescape)(l), + (this.#s = !!this.#s), + this.#n, + ] + ); + } + let s = this.type === "*" || this.type === "+", + i = this.type === "!" ? "(?:(?!(?:" : "(?:", + r = this.#d(e); + if (this.isStart() && this.isEnd() && !r && this.type !== "!") { + let a = this.toString(); + return ( + (this.#r = [a]), + (this.type = null), + (this.#s = void 0), + [a, (0, Mt.unescape)(this.toString()), !1, !1] + ); + } + let h = !s || t || e || !Pt ? "" : this.#d(!0); + (h === r && (h = ""), h && (r = `(?:${r})(?:${h})*?`)); + let o = ""; + if (this.type === "!" && this.#u) + o = (this.isStart() && !e ? Pt : "") + ts; + else { + let a = + this.type === "!" + ? "))" + (this.isStart() && !e && !t ? Pt : "") + Qe + ")" + : this.type === "@" + ? ")" + : this.type === "?" + ? ")?" + : this.type === "+" && h + ? ")" + : this.type === "*" && h + ? ")?" + : `)${this.type}`; + o = i + r + a; + } + return [o, (0, Mt.unescape)(r), (this.#s = !!this.#s), this.#n]; + } + #d(t) { + return this.#r + .map((e) => { + if (typeof e == "string") + throw new Error("string type in extglob ast??"); + let [s, i, r, h] = e.toRegExpSource(t); + return ((this.#n = this.#n || h), s); + }) + .filter((e) => !(this.isStart() && this.isEnd()) || !!e) + .join("|"); + } + static #v(t, e, s = !1) { + let i = !1, + r = "", + h = !1, + o = !1; + for (let a = 0; a < t.length; a++) { + let l = t.charAt(a); + if (i) { + ((i = !1), (r += (wi.has(l) ? "\\" : "") + l)); + continue; + } + if (l === "*") { + if (o) continue; + ((o = !0), (r += s && /^[*]+$/.test(t) ? ts : Qe), (e = !0)); + continue; + } else o = !1; + if (l === "\\") { + a === t.length - 1 ? (r += "\\\\") : (i = !0); + continue; + } + if (l === "[") { + let [f, c, d, u] = (0, fi.parseClass)(t, a); + if (d) { + ((r += f), (h = h || c), (a += d - 1), (e = e || u)); + continue; + } + } + if (l === "?") { + ((r += de), (e = !0)); + continue; + } + r += bi(l); + } + return [r, (0, Mt.unescape)(t), !!e, h]; + } + }; + Dt.AST = fe; + }); + var me = R((Ft) => { + "use strict"; + Object.defineProperty(Ft, "__esModule", { value: !0 }); + Ft.escape = void 0; + var yi = ( + n, + { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}, + ) => + e + ? t + ? n.replace(/[?*()[\]{}]/g, "[$&]") + : n.replace(/[?*()[\]\\{}]/g, "\\$&") + : t + ? n.replace(/[?*()[\]]/g, "[$&]") + : n.replace(/[?*()[\]\\]/g, "\\$&"); + Ft.escape = yi; + }); + var H = R((g) => { + "use strict"; + Object.defineProperty(g, "__esModule", { value: !0 }); + g.unescape = + g.escape = + g.AST = + g.Minimatch = + g.match = + g.makeRe = + g.braceExpand = + g.defaults = + g.filter = + g.GLOBSTAR = + g.sep = + g.minimatch = + void 0; + var Si = Ke(), + jt = Xe(), + is = pe(), + vi = me(), + Ei = kt(), + _i = (n, t, e = {}) => ( + (0, jt.assertValidPattern)(t), + !e.nocomment && t.charAt(0) === "#" ? !1 : new J(t, e).match(n) + ); + g.minimatch = _i; + var Oi = /^\*+([^+@!?\*\[\(]*)$/, + xi = (n) => (t) => !t.startsWith(".") && t.endsWith(n), + Ti = (n) => (t) => t.endsWith(n), + Ci = (n) => ( + (n = n.toLowerCase()), + (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n) + ), + Ri = (n) => ( + (n = n.toLowerCase()), + (t) => t.toLowerCase().endsWith(n) + ), + Ai = /^\*+\.\*+$/, + ki = (n) => !n.startsWith(".") && n.includes("."), + Mi = (n) => n !== "." && n !== ".." && n.includes("."), + Pi = /^\.\*+$/, + Di = (n) => n !== "." && n !== ".." && n.startsWith("."), + Fi = /^\*+$/, + ji = (n) => n.length !== 0 && !n.startsWith("."), + Ni = (n) => n.length !== 0 && n !== "." && n !== "..", + Li = /^\?+([^+@!?\*\[\(]*)?$/, + Wi = ([n, t = ""]) => { + let e = rs([n]); + return t + ? ((t = t.toLowerCase()), + (s) => e(s) && s.toLowerCase().endsWith(t)) + : e; + }, + Bi = ([n, t = ""]) => { + let e = ns([n]); + return t + ? ((t = t.toLowerCase()), + (s) => e(s) && s.toLowerCase().endsWith(t)) + : e; + }, + Ii = ([n, t = ""]) => { + let e = ns([n]); + return t ? (s) => e(s) && s.endsWith(t) : e; + }, + Gi = ([n, t = ""]) => { + let e = rs([n]); + return t ? (s) => e(s) && s.endsWith(t) : e; + }, + rs = ([n]) => { + let t = n.length; + return (e) => e.length === t && !e.startsWith("."); + }, + ns = ([n]) => { + let t = n.length; + return (e) => e.length === t && e !== "." && e !== ".."; + }, + hs = + typeof process == "object" && process + ? (typeof process.env == "object" && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : "posix", + es = { win32: { sep: "\\" }, posix: { sep: "/" } }; + g.sep = hs === "win32" ? es.win32.sep : es.posix.sep; + g.minimatch.sep = g.sep; + g.GLOBSTAR = Symbol("globstar **"); + g.minimatch.GLOBSTAR = g.GLOBSTAR; + var zi = "[^/]", + Ui = zi + "*?", + $i = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", + qi = "(?:(?!(?:\\/|^)\\.).)*?", + Hi = + (n, t = {}) => + (e) => + (0, g.minimatch)(e, n, t); + g.filter = Hi; + g.minimatch.filter = g.filter; + var F = (n, t = {}) => Object.assign({}, n, t), + Vi = (n) => { + if (!n || typeof n != "object" || !Object.keys(n).length) + return g.minimatch; + let t = g.minimatch; + return Object.assign((s, i, r = {}) => t(s, i, F(n, r)), { + Minimatch: class extends t.Minimatch { + constructor(i, r = {}) { + super(i, F(n, r)); + } + static defaults(i) { + return t.defaults(F(n, i)).Minimatch; + } + }, + AST: class extends t.AST { + constructor(i, r, h = {}) { + super(i, r, F(n, h)); + } + static fromGlob(i, r = {}) { + return t.AST.fromGlob(i, F(n, r)); + } + }, + unescape: (s, i = {}) => t.unescape(s, F(n, i)), + escape: (s, i = {}) => t.escape(s, F(n, i)), + filter: (s, i = {}) => t.filter(s, F(n, i)), + defaults: (s) => t.defaults(F(n, s)), + makeRe: (s, i = {}) => t.makeRe(s, F(n, i)), + braceExpand: (s, i = {}) => t.braceExpand(s, F(n, i)), + match: (s, i, r = {}) => t.match(s, i, F(n, r)), + sep: t.sep, + GLOBSTAR: g.GLOBSTAR, + }); + }; + g.defaults = Vi; + g.minimatch.defaults = g.defaults; + var Ki = (n, t = {}) => ( + (0, jt.assertValidPattern)(n), + t.nobrace || !/\{(?:(?!\{).)*\}/.test(n) + ? [n] + : (0, Si.expand)(n, { max: t.braceExpandMax }) + ); + g.braceExpand = Ki; + g.minimatch.braceExpand = g.braceExpand; + var Xi = (n, t = {}) => new J(n, t).makeRe(); + g.makeRe = Xi; + g.minimatch.makeRe = g.makeRe; + var Yi = (n, t, e = {}) => { + let s = new J(t, e); + return ( + (n = n.filter((i) => s.match(i))), + s.options.nonull && !n.length && n.push(t), + n + ); + }; + g.match = Yi; + g.minimatch.match = g.match; + var ss = /[?*]|[+@!]\(.*?\)|\[|\]/, + Ji = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), + J = class { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(t, e = {}) { + ((0, jt.assertValidPattern)(t), + (e = e || {}), + (this.options = e), + (this.pattern = t), + (this.platform = e.platform || hs), + (this.isWindows = this.platform === "win32")); + let s = "allowWindowsEscape"; + ((this.windowsPathsNoEscape = + !!e.windowsPathsNoEscape || e[s] === !1), + this.windowsPathsNoEscape && + (this.pattern = this.pattern.replace(/\\/g, "/")), + (this.preserveMultipleSlashes = !!e.preserveMultipleSlashes), + (this.regexp = null), + (this.negate = !1), + (this.nonegate = !!e.nonegate), + (this.comment = !1), + (this.empty = !1), + (this.partial = !!e.partial), + (this.nocase = !!this.options.nocase), + (this.windowsNoMagicRoot = + e.windowsNoMagicRoot !== void 0 + ? e.windowsNoMagicRoot + : !!(this.isWindows && this.nocase)), + (this.globSet = []), + (this.globParts = []), + (this.set = []), + this.make()); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) return !0; + for (let t of this.set) + for (let e of t) if (typeof e != "string") return !0; + return !1; + } + debug(...t) {} + make() { + let t = this.pattern, + e = this.options; + if (!e.nocomment && t.charAt(0) === "#") { + this.comment = !0; + return; + } + if (!t) { + this.empty = !0; + return; + } + (this.parseNegate(), + (this.globSet = [...new Set(this.braceExpand())]), + e.debug && (this.debug = (...r) => console.error(...r)), + this.debug(this.pattern, this.globSet)); + let s = this.globSet.map((r) => this.slashSplit(r)); + ((this.globParts = this.preprocess(s)), + this.debug(this.pattern, this.globParts)); + let i = this.globParts.map((r, h, o) => { + if (this.isWindows && this.windowsNoMagicRoot) { + let a = + r[0] === "" && + r[1] === "" && + (r[2] === "?" || !ss.test(r[2])) && + !ss.test(r[3]), + l = /^[a-z]:/i.test(r[0]); + if (a) + return [ + ...r.slice(0, 4), + ...r.slice(4).map((f) => this.parse(f)), + ]; + if (l) return [r[0], ...r.slice(1).map((f) => this.parse(f))]; + } + return r.map((a) => this.parse(a)); + }); + if ( + (this.debug(this.pattern, i), + (this.set = i.filter((r) => r.indexOf(!1) === -1)), + this.isWindows) + ) + for (let r = 0; r < this.set.length; r++) { + let h = this.set[r]; + h[0] === "" && + h[1] === "" && + this.globParts[r][2] === "?" && + typeof h[3] == "string" && + /^[a-z]:$/i.test(h[3]) && + (h[2] = "?"); + } + this.debug(this.pattern, this.set); + } + preprocess(t) { + if (this.options.noglobstar) + for (let s = 0; s < t.length; s++) + for (let i = 0; i < t[s].length; i++) + t[s][i] === "**" && (t[s][i] = "*"); + let { optimizationLevel: e = 1 } = this.options; + return ( + e >= 2 + ? ((t = this.firstPhasePreProcess(t)), + (t = this.secondPhasePreProcess(t))) + : e >= 1 + ? (t = this.levelOneOptimize(t)) + : (t = this.adjascentGlobstarOptimize(t)), + t + ); + } + adjascentGlobstarOptimize(t) { + return t.map((e) => { + let s = -1; + for (; (s = e.indexOf("**", s + 1)) !== -1; ) { + let i = s; + for (; e[i + 1] === "**"; ) i++; + i !== s && e.splice(s, i - s); + } + return e; + }); + } + levelOneOptimize(t) { + return t.map( + (e) => ( + (e = e.reduce((s, i) => { + let r = s[s.length - 1]; + return i === "**" && r === "**" + ? s + : i === ".." && r && r !== ".." && r !== "." && r !== "**" + ? (s.pop(), s) + : (s.push(i), s); + }, [])), + e.length === 0 ? [""] : e + ), + ); + } + levelTwoFileOptimize(t) { + Array.isArray(t) || (t = this.slashSplit(t)); + let e = !1; + do { + if (((e = !1), !this.preserveMultipleSlashes)) { + for (let i = 1; i < t.length - 1; i++) { + let r = t[i]; + (i === 1 && r === "" && t[0] === "") || + ((r === "." || r === "") && + ((e = !0), t.splice(i, 1), i--)); + } + t[0] === "." && + t.length === 2 && + (t[1] === "." || t[1] === "") && + ((e = !0), t.pop()); + } + let s = 0; + for (; (s = t.indexOf("..", s + 1)) !== -1; ) { + let i = t[s - 1]; + i && + i !== "." && + i !== ".." && + i !== "**" && + ((e = !0), t.splice(s - 1, 2), (s -= 2)); + } + } while (e); + return t.length === 0 ? [""] : t; + } + firstPhasePreProcess(t) { + let e = !1; + do { + e = !1; + for (let s of t) { + let i = -1; + for (; (i = s.indexOf("**", i + 1)) !== -1; ) { + let h = i; + for (; s[h + 1] === "**"; ) h++; + h > i && s.splice(i + 1, h - i); + let o = s[i + 1], + a = s[i + 2], + l = s[i + 3]; + if ( + o !== ".." || + !a || + a === "." || + a === ".." || + !l || + l === "." || + l === ".." + ) + continue; + ((e = !0), s.splice(i, 1)); + let f = s.slice(0); + ((f[i] = "**"), t.push(f), i--); + } + if (!this.preserveMultipleSlashes) { + for (let h = 1; h < s.length - 1; h++) { + let o = s[h]; + (h === 1 && o === "" && s[0] === "") || + ((o === "." || o === "") && + ((e = !0), s.splice(h, 1), h--)); + } + s[0] === "." && + s.length === 2 && + (s[1] === "." || s[1] === "") && + ((e = !0), s.pop()); + } + let r = 0; + for (; (r = s.indexOf("..", r + 1)) !== -1; ) { + let h = s[r - 1]; + if (h && h !== "." && h !== ".." && h !== "**") { + e = !0; + let a = r === 1 && s[r + 1] === "**" ? ["."] : []; + (s.splice(r - 1, 2, ...a), + s.length === 0 && s.push(""), + (r -= 2)); + } + } + } + } while (e); + return t; + } + secondPhasePreProcess(t) { + for (let e = 0; e < t.length - 1; e++) + for (let s = e + 1; s < t.length; s++) { + let i = this.partsMatch( + t[e], + t[s], + !this.preserveMultipleSlashes, + ); + if (i) { + ((t[e] = []), (t[s] = i)); + break; + } + } + return t.filter((e) => e.length); + } + partsMatch(t, e, s = !1) { + let i = 0, + r = 0, + h = [], + o = ""; + for (; i < t.length && r < e.length; ) + if (t[i] === e[r]) (h.push(o === "b" ? e[r] : t[i]), i++, r++); + else if (s && t[i] === "**" && e[r] === t[i + 1]) + (h.push(t[i]), i++); + else if (s && e[r] === "**" && t[i] === e[r + 1]) + (h.push(e[r]), r++); + else if ( + t[i] === "*" && + e[r] && + (this.options.dot || !e[r].startsWith(".")) && + e[r] !== "**" + ) { + if (o === "b") return !1; + ((o = "a"), h.push(t[i]), i++, r++); + } else if ( + e[r] === "*" && + t[i] && + (this.options.dot || !t[i].startsWith(".")) && + t[i] !== "**" + ) { + if (o === "a") return !1; + ((o = "b"), h.push(e[r]), i++, r++); + } else return !1; + return t.length === e.length && h; + } + parseNegate() { + if (this.nonegate) return; + let t = this.pattern, + e = !1, + s = 0; + for (let i = 0; i < t.length && t.charAt(i) === "!"; i++) + ((e = !e), s++); + (s && (this.pattern = t.slice(s)), (this.negate = e)); + } + matchOne(t, e, s = !1) { + let i = this.options; + if (this.isWindows) { + let p = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), + b = + !p && + t[0] === "" && + t[1] === "" && + t[2] === "?" && + /^[a-z]:$/i.test(t[3]), + w = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), + v = + !w && + e[0] === "" && + e[1] === "" && + e[2] === "?" && + typeof e[3] == "string" && + /^[a-z]:$/i.test(e[3]), + E = b ? 3 : p ? 0 : void 0, + y = v ? 3 : w ? 0 : void 0; + if (typeof E == "number" && typeof y == "number") { + let [S, B] = [t[E], e[y]]; + S.toLowerCase() === B.toLowerCase() && + ((e[y] = S), + y > E ? (e = e.slice(y)) : E > y && (t = t.slice(E))); + } + } + let { optimizationLevel: r = 1 } = this.options; + (r >= 2 && (t = this.levelTwoFileOptimize(t)), + this.debug("matchOne", this, { file: t, pattern: e }), + this.debug("matchOne", t.length, e.length)); + for ( + var h = 0, o = 0, a = t.length, l = e.length; + h < a && o < l; + h++, o++ + ) { + this.debug("matchOne loop"); + var f = e[o], + c = t[h]; + if ((this.debug(e, f, c), f === !1)) return !1; + if (f === g.GLOBSTAR) { + this.debug("GLOBSTAR", [e, f, c]); + var d = h, + u = o + 1; + if (u === l) { + for (this.debug("** at the end"); h < a; h++) + if ( + t[h] === "." || + t[h] === ".." || + (!i.dot && t[h].charAt(0) === ".") + ) + return !1; + return !0; + } + for (; d < a; ) { + var m = t[d]; + if ( + (this.debug( + ` +globstar while`, + t, + d, + e, + u, + m, + ), + this.matchOne(t.slice(d), e.slice(u), s)) + ) + return (this.debug("globstar found match!", d, a, m), !0); + if ( + m === "." || + m === ".." || + (!i.dot && m.charAt(0) === ".") + ) { + this.debug("dot detected!", t, d, e, u); + break; + } + (this.debug("globstar swallow a segment, and continue"), + d++); + } + return !!( + s && + (this.debug( + ` +>>> no match, partial?`, + t, + d, + e, + u, + ), + d === a) + ); + } + let p; + if ( + (typeof f == "string" + ? ((p = c === f), this.debug("string match", f, c, p)) + : ((p = f.test(c)), this.debug("pattern match", f, c, p)), + !p) + ) + return !1; + } + if (h === a && o === l) return !0; + if (h === a) return s; + if (o === l) return h === a - 1 && t[h] === ""; + throw new Error("wtf?"); + } + braceExpand() { + return (0, g.braceExpand)(this.pattern, this.options); + } + parse(t) { + (0, jt.assertValidPattern)(t); + let e = this.options; + if (t === "**") return g.GLOBSTAR; + if (t === "") return ""; + let s, + i = null; + (s = t.match(Fi)) + ? (i = e.dot ? Ni : ji) + : (s = t.match(Oi)) + ? (i = (e.nocase ? (e.dot ? Ri : Ci) : e.dot ? Ti : xi)(s[1])) + : (s = t.match(Li)) + ? (i = (e.nocase ? (e.dot ? Bi : Wi) : e.dot ? Ii : Gi)(s)) + : (s = t.match(Ai)) + ? (i = e.dot ? Mi : ki) + : (s = t.match(Pi)) && (i = Di); + let r = is.AST.fromGlob(t, this.options).toMMPattern(); + return ( + i && + typeof r == "object" && + Reflect.defineProperty(r, "test", { value: i }), + r + ); + } + makeRe() { + if (this.regexp || this.regexp === !1) return this.regexp; + let t = this.set; + if (!t.length) return ((this.regexp = !1), this.regexp); + let e = this.options, + s = e.noglobstar ? Ui : e.dot ? $i : qi, + i = new Set(e.nocase ? ["i"] : []), + r = t + .map((a) => { + let l = a.map((c) => { + if (c instanceof RegExp) + for (let d of c.flags.split("")) i.add(d); + return typeof c == "string" + ? Ji(c) + : c === g.GLOBSTAR + ? g.GLOBSTAR + : c._src; + }); + l.forEach((c, d) => { + let u = l[d + 1], + m = l[d - 1]; + c !== g.GLOBSTAR || + m === g.GLOBSTAR || + (m === void 0 + ? u !== void 0 && u !== g.GLOBSTAR + ? (l[d + 1] = "(?:\\/|" + s + "\\/)?" + u) + : (l[d] = s) + : u === void 0 + ? (l[d - 1] = m + "(?:\\/|\\/" + s + ")?") + : u !== g.GLOBSTAR && + ((l[d - 1] = m + "(?:\\/|\\/" + s + "\\/)" + u), + (l[d + 1] = g.GLOBSTAR))); + }); + let f = l.filter((c) => c !== g.GLOBSTAR); + if (this.partial && f.length >= 1) { + let c = []; + for (let d = 1; d <= f.length; d++) + c.push(f.slice(0, d).join("/")); + return "(?:" + c.join("|") + ")"; + } + return f.join("/"); + }) + .join("|"), + [h, o] = t.length > 1 ? ["(?:", ")"] : ["", ""]; + ((r = "^" + h + r + o + "$"), + this.partial && + (r = "^(?:\\/|" + h + r.slice(1, -1) + o + ")$"), + this.negate && (r = "^(?!" + r + ").+$")); + try { + this.regexp = new RegExp(r, [...i].join("")); + } catch { + this.regexp = !1; + } + return this.regexp; + } + slashSplit(t) { + return this.preserveMultipleSlashes + ? t.split("/") + : this.isWindows && /^\/\/[^\/]+/.test(t) + ? ["", ...t.split(/\/+/)] + : t.split(/\/+/); + } + match(t, e = this.partial) { + if ((this.debug("match", t, this.pattern), this.comment)) + return !1; + if (this.empty) return t === ""; + if (t === "/" && e) return !0; + let s = this.options; + this.isWindows && (t = t.split("\\").join("/")); + let i = this.slashSplit(t); + this.debug(this.pattern, "split", i); + let r = this.set; + this.debug(this.pattern, "set", r); + let h = i[i.length - 1]; + if (!h) for (let o = i.length - 2; !h && o >= 0; o--) h = i[o]; + for (let o = 0; o < r.length; o++) { + let a = r[o], + l = i; + if ( + (s.matchBase && a.length === 1 && (l = [h]), + this.matchOne(l, a, e)) + ) + return s.flipNegate ? !0 : !this.negate; + } + return s.flipNegate ? !1 : this.negate; + } + static defaults(t) { + return g.minimatch.defaults(t).Minimatch; + } + }; + g.Minimatch = J; + var Zi = pe(); + Object.defineProperty(g, "AST", { + enumerable: !0, + get: function () { + return Zi.AST; + }, + }); + var Qi = me(); + Object.defineProperty(g, "escape", { + enumerable: !0, + get: function () { + return Qi.escape; + }, + }); + var tr = kt(); + Object.defineProperty(g, "unescape", { + enumerable: !0, + get: function () { + return tr.unescape; + }, + }); + g.minimatch.AST = is.AST; + g.minimatch.Minimatch = J; + g.minimatch.escape = vi.escape; + g.minimatch.unescape = Ei.unescape; + }); + var fs = R((Wt) => { + "use strict"; + Object.defineProperty(Wt, "__esModule", { value: !0 }); + Wt.LRUCache = void 0; + var er = + typeof performance == "object" && + performance && + typeof performance.now == "function" + ? performance + : Date, + as = new Set(), + ge = typeof process == "object" && process ? process : {}, + ls = (n, t, e, s) => { + typeof ge.emitWarning == "function" + ? ge.emitWarning(n, t, e, s) + : console.error(`[${e}] ${t}: ${n}`); + }, + Lt = globalThis.AbortController, + os = globalThis.AbortSignal; + if (typeof Lt > "u") { + ((os = class { + onabort; + _onabort = []; + reason; + aborted = !1; + addEventListener(e, s) { + this._onabort.push(s); + } + }), + (Lt = class { + constructor() { + t(); + } + signal = new os(); + abort(e) { + if (!this.signal.aborted) { + ((this.signal.reason = e), (this.signal.aborted = !0)); + for (let s of this.signal._onabort) s(e); + this.signal.onabort?.(e); + } + } + })); + let n = ge.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", + t = () => { + n && + ((n = !1), + ls( + "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", + t, + )); + }; + } + var sr = (n) => !as.has(n), + V = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n), + cs = (n) => + V(n) + ? n <= Math.pow(2, 8) + ? Uint8Array + : n <= Math.pow(2, 16) + ? Uint16Array + : n <= Math.pow(2, 32) + ? Uint32Array + : n <= Number.MAX_SAFE_INTEGER + ? Nt + : null + : null, + Nt = class extends Array { + constructor(n) { + (super(n), this.fill(0)); + } + }, + ir = class at { + heap; + length; + static #t = !1; + static create(t) { + let e = cs(t); + if (!e) return []; + at.#t = !0; + let s = new at(t, e); + return ((at.#t = !1), s); + } + constructor(t, e) { + if (!at.#t) + throw new TypeError("instantiate Stack using Stack.create(n)"); + ((this.heap = new e(t)), (this.length = 0)); + } + push(t) { + this.heap[this.length++] = t; + } + pop() { + return this.heap[--this.length]; + } + }, + rr = class us { + #t; + #s; + #n; + #r; + #h; + #S; + #w; + #c; + get perf() { + return this.#c; + } + ttl; + ttlResolution; + ttlAutopurge; + updateAgeOnGet; + updateAgeOnHas; + allowStale; + noDisposeOnSet; + noUpdateTTL; + maxEntrySize; + sizeCalculation; + noDeleteOnFetchRejection; + noDeleteOnStaleGet; + allowStaleOnFetchAbort; + allowStaleOnFetchRejection; + ignoreFetchAbort; + #o; + #f; + #u; + #a; + #i; + #d; + #v; + #y; + #p; + #R; + #m; + #O; + #x; + #g; + #b; + #E; + #T; + #e; + #F; + static unsafeExposeInternals(t) { + return { + starts: t.#x, + ttls: t.#g, + autopurgeTimers: t.#b, + sizes: t.#O, + keyMap: t.#u, + keyList: t.#a, + valList: t.#i, + next: t.#d, + prev: t.#v, + get head() { + return t.#y; + }, + get tail() { + return t.#p; + }, + free: t.#R, + isBackgroundFetch: (e) => t.#l(e), + backgroundFetch: (e, s, i, r) => t.#z(e, s, i, r), + moveToTail: (e) => t.#N(e), + indexes: (e) => t.#k(e), + rindexes: (e) => t.#M(e), + isStale: (e) => t.#_(e), + }; + } + get max() { + return this.#t; + } + get maxSize() { + return this.#s; + } + get calculatedSize() { + return this.#f; + } + get size() { + return this.#o; + } + get fetchMethod() { + return this.#S; + } + get memoMethod() { + return this.#w; + } + get dispose() { + return this.#n; + } + get onInsert() { + return this.#r; + } + get disposeAfter() { + return this.#h; + } + constructor(t) { + let { + max: e = 0, + ttl: s, + ttlResolution: i = 1, + ttlAutopurge: r, + updateAgeOnGet: h, + updateAgeOnHas: o, + allowStale: a, + dispose: l, + onInsert: f, + disposeAfter: c, + noDisposeOnSet: d, + noUpdateTTL: u, + maxSize: m = 0, + maxEntrySize: p = 0, + sizeCalculation: b, + fetchMethod: w, + memoMethod: v, + noDeleteOnFetchRejection: E, + noDeleteOnStaleGet: y, + allowStaleOnFetchRejection: S, + allowStaleOnFetchAbort: B, + ignoreFetchAbort: U, + perf: et, + } = t; + if (et !== void 0 && typeof et?.now != "function") + throw new TypeError( + "perf option must have a now() method if specified", + ); + if (((this.#c = et ?? er), e !== 0 && !V(e))) + throw new TypeError("max option must be a nonnegative integer"); + let st = e ? cs(e) : Array; + if (!st) throw new Error("invalid max value: " + e); + if ( + ((this.#t = e), + (this.#s = m), + (this.maxEntrySize = p || this.#s), + (this.sizeCalculation = b), + this.sizeCalculation) + ) { + if (!this.#s && !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"); + } + if (v !== void 0 && typeof v != "function") + throw new TypeError("memoMethod must be a function if defined"); + if (((this.#w = v), w !== void 0 && typeof w != "function")) + throw new TypeError( + "fetchMethod must be a function if specified", + ); + if ( + ((this.#S = w), + (this.#T = !!w), + (this.#u = new Map()), + (this.#a = new Array(e).fill(void 0)), + (this.#i = new Array(e).fill(void 0)), + (this.#d = new st(e)), + (this.#v = new st(e)), + (this.#y = 0), + (this.#p = 0), + (this.#R = ir.create(e)), + (this.#o = 0), + (this.#f = 0), + typeof l == "function" && (this.#n = l), + typeof f == "function" && (this.#r = f), + typeof c == "function" + ? ((this.#h = c), (this.#m = [])) + : ((this.#h = void 0), (this.#m = void 0)), + (this.#E = !!this.#n), + (this.#F = !!this.#r), + (this.#e = !!this.#h), + (this.noDisposeOnSet = !!d), + (this.noUpdateTTL = !!u), + (this.noDeleteOnFetchRejection = !!E), + (this.allowStaleOnFetchRejection = !!S), + (this.allowStaleOnFetchAbort = !!B), + (this.ignoreFetchAbort = !!U), + this.maxEntrySize !== 0) + ) { + if (this.#s !== 0 && !V(this.#s)) + throw new TypeError( + "maxSize must be a positive integer if specified", + ); + if (!V(this.maxEntrySize)) + throw new TypeError( + "maxEntrySize must be a positive integer if specified", + ); + this.#$(); + } + if ( + ((this.allowStale = !!a), + (this.noDeleteOnStaleGet = !!y), + (this.updateAgeOnGet = !!h), + (this.updateAgeOnHas = !!o), + (this.ttlResolution = V(i) || i === 0 ? i : 1), + (this.ttlAutopurge = !!r), + (this.ttl = s || 0), + this.ttl) + ) { + if (!V(this.ttl)) + throw new TypeError( + "ttl must be a positive integer if specified", + ); + this.#P(); + } + if (this.#t === 0 && this.ttl === 0 && this.#s === 0) + throw new TypeError( + "At least one of max, maxSize, or ttl is required", + ); + if (!this.ttlAutopurge && !this.#t && !this.#s) { + let le = "LRU_CACHE_UNBOUNDED"; + sr(le) && + (as.add(le), + ls( + "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", + "UnboundedCacheWarning", + le, + us, + )); + } + } + getRemainingTTL(t) { + return this.#u.has(t) ? 1 / 0 : 0; + } + #P() { + let t = new Nt(this.#t), + e = new Nt(this.#t); + ((this.#g = t), (this.#x = e)); + let s = this.ttlAutopurge ? new Array(this.#t) : void 0; + ((this.#b = s), + (this.#W = (h, o, a = this.#c.now()) => { + if ( + ((e[h] = o !== 0 ? a : 0), + (t[h] = o), + s?.[h] && (clearTimeout(s[h]), (s[h] = void 0)), + o !== 0 && s) + ) { + let l = setTimeout(() => { + this.#_(h) && this.#A(this.#a[h], "expire"); + }, o + 1); + (l.unref && l.unref(), (s[h] = l)); + } + }), + (this.#C = (h) => { + e[h] = t[h] !== 0 ? this.#c.now() : 0; + }), + (this.#D = (h, o) => { + if (t[o]) { + let a = t[o], + l = e[o]; + if (!a || !l) return; + ((h.ttl = a), (h.start = l), (h.now = i || r())); + let f = h.now - l; + h.remainingTTL = a - f; + } + })); + let i = 0, + r = () => { + let h = this.#c.now(); + if (this.ttlResolution > 0) { + i = h; + let o = setTimeout(() => (i = 0), this.ttlResolution); + o.unref && o.unref(); + } + return h; + }; + ((this.getRemainingTTL = (h) => { + let o = this.#u.get(h); + if (o === void 0) return 0; + let a = t[o], + l = e[o]; + if (!a || !l) return 1 / 0; + let f = (i || r()) - l; + return a - f; + }), + (this.#_ = (h) => { + let o = e[h], + a = t[h]; + return !!a && !!o && (i || r()) - o > a; + })); + } + #C = () => {}; + #D = () => {}; + #W = () => {}; + #_ = () => !1; + #$() { + let t = new Nt(this.#t); + ((this.#f = 0), + (this.#O = t), + (this.#L = (e) => { + ((this.#f -= t[e]), (t[e] = 0)); + }), + (this.#B = (e, s, i, r) => { + if (this.#l(s)) return 0; + if (!V(i)) + if (r) { + if (typeof r != "function") + throw new TypeError( + "sizeCalculation must be a function", + ); + if (((i = r(s, e)), !V(i))) + 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 i; + }), + (this.#j = (e, s, i) => { + if (((t[e] = s), this.#s)) { + let r = this.#s - t[e]; + for (; this.#f > r; ) this.#G(!0); + } + ((this.#f += t[e]), + i && + ((i.entrySize = s), (i.totalCalculatedSize = this.#f))); + })); + } + #L = (t) => {}; + #j = (t, e, s) => {}; + #B = (t, e, s, i) => { + if (s || i) + throw new TypeError( + "cannot set size without setting maxSize or maxEntrySize on cache", + ); + return 0; + }; + *#k({ allowStale: t = this.allowStale } = {}) { + if (this.#o) + for ( + let e = this.#p; + !( + !this.#I(e) || + ((t || !this.#_(e)) && (yield e), e === this.#y) + ); + ) + e = this.#v[e]; + } + *#M({ allowStale: t = this.allowStale } = {}) { + if (this.#o) + for ( + let e = this.#y; + !( + !this.#I(e) || + ((t || !this.#_(e)) && (yield e), e === this.#p) + ); + ) + e = this.#d[e]; + } + #I(t) { + return t !== void 0 && this.#u.get(this.#a[t]) === t; + } + *entries() { + for (let t of this.#k()) + this.#i[t] !== void 0 && + this.#a[t] !== void 0 && + !this.#l(this.#i[t]) && + (yield [this.#a[t], this.#i[t]]); + } + *rentries() { + for (let t of this.#M()) + this.#i[t] !== void 0 && + this.#a[t] !== void 0 && + !this.#l(this.#i[t]) && + (yield [this.#a[t], this.#i[t]]); + } + *keys() { + for (let t of this.#k()) { + let e = this.#a[t]; + e !== void 0 && !this.#l(this.#i[t]) && (yield e); + } + } + *rkeys() { + for (let t of this.#M()) { + let e = this.#a[t]; + e !== void 0 && !this.#l(this.#i[t]) && (yield e); + } + } + *values() { + for (let t of this.#k()) + this.#i[t] !== void 0 && + !this.#l(this.#i[t]) && + (yield this.#i[t]); + } + *rvalues() { + for (let t of this.#M()) + this.#i[t] !== void 0 && + !this.#l(this.#i[t]) && + (yield this.#i[t]); + } + [Symbol.iterator]() { + return this.entries(); + } + [Symbol.toStringTag] = "LRUCache"; + find(t, e = {}) { + for (let s of this.#k()) { + let i = this.#i[s], + r = this.#l(i) ? i.__staleWhileFetching : i; + if (r !== void 0 && t(r, this.#a[s], this)) + return this.get(this.#a[s], e); + } + } + forEach(t, e = this) { + for (let s of this.#k()) { + let i = this.#i[s], + r = this.#l(i) ? i.__staleWhileFetching : i; + r !== void 0 && t.call(e, r, this.#a[s], this); + } + } + rforEach(t, e = this) { + for (let s of this.#M()) { + let i = this.#i[s], + r = this.#l(i) ? i.__staleWhileFetching : i; + r !== void 0 && t.call(e, r, this.#a[s], this); + } + } + purgeStale() { + let t = !1; + for (let e of this.#M({ allowStale: !0 })) + this.#_(e) && (this.#A(this.#a[e], "expire"), (t = !0)); + return t; + } + info(t) { + let e = this.#u.get(t); + if (e === void 0) return; + let s = this.#i[e], + i = this.#l(s) ? s.__staleWhileFetching : s; + if (i === void 0) return; + let r = { value: i }; + if (this.#g && this.#x) { + let h = this.#g[e], + o = this.#x[e]; + if (h && o) { + let a = h - (this.#c.now() - o); + ((r.ttl = a), (r.start = Date.now())); + } + } + return (this.#O && (r.size = this.#O[e]), r); + } + dump() { + let t = []; + for (let e of this.#k({ allowStale: !0 })) { + let s = this.#a[e], + i = this.#i[e], + r = this.#l(i) ? i.__staleWhileFetching : i; + if (r === void 0 || s === void 0) continue; + let h = { value: r }; + if (this.#g && this.#x) { + h.ttl = this.#g[e]; + let o = this.#c.now() - this.#x[e]; + h.start = Math.floor(Date.now() - o); + } + (this.#O && (h.size = this.#O[e]), t.unshift([s, h])); + } + return t; + } + load(t) { + this.clear(); + for (let [e, s] of t) { + if (s.start) { + let i = Date.now() - s.start; + s.start = this.#c.now() - i; + } + this.set(e, s.value, s); + } + } + set(t, e, s = {}) { + if (e === void 0) return (this.delete(t), this); + let { + ttl: i = this.ttl, + start: r, + noDisposeOnSet: h = this.noDisposeOnSet, + sizeCalculation: o = this.sizeCalculation, + status: a, + } = s, + { noUpdateTTL: l = this.noUpdateTTL } = s, + f = this.#B(t, e, s.size || 0, o); + if (this.maxEntrySize && f > this.maxEntrySize) + return ( + a && ((a.set = "miss"), (a.maxEntrySizeExceeded = !0)), + this.#A(t, "set"), + this + ); + let c = this.#o === 0 ? void 0 : this.#u.get(t); + if (c === void 0) + ((c = + this.#o === 0 + ? this.#p + : this.#R.length !== 0 + ? this.#R.pop() + : this.#o === this.#t + ? this.#G(!1) + : this.#o), + (this.#a[c] = t), + (this.#i[c] = e), + this.#u.set(t, c), + (this.#d[this.#p] = c), + (this.#v[c] = this.#p), + (this.#p = c), + this.#o++, + this.#j(c, f, a), + a && (a.set = "add"), + (l = !1), + this.#F && this.#r?.(e, t, "add")); + else { + this.#N(c); + let d = this.#i[c]; + if (e !== d) { + if (this.#T && this.#l(d)) { + d.__abortController.abort(new Error("replaced")); + let { __staleWhileFetching: u } = d; + u !== void 0 && + !h && + (this.#E && this.#n?.(u, t, "set"), + this.#e && this.#m?.push([u, t, "set"])); + } else + h || + (this.#E && this.#n?.(d, t, "set"), + this.#e && this.#m?.push([d, t, "set"])); + if ((this.#L(c), this.#j(c, f, a), (this.#i[c] = e), a)) { + a.set = "replace"; + let u = d && this.#l(d) ? d.__staleWhileFetching : d; + u !== void 0 && (a.oldValue = u); + } + } else a && (a.set = "update"); + this.#F && + this.onInsert?.(e, t, e === d ? "update" : "replace"); + } + if ( + (i !== 0 && !this.#g && this.#P(), + this.#g && (l || this.#W(c, i, r), a && this.#D(a, c)), + !h && this.#e && this.#m) + ) { + let d = this.#m, + u; + for (; (u = d?.shift()); ) this.#h?.(...u); + } + return this; + } + pop() { + try { + for (; this.#o; ) { + let t = this.#i[this.#y]; + if ((this.#G(!0), this.#l(t))) { + if (t.__staleWhileFetching) return t.__staleWhileFetching; + } else if (t !== void 0) return t; + } + } finally { + if (this.#e && this.#m) { + let t = this.#m, + e; + for (; (e = t?.shift()); ) this.#h?.(...e); + } + } + } + #G(t) { + let e = this.#y, + s = this.#a[e], + i = this.#i[e]; + return ( + this.#T && this.#l(i) + ? i.__abortController.abort(new Error("evicted")) + : (this.#E || this.#e) && + (this.#E && this.#n?.(i, s, "evict"), + this.#e && this.#m?.push([i, s, "evict"])), + this.#L(e), + this.#b?.[e] && + (clearTimeout(this.#b[e]), (this.#b[e] = void 0)), + t && + ((this.#a[e] = void 0), + (this.#i[e] = void 0), + this.#R.push(e)), + this.#o === 1 + ? ((this.#y = this.#p = 0), (this.#R.length = 0)) + : (this.#y = this.#d[e]), + this.#u.delete(s), + this.#o--, + e + ); + } + has(t, e = {}) { + let { updateAgeOnHas: s = this.updateAgeOnHas, status: i } = e, + r = this.#u.get(t); + if (r !== void 0) { + let h = this.#i[r]; + if (this.#l(h) && h.__staleWhileFetching === void 0) return !1; + if (this.#_(r)) i && ((i.has = "stale"), this.#D(i, r)); + else + return ( + s && this.#C(r), + i && ((i.has = "hit"), this.#D(i, r)), + !0 + ); + } else i && (i.has = "miss"); + return !1; + } + peek(t, e = {}) { + let { allowStale: s = this.allowStale } = e, + i = this.#u.get(t); + if (i === void 0 || (!s && this.#_(i))) return; + let r = this.#i[i]; + return this.#l(r) ? r.__staleWhileFetching : r; + } + #z(t, e, s, i) { + let r = e === void 0 ? void 0 : this.#i[e]; + if (this.#l(r)) return r; + let h = new Lt(), + { signal: o } = s; + o?.addEventListener("abort", () => h.abort(o.reason), { + signal: h.signal, + }); + let a = { signal: h.signal, options: s, context: i }, + l = (p, b = !1) => { + let { aborted: w } = h.signal, + v = s.ignoreFetchAbort && p !== void 0, + E = + s.ignoreFetchAbort || + !!(s.allowStaleOnFetchAbort && p !== void 0); + if ( + (s.status && + (w && !b + ? ((s.status.fetchAborted = !0), + (s.status.fetchError = h.signal.reason), + v && (s.status.fetchAbortIgnored = !0)) + : (s.status.fetchResolved = !0)), + w && !v && !b) + ) + return c(h.signal.reason, E); + let y = u, + S = this.#i[e]; + return ( + (S === u || (v && b && S === void 0)) && + (p === void 0 + ? y.__staleWhileFetching !== void 0 + ? (this.#i[e] = y.__staleWhileFetching) + : this.#A(t, "fetch") + : (s.status && (s.status.fetchUpdated = !0), + this.set(t, p, a.options))), + p + ); + }, + f = (p) => ( + s.status && + ((s.status.fetchRejected = !0), (s.status.fetchError = p)), + c(p, !1) + ), + c = (p, b) => { + let { aborted: w } = h.signal, + v = w && s.allowStaleOnFetchAbort, + E = v || s.allowStaleOnFetchRejection, + y = E || s.noDeleteOnFetchRejection, + S = u; + if ( + (this.#i[e] === u && + (!y || (!b && S.__staleWhileFetching === void 0) + ? this.#A(t, "fetch") + : v || (this.#i[e] = S.__staleWhileFetching)), + E) + ) + return ( + s.status && + S.__staleWhileFetching !== void 0 && + (s.status.returnedStale = !0), + S.__staleWhileFetching + ); + if (S.__returned === S) throw p; + }, + d = (p, b) => { + let w = this.#S?.(t, r, a); + (w && + w instanceof Promise && + w.then((v) => p(v === void 0 ? void 0 : v), b), + h.signal.addEventListener("abort", () => { + (!s.ignoreFetchAbort || s.allowStaleOnFetchAbort) && + (p(void 0), + s.allowStaleOnFetchAbort && (p = (v) => l(v, !0))); + })); + }; + s.status && (s.status.fetchDispatched = !0); + let u = new Promise(d).then(l, f), + m = Object.assign(u, { + __abortController: h, + __staleWhileFetching: r, + __returned: void 0, + }); + return ( + e === void 0 + ? (this.set(t, m, { ...a.options, status: void 0 }), + (e = this.#u.get(t))) + : (this.#i[e] = m), + m + ); + } + #l(t) { + if (!this.#T) return !1; + let e = t; + return ( + !!e && + e instanceof Promise && + e.hasOwnProperty("__staleWhileFetching") && + e.__abortController instanceof Lt + ); + } + async fetch(t, e = {}) { + let { + allowStale: s = this.allowStale, + updateAgeOnGet: i = this.updateAgeOnGet, + noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, + ttl: h = this.ttl, + noDisposeOnSet: o = this.noDisposeOnSet, + size: a = 0, + sizeCalculation: l = this.sizeCalculation, + noUpdateTTL: f = this.noUpdateTTL, + noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, + allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, + ignoreFetchAbort: u = this.ignoreFetchAbort, + allowStaleOnFetchAbort: m = this.allowStaleOnFetchAbort, + context: p, + forceRefresh: b = !1, + status: w, + signal: v, + } = e; + if (!this.#T) + return ( + w && (w.fetch = "get"), + this.get(t, { + allowStale: s, + updateAgeOnGet: i, + noDeleteOnStaleGet: r, + status: w, + }) + ); + let E = { + allowStale: s, + updateAgeOnGet: i, + noDeleteOnStaleGet: r, + ttl: h, + noDisposeOnSet: o, + size: a, + sizeCalculation: l, + noUpdateTTL: f, + noDeleteOnFetchRejection: c, + allowStaleOnFetchRejection: d, + allowStaleOnFetchAbort: m, + ignoreFetchAbort: u, + status: w, + signal: v, + }, + y = this.#u.get(t); + if (y === void 0) { + w && (w.fetch = "miss"); + let S = this.#z(t, y, E, p); + return (S.__returned = S); + } else { + let S = this.#i[y]; + if (this.#l(S)) { + let st = s && S.__staleWhileFetching !== void 0; + return ( + w && ((w.fetch = "inflight"), st && (w.returnedStale = !0)), + st ? S.__staleWhileFetching : (S.__returned = S) + ); + } + let B = this.#_(y); + if (!b && !B) + return ( + w && (w.fetch = "hit"), + this.#N(y), + i && this.#C(y), + w && this.#D(w, y), + S + ); + let U = this.#z(t, y, E, p), + et = U.__staleWhileFetching !== void 0 && s; + return ( + w && + ((w.fetch = B ? "stale" : "refresh"), + et && B && (w.returnedStale = !0)), + et ? U.__staleWhileFetching : (U.__returned = U) + ); + } + } + async forceFetch(t, e = {}) { + let s = await this.fetch(t, e); + if (s === void 0) throw new Error("fetch() returned undefined"); + return s; + } + memo(t, e = {}) { + let s = this.#w; + if (!s) throw new Error("no memoMethod provided to constructor"); + let { context: i, forceRefresh: r, ...h } = e, + o = this.get(t, h); + if (!r && o !== void 0) return o; + let a = s(t, o, { options: h, context: i }); + return (this.set(t, a, h), a); + } + get(t, e = {}) { + let { + allowStale: s = this.allowStale, + updateAgeOnGet: i = this.updateAgeOnGet, + noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, + status: h, + } = e, + o = this.#u.get(t); + if (o !== void 0) { + let a = this.#i[o], + l = this.#l(a); + return ( + h && this.#D(h, o), + this.#_(o) + ? (h && (h.get = "stale"), + l + ? (h && + s && + a.__staleWhileFetching !== void 0 && + (h.returnedStale = !0), + s ? a.__staleWhileFetching : void 0) + : (r || this.#A(t, "expire"), + h && s && (h.returnedStale = !0), + s ? a : void 0)) + : (h && (h.get = "hit"), + l + ? a.__staleWhileFetching + : (this.#N(o), i && this.#C(o), a)) + ); + } else h && (h.get = "miss"); + } + #U(t, e) { + ((this.#v[e] = t), (this.#d[t] = e)); + } + #N(t) { + t !== this.#p && + (t === this.#y + ? (this.#y = this.#d[t]) + : this.#U(this.#v[t], this.#d[t]), + this.#U(this.#p, t), + (this.#p = t)); + } + delete(t) { + return this.#A(t, "delete"); + } + #A(t, e) { + let s = !1; + if (this.#o !== 0) { + let i = this.#u.get(t); + if (i !== void 0) + if ( + (this.#b?.[i] && + (clearTimeout(this.#b?.[i]), (this.#b[i] = void 0)), + (s = !0), + this.#o === 1) + ) + this.#q(e); + else { + this.#L(i); + let r = this.#i[i]; + if ( + (this.#l(r) + ? r.__abortController.abort(new Error("deleted")) + : (this.#E || this.#e) && + (this.#E && this.#n?.(r, t, e), + this.#e && this.#m?.push([r, t, e])), + this.#u.delete(t), + (this.#a[i] = void 0), + (this.#i[i] = void 0), + i === this.#p) + ) + this.#p = this.#v[i]; + else if (i === this.#y) this.#y = this.#d[i]; + else { + let h = this.#v[i]; + this.#d[h] = this.#d[i]; + let o = this.#d[i]; + this.#v[o] = this.#v[i]; + } + (this.#o--, this.#R.push(i)); + } + } + if (this.#e && this.#m?.length) { + let i = this.#m, + r; + for (; (r = i?.shift()); ) this.#h?.(...r); + } + return s; + } + clear() { + return this.#q("delete"); + } + #q(t) { + for (let e of this.#M({ allowStale: !0 })) { + let s = this.#i[e]; + if (this.#l(s)) s.__abortController.abort(new Error("deleted")); + else { + let i = this.#a[e]; + (this.#E && this.#n?.(s, i, t), + this.#e && this.#m?.push([s, i, t])); + } + } + if ( + (this.#u.clear(), + this.#i.fill(void 0), + this.#a.fill(void 0), + this.#g && this.#x) + ) { + (this.#g.fill(0), this.#x.fill(0)); + for (let e of this.#b ?? []) e !== void 0 && clearTimeout(e); + this.#b?.fill(void 0); + } + if ( + (this.#O && this.#O.fill(0), + (this.#y = 0), + (this.#p = 0), + (this.#R.length = 0), + (this.#f = 0), + (this.#o = 0), + this.#e && this.#m) + ) { + let e = this.#m, + s; + for (; (s = e?.shift()); ) this.#h?.(...s); + } + } + }; + Wt.LRUCache = rr; + }); + var Oe = R((P) => { + "use strict"; + var nr = + (P && P.__importDefault) || + function (n) { + return n && n.__esModule ? n : { default: n }; + }; + Object.defineProperty(P, "__esModule", { value: !0 }); + P.Minipass = P.isWritable = P.isReadable = P.isStream = void 0; + var ds = + typeof process == "object" && process + ? process + : { stdout: null, stderr: null }, + _e = __nccwpck_require__(8474), + ws = nr(__nccwpck_require__(7075)), + hr = __nccwpck_require__(6193), + or = (n) => + !!n && + typeof n == "object" && + (n instanceof qt || + n instanceof ws.default || + (0, P.isReadable)(n) || + (0, P.isWritable)(n)); + P.isStream = or; + var ar = (n) => + !!n && + typeof n == "object" && + n instanceof _e.EventEmitter && + typeof n.pipe == "function" && + n.pipe !== ws.default.Writable.prototype.pipe; + P.isReadable = ar; + var lr = (n) => + !!n && + typeof n == "object" && + n instanceof _e.EventEmitter && + typeof n.write == "function" && + typeof n.end == "function"; + P.isWritable = lr; + var $ = Symbol("EOF"), + q = Symbol("maybeEmitEnd"), + K = Symbol("emittedEnd"), + Bt = Symbol("emittingEnd"), + lt = Symbol("emittedError"), + It = Symbol("closed"), + ps = Symbol("read"), + Gt = Symbol("flush"), + ms = Symbol("flushChunk"), + L = Symbol("encoding"), + rt = Symbol("decoder"), + x = Symbol("flowing"), + ct = Symbol("paused"), + nt = Symbol("resume"), + T = Symbol("buffer"), + M = Symbol("pipes"), + C = Symbol("bufferLength"), + we = Symbol("bufferPush"), + zt = Symbol("bufferShift"), + k = Symbol("objectMode"), + O = Symbol("destroyed"), + be = Symbol("error"), + ye = Symbol("emitData"), + gs = Symbol("emitEnd"), + Se = Symbol("emitEnd2"), + I = Symbol("async"), + ve = Symbol("abort"), + Ut = Symbol("aborted"), + ut = Symbol("signal"), + Z = Symbol("dataListeners"), + D = Symbol("discarded"), + ft = (n) => Promise.resolve().then(n), + cr = (n) => n(), + ur = (n) => n === "end" || n === "finish" || n === "prefinish", + fr = (n) => + n instanceof ArrayBuffer || + (!!n && + typeof n == "object" && + n.constructor && + n.constructor.name === "ArrayBuffer" && + n.byteLength >= 0), + dr = (n) => !Buffer.isBuffer(n) && ArrayBuffer.isView(n), + $t = class { + src; + dest; + opts; + ondrain; + constructor(t, e, s) { + ((this.src = t), + (this.dest = e), + (this.opts = s), + (this.ondrain = () => t[nt]()), + this.dest.on("drain", this.ondrain)); + } + unpipe() { + this.dest.removeListener("drain", this.ondrain); + } + proxyErrors(t) {} + end() { + (this.unpipe(), this.opts.end && this.dest.end()); + } + }, + Ee = class extends $t { + unpipe() { + (this.src.removeListener("error", this.proxyErrors), + super.unpipe()); + } + constructor(t, e, s) { + (super(t, e, s), + (this.proxyErrors = (i) => this.dest.emit("error", i)), + t.on("error", this.proxyErrors)); + } + }, + pr = (n) => !!n.objectMode, + mr = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer", + qt = class extends _e.EventEmitter { + [x] = !1; + [ct] = !1; + [M] = []; + [T] = []; + [k]; + [L]; + [I]; + [rt]; + [$] = !1; + [K] = !1; + [Bt] = !1; + [It] = !1; + [lt] = null; + [C] = 0; + [O] = !1; + [ut]; + [Ut] = !1; + [Z] = 0; + [D] = !1; + writable = !0; + readable = !0; + constructor(...t) { + let e = t[0] || {}; + if ((super(), e.objectMode && typeof e.encoding == "string")) + throw new TypeError( + "Encoding and objectMode may not be used together", + ); + (pr(e) + ? ((this[k] = !0), (this[L] = null)) + : mr(e) + ? ((this[L] = e.encoding), (this[k] = !1)) + : ((this[k] = !1), (this[L] = null)), + (this[I] = !!e.async), + (this[rt] = this[L] ? new hr.StringDecoder(this[L]) : null), + e && + e.debugExposeBuffer === !0 && + Object.defineProperty(this, "buffer", { get: () => this[T] }), + e && + e.debugExposePipes === !0 && + Object.defineProperty(this, "pipes", { get: () => this[M] })); + let { signal: s } = e; + s && + ((this[ut] = s), + s.aborted + ? this[ve]() + : s.addEventListener("abort", () => this[ve]())); + } + get bufferLength() { + return this[C]; + } + get encoding() { + return this[L]; + } + set encoding(t) { + throw new Error("Encoding must be set at instantiation time"); + } + setEncoding(t) { + throw new Error("Encoding must be set at instantiation time"); + } + get objectMode() { + return this[k]; + } + set objectMode(t) { + throw new Error("objectMode must be set at instantiation time"); + } + get async() { + return this[I]; + } + set async(t) { + this[I] = this[I] || !!t; + } + [ve]() { + ((this[Ut] = !0), + this.emit("abort", this[ut]?.reason), + this.destroy(this[ut]?.reason)); + } + get aborted() { + return this[Ut]; + } + set aborted(t) {} + write(t, e, s) { + if (this[Ut]) return !1; + if (this[$]) throw new Error("write after end"); + if (this[O]) + return ( + this.emit( + "error", + Object.assign( + new Error( + "Cannot call write after a stream was destroyed", + ), + { code: "ERR_STREAM_DESTROYED" }, + ), + ), + !0 + ); + (typeof e == "function" && ((s = e), (e = "utf8")), + e || (e = "utf8")); + let i = this[I] ? ft : cr; + if (!this[k] && !Buffer.isBuffer(t)) { + if (dr(t)) + t = Buffer.from(t.buffer, t.byteOffset, t.byteLength); + else if (fr(t)) t = Buffer.from(t); + else if (typeof t != "string") + throw new Error( + "Non-contiguous data written to non-objectMode stream", + ); + } + return this[k] + ? (this[x] && this[C] !== 0 && this[Gt](!0), + this[x] ? this.emit("data", t) : this[we](t), + this[C] !== 0 && this.emit("readable"), + s && i(s), + this[x]) + : t.length + ? (typeof t == "string" && + !(e === this[L] && !this[rt]?.lastNeed) && + (t = Buffer.from(t, e)), + Buffer.isBuffer(t) && this[L] && (t = this[rt].write(t)), + this[x] && this[C] !== 0 && this[Gt](!0), + this[x] ? this.emit("data", t) : this[we](t), + this[C] !== 0 && this.emit("readable"), + s && i(s), + this[x]) + : (this[C] !== 0 && this.emit("readable"), + s && i(s), + this[x]); + } + read(t) { + if (this[O]) return null; + if ( + ((this[D] = !1), this[C] === 0 || t === 0 || (t && t > this[C])) + ) + return (this[q](), null); + (this[k] && (t = null), + this[T].length > 1 && + !this[k] && + (this[T] = [ + this[L] + ? this[T].join("") + : Buffer.concat(this[T], this[C]), + ])); + let e = this[ps](t || null, this[T][0]); + return (this[q](), e); + } + [ps](t, e) { + if (this[k]) this[zt](); + else { + let s = e; + t === s.length || t === null + ? this[zt]() + : typeof s == "string" + ? ((this[T][0] = s.slice(t)), + (e = s.slice(0, t)), + (this[C] -= t)) + : ((this[T][0] = s.subarray(t)), + (e = s.subarray(0, t)), + (this[C] -= t)); + } + return ( + this.emit("data", e), + !this[T].length && !this[$] && this.emit("drain"), + e + ); + } + end(t, e, s) { + return ( + typeof t == "function" && ((s = t), (t = void 0)), + typeof e == "function" && ((s = e), (e = "utf8")), + t !== void 0 && this.write(t, e), + s && this.once("end", s), + (this[$] = !0), + (this.writable = !1), + (this[x] || !this[ct]) && this[q](), + this + ); + } + [nt]() { + this[O] || + (!this[Z] && !this[M].length && (this[D] = !0), + (this[ct] = !1), + (this[x] = !0), + this.emit("resume"), + this[T].length + ? this[Gt]() + : this[$] + ? this[q]() + : this.emit("drain")); + } + resume() { + return this[nt](); + } + pause() { + ((this[x] = !1), (this[ct] = !0), (this[D] = !1)); + } + get destroyed() { + return this[O]; + } + get flowing() { + return this[x]; + } + get paused() { + return this[ct]; + } + [we](t) { + (this[k] ? (this[C] += 1) : (this[C] += t.length), + this[T].push(t)); + } + [zt]() { + return ( + this[k] ? (this[C] -= 1) : (this[C] -= this[T][0].length), + this[T].shift() + ); + } + [Gt](t = !1) { + do; + while (this[ms](this[zt]()) && this[T].length); + !t && !this[T].length && !this[$] && this.emit("drain"); + } + [ms](t) { + return (this.emit("data", t), this[x]); + } + pipe(t, e) { + if (this[O]) return t; + this[D] = !1; + let s = this[K]; + return ( + (e = e || {}), + t === ds.stdout || t === ds.stderr + ? (e.end = !1) + : (e.end = e.end !== !1), + (e.proxyErrors = !!e.proxyErrors), + s + ? e.end && t.end() + : (this[M].push( + e.proxyErrors ? new Ee(this, t, e) : new $t(this, t, e), + ), + this[I] ? ft(() => this[nt]()) : this[nt]()), + t + ); + } + unpipe(t) { + let e = this[M].find((s) => s.dest === t); + e && + (this[M].length === 1 + ? (this[x] && this[Z] === 0 && (this[x] = !1), (this[M] = [])) + : this[M].splice(this[M].indexOf(e), 1), + e.unpipe()); + } + addListener(t, e) { + return this.on(t, e); + } + on(t, e) { + let s = super.on(t, e); + if (t === "data") + ((this[D] = !1), + this[Z]++, + !this[M].length && !this[x] && this[nt]()); + else if (t === "readable" && this[C] !== 0) + super.emit("readable"); + else if (ur(t) && this[K]) + (super.emit(t), this.removeAllListeners(t)); + else if (t === "error" && this[lt]) { + let i = e; + this[I] + ? ft(() => i.call(this, this[lt])) + : i.call(this, this[lt]); + } + return s; + } + removeListener(t, e) { + return this.off(t, e); + } + off(t, e) { + let s = super.off(t, e); + return ( + t === "data" && + ((this[Z] = this.listeners("data").length), + this[Z] === 0 && + !this[D] && + !this[M].length && + (this[x] = !1)), + s + ); + } + removeAllListeners(t) { + let e = super.removeAllListeners(t); + return ( + (t === "data" || t === void 0) && + ((this[Z] = 0), + !this[D] && !this[M].length && (this[x] = !1)), + e + ); + } + get emittedEnd() { + return this[K]; + } + [q]() { + !this[Bt] && + !this[K] && + !this[O] && + this[T].length === 0 && + this[$] && + ((this[Bt] = !0), + this.emit("end"), + this.emit("prefinish"), + this.emit("finish"), + this[It] && this.emit("close"), + (this[Bt] = !1)); + } + emit(t, ...e) { + let s = e[0]; + if (t !== "error" && t !== "close" && t !== O && this[O]) + return !1; + if (t === "data") + return !this[k] && !s + ? !1 + : this[I] + ? (ft(() => this[ye](s)), !0) + : this[ye](s); + if (t === "end") return this[gs](); + if (t === "close") { + if (((this[It] = !0), !this[K] && !this[O])) return !1; + let r = super.emit("close"); + return (this.removeAllListeners("close"), r); + } else if (t === "error") { + ((this[lt] = s), super.emit(be, s)); + let r = + !this[ut] || this.listeners("error").length + ? super.emit("error", s) + : !1; + return (this[q](), r); + } else if (t === "resume") { + let r = super.emit("resume"); + return (this[q](), r); + } else if (t === "finish" || t === "prefinish") { + let r = super.emit(t); + return (this.removeAllListeners(t), r); + } + let i = super.emit(t, ...e); + return (this[q](), i); + } + [ye](t) { + for (let s of this[M]) s.dest.write(t) === !1 && this.pause(); + let e = this[D] ? !1 : super.emit("data", t); + return (this[q](), e); + } + [gs]() { + return this[K] + ? !1 + : ((this[K] = !0), + (this.readable = !1), + this[I] ? (ft(() => this[Se]()), !0) : this[Se]()); + } + [Se]() { + if (this[rt]) { + let e = this[rt].end(); + if (e) { + for (let s of this[M]) s.dest.write(e); + this[D] || super.emit("data", e); + } + } + for (let e of this[M]) e.end(); + let t = super.emit("end"); + return (this.removeAllListeners("end"), t); + } + async collect() { + let t = Object.assign([], { dataLength: 0 }); + this[k] || (t.dataLength = 0); + let e = this.promise(); + return ( + this.on("data", (s) => { + (t.push(s), this[k] || (t.dataLength += s.length)); + }), + await e, + t + ); + } + async concat() { + if (this[k]) throw new Error("cannot concat in objectMode"); + let t = await this.collect(); + return this[L] ? t.join("") : Buffer.concat(t, t.dataLength); + } + async promise() { + return new Promise((t, e) => { + (this.on(O, () => e(new Error("stream destroyed"))), + this.on("error", (s) => e(s)), + this.on("end", () => t())); + }); + } + [Symbol.asyncIterator]() { + this[D] = !1; + let t = !1, + e = async () => ( + this.pause(), + (t = !0), + { value: void 0, done: !0 } + ); + return { + next: () => { + if (t) return e(); + let i = this.read(); + if (i !== null) + return Promise.resolve({ done: !1, value: i }); + if (this[$]) return e(); + let r, + h, + o = (c) => { + (this.off("data", a), + this.off("end", l), + this.off(O, f), + e(), + h(c)); + }, + a = (c) => { + (this.off("error", o), + this.off("end", l), + this.off(O, f), + this.pause(), + r({ value: c, done: !!this[$] })); + }, + l = () => { + (this.off("error", o), + this.off("data", a), + this.off(O, f), + e(), + r({ done: !0, value: void 0 })); + }, + f = () => o(new Error("stream destroyed")); + return new Promise((c, d) => { + ((h = d), + (r = c), + this.once(O, f), + this.once("error", o), + this.once("end", l), + this.once("data", a)); + }); + }, + throw: e, + return: e, + [Symbol.asyncIterator]() { + return this; + }, + [Symbol.asyncDispose]: async () => {}, + }; + } + [Symbol.iterator]() { + this[D] = !1; + let t = !1, + e = () => ( + this.pause(), + this.off(be, e), + this.off(O, e), + this.off("end", e), + (t = !0), + { done: !0, value: void 0 } + ), + s = () => { + if (t) return e(); + let i = this.read(); + return i === null ? e() : { done: !1, value: i }; + }; + return ( + this.once("end", e), + this.once(be, e), + this.once(O, e), + { + next: s, + throw: e, + return: e, + [Symbol.iterator]() { + return this; + }, + [Symbol.dispose]: () => {}, + } + ); + } + destroy(t) { + if (this[O]) + return (t ? this.emit("error", t) : this.emit(O), this); + ((this[O] = !0), + (this[D] = !0), + (this[T].length = 0), + (this[C] = 0)); + let e = this; + return ( + typeof e.close == "function" && !this[It] && e.close(), + t ? this.emit("error", t) : this.emit(O), + this + ); + } + static get isStream() { + return P.isStream; + } + }; + P.Minipass = qt; + }); + var Ms = R((_) => { + "use strict"; + var gr = + (_ && _.__createBinding) || + (Object.create + ? function (n, t, e, s) { + s === void 0 && (s = e); + var i = Object.getOwnPropertyDescriptor(t, e); + ((!i || + ("get" in i + ? !t.__esModule + : i.writable || i.configurable)) && + (i = { + enumerable: !0, + get: function () { + return t[e]; + }, + }), + Object.defineProperty(n, s, i)); + } + : function (n, t, e, s) { + (s === void 0 && (s = e), (n[s] = t[e])); + }), + wr = + (_ && _.__setModuleDefault) || + (Object.create + ? function (n, t) { + Object.defineProperty(n, "default", { + enumerable: !0, + value: t, + }); + } + : function (n, t) { + n.default = t; + }), + br = + (_ && _.__importStar) || + function (n) { + if (n && n.__esModule) return n; + var t = {}; + if (n != null) + for (var e in n) + e !== "default" && + Object.prototype.hasOwnProperty.call(n, e) && + gr(t, n, e); + return (wr(t, n), t); + }; + Object.defineProperty(_, "__esModule", { value: !0 }); + _.PathScurry = + _.Path = + _.PathScurryDarwin = + _.PathScurryPosix = + _.PathScurryWin32 = + _.PathScurryBase = + _.PathPosix = + _.PathWin32 = + _.PathBase = + _.ChildrenCache = + _.ResolveCache = + void 0; + var Qt = fs(), + Yt = __nccwpck_require__(6760), + yr = __nccwpck_require__(3136), + pt = __nccwpck_require__(9896), + Sr = br(__nccwpck_require__(3024)), + vr = pt.realpathSync.native, + Ht = __nccwpck_require__(1455), + bs = Oe(), + mt = { + lstatSync: pt.lstatSync, + readdir: pt.readdir, + readdirSync: pt.readdirSync, + readlinkSync: pt.readlinkSync, + realpathSync: vr, + promises: { + lstat: Ht.lstat, + readdir: Ht.readdir, + readlink: Ht.readlink, + realpath: Ht.realpath, + }, + }, + _s = (n) => + !n || n === mt || n === Sr + ? mt + : { + ...mt, + ...n, + promises: { ...mt.promises, ...(n.promises || {}) }, + }, + Os = /^\\\\\?\\([a-z]:)\\?$/i, + Er = (n) => n.replace(/\//g, "\\").replace(Os, "$1\\"), + _r = /[\\\/]/, + N = 0, + xs = 1, + Ts = 2, + G = 4, + Cs = 6, + Rs = 8, + Q = 10, + As = 12, + j = 15, + dt = ~j, + xe = 16, + ys = 32, + gt = 64, + W = 128, + Vt = 256, + Xt = 512, + Ss = gt | W | Xt, + Or = 1023, + Te = (n) => + n.isFile() + ? Rs + : n.isDirectory() + ? G + : n.isSymbolicLink() + ? Q + : n.isCharacterDevice() + ? Ts + : n.isBlockDevice() + ? Cs + : n.isSocket() + ? As + : n.isFIFO() + ? xs + : N, + vs = new Qt.LRUCache({ max: 2 ** 12 }), + wt = (n) => { + let t = vs.get(n); + if (t) return t; + let e = n.normalize("NFKD"); + return (vs.set(n, e), e); + }, + Es = new Qt.LRUCache({ max: 2 ** 12 }), + Kt = (n) => { + let t = Es.get(n); + if (t) return t; + let e = wt(n.toLowerCase()); + return (Es.set(n, e), e); + }, + bt = class extends Qt.LRUCache { + constructor() { + super({ max: 256 }); + } + }; + _.ResolveCache = bt; + var Jt = class extends Qt.LRUCache { + constructor(t = 16 * 1024) { + super({ maxSize: t, sizeCalculation: (e) => e.length + 1 }); + } + }; + _.ChildrenCache = Jt; + var ks = Symbol("PathScurry setAsCwd"), + A = class { + name; + root; + roots; + parent; + nocase; + isCWD = !1; + #t; + #s; + get dev() { + return this.#s; + } + #n; + get mode() { + return this.#n; + } + #r; + get nlink() { + return this.#r; + } + #h; + get uid() { + return this.#h; + } + #S; + get gid() { + return this.#S; + } + #w; + get rdev() { + return this.#w; + } + #c; + get blksize() { + return this.#c; + } + #o; + get ino() { + return this.#o; + } + #f; + get size() { + return this.#f; + } + #u; + get blocks() { + return this.#u; + } + #a; + get atimeMs() { + return this.#a; + } + #i; + get mtimeMs() { + return this.#i; + } + #d; + get ctimeMs() { + return this.#d; + } + #v; + get birthtimeMs() { + return this.#v; + } + #y; + get atime() { + return this.#y; + } + #p; + get mtime() { + return this.#p; + } + #R; + get ctime() { + return this.#R; + } + #m; + get birthtime() { + return this.#m; + } + #O; + #x; + #g; + #b; + #E; + #T; + #e; + #F; + #P; + #C; + get parentPath() { + return (this.parent || this).fullpath(); + } + get path() { + return this.parentPath; + } + constructor(t, e = N, s, i, r, h, o) { + ((this.name = t), + (this.#O = r ? Kt(t) : wt(t)), + (this.#e = e & Or), + (this.nocase = r), + (this.roots = i), + (this.root = s || this), + (this.#F = h), + (this.#g = o.fullpath), + (this.#E = o.relative), + (this.#T = o.relativePosix), + (this.parent = o.parent), + this.parent + ? (this.#t = this.parent.#t) + : (this.#t = _s(o.fs))); + } + depth() { + return this.#x !== void 0 + ? this.#x + : this.parent + ? (this.#x = this.parent.depth() + 1) + : (this.#x = 0); + } + childrenCache() { + return this.#F; + } + resolve(t) { + if (!t) return this; + let e = this.getRootString(t), + i = t.substring(e.length).split(this.splitSep); + return e ? this.getRoot(e).#D(i) : this.#D(i); + } + #D(t) { + let e = this; + for (let s of t) e = e.child(s); + return e; + } + children() { + let t = this.#F.get(this); + if (t) return t; + let e = Object.assign([], { provisional: 0 }); + return (this.#F.set(this, e), (this.#e &= ~xe), e); + } + child(t, e) { + if (t === "" || t === ".") return this; + if (t === "..") return this.parent || this; + let s = this.children(), + i = this.nocase ? Kt(t) : wt(t); + for (let a of s) if (a.#O === i) return a; + let r = this.parent ? this.sep : "", + h = this.#g ? this.#g + r + t : void 0, + o = this.newChild(t, N, { ...e, parent: this, fullpath: h }); + return (this.canReaddir() || (o.#e |= W), s.push(o), o); + } + relative() { + if (this.isCWD) return ""; + if (this.#E !== void 0) return this.#E; + let t = this.name, + e = this.parent; + if (!e) return (this.#E = this.name); + let s = e.relative(); + return s + (!s || !e.parent ? "" : this.sep) + t; + } + relativePosix() { + if (this.sep === "/") return this.relative(); + if (this.isCWD) return ""; + if (this.#T !== void 0) return this.#T; + let t = this.name, + e = this.parent; + if (!e) return (this.#T = this.fullpathPosix()); + let s = e.relativePosix(); + return s + (!s || !e.parent ? "" : "/") + t; + } + fullpath() { + if (this.#g !== void 0) return this.#g; + let t = this.name, + e = this.parent; + if (!e) return (this.#g = this.name); + let i = e.fullpath() + (e.parent ? this.sep : "") + t; + return (this.#g = i); + } + fullpathPosix() { + if (this.#b !== void 0) return this.#b; + if (this.sep === "/") return (this.#b = this.fullpath()); + if (!this.parent) { + let i = this.fullpath().replace(/\\/g, "/"); + return /^[a-z]:\//i.test(i) + ? (this.#b = `//?/${i}`) + : (this.#b = i); + } + let t = this.parent, + e = t.fullpathPosix(), + s = e + (!e || !t.parent ? "" : "/") + this.name; + return (this.#b = s); + } + isUnknown() { + return (this.#e & j) === N; + } + isType(t) { + return this[`is${t}`](); + } + getType() { + return this.isUnknown() + ? "Unknown" + : this.isDirectory() + ? "Directory" + : this.isFile() + ? "File" + : this.isSymbolicLink() + ? "SymbolicLink" + : this.isFIFO() + ? "FIFO" + : this.isCharacterDevice() + ? "CharacterDevice" + : this.isBlockDevice() + ? "BlockDevice" + : this.isSocket() + ? "Socket" + : "Unknown"; + } + isFile() { + return (this.#e & j) === Rs; + } + isDirectory() { + return (this.#e & j) === G; + } + isCharacterDevice() { + return (this.#e & j) === Ts; + } + isBlockDevice() { + return (this.#e & j) === Cs; + } + isFIFO() { + return (this.#e & j) === xs; + } + isSocket() { + return (this.#e & j) === As; + } + isSymbolicLink() { + return (this.#e & Q) === Q; + } + lstatCached() { + return this.#e & ys ? this : void 0; + } + readlinkCached() { + return this.#P; + } + realpathCached() { + return this.#C; + } + readdirCached() { + let t = this.children(); + return t.slice(0, t.provisional); + } + canReadlink() { + if (this.#P) return !0; + if (!this.parent) return !1; + let t = this.#e & j; + return !((t !== N && t !== Q) || this.#e & Vt || this.#e & W); + } + calledReaddir() { + return !!(this.#e & xe); + } + isENOENT() { + return !!(this.#e & W); + } + isNamed(t) { + return this.nocase ? this.#O === Kt(t) : this.#O === wt(t); + } + async readlink() { + let t = this.#P; + if (t) return t; + if (this.canReadlink() && this.parent) + try { + let e = await this.#t.promises.readlink(this.fullpath()), + s = (await this.parent.realpath())?.resolve(e); + if (s) return (this.#P = s); + } catch (e) { + this.#M(e.code); + return; + } + } + readlinkSync() { + let t = this.#P; + if (t) return t; + if (this.canReadlink() && this.parent) + try { + let e = this.#t.readlinkSync(this.fullpath()), + s = this.parent.realpathSync()?.resolve(e); + if (s) return (this.#P = s); + } catch (e) { + this.#M(e.code); + return; + } + } + #W(t) { + this.#e |= xe; + for (let e = t.provisional; e < t.length; e++) { + let s = t[e]; + s && s.#_(); + } + } + #_() { + this.#e & W || ((this.#e = (this.#e | W) & dt), this.#$()); + } + #$() { + let t = this.children(); + t.provisional = 0; + for (let e of t) e.#_(); + } + #L() { + ((this.#e |= Xt), this.#j()); + } + #j() { + if (this.#e & gt) return; + let t = this.#e; + ((t & j) === G && (t &= dt), (this.#e = t | gt), this.#$()); + } + #B(t = "") { + t === "ENOTDIR" || t === "EPERM" + ? this.#j() + : t === "ENOENT" + ? this.#_() + : (this.children().provisional = 0); + } + #k(t = "") { + t === "ENOTDIR" ? this.parent.#j() : t === "ENOENT" && this.#_(); + } + #M(t = "") { + let e = this.#e; + ((e |= Vt), + t === "ENOENT" && (e |= W), + (t === "EINVAL" || t === "UNKNOWN") && (e &= dt), + (this.#e = e), + t === "ENOTDIR" && this.parent && this.parent.#j()); + } + #I(t, e) { + return this.#z(t, e) || this.#G(t, e); + } + #G(t, e) { + let s = Te(t), + i = this.newChild(t.name, s, { parent: this }), + r = i.#e & j; + return ( + r !== G && r !== Q && r !== N && (i.#e |= gt), + e.unshift(i), + e.provisional++, + i + ); + } + #z(t, e) { + for (let s = e.provisional; s < e.length; s++) { + let i = e[s]; + if ((this.nocase ? Kt(t.name) : wt(t.name)) === i.#O) + return this.#l(t, i, s, e); + } + } + #l(t, e, s, i) { + let r = e.name; + return ( + (e.#e = (e.#e & dt) | Te(t)), + r !== t.name && (e.name = t.name), + s !== i.provisional && + (s === i.length - 1 ? i.pop() : i.splice(s, 1), i.unshift(e)), + i.provisional++, + e + ); + } + async lstat() { + if ((this.#e & W) === 0) + try { + return ( + this.#U(await this.#t.promises.lstat(this.fullpath())), + this + ); + } catch (t) { + this.#k(t.code); + } + } + lstatSync() { + if ((this.#e & W) === 0) + try { + return (this.#U(this.#t.lstatSync(this.fullpath())), this); + } catch (t) { + this.#k(t.code); + } + } + #U(t) { + let { + atime: e, + atimeMs: s, + birthtime: i, + birthtimeMs: r, + blksize: h, + blocks: o, + ctime: a, + ctimeMs: l, + dev: f, + gid: c, + ino: d, + mode: u, + mtime: m, + mtimeMs: p, + nlink: b, + rdev: w, + size: v, + uid: E, + } = t; + ((this.#y = e), + (this.#a = s), + (this.#m = i), + (this.#v = r), + (this.#c = h), + (this.#u = o), + (this.#R = a), + (this.#d = l), + (this.#s = f), + (this.#S = c), + (this.#o = d), + (this.#n = u), + (this.#p = m), + (this.#i = p), + (this.#r = b), + (this.#w = w), + (this.#f = v), + (this.#h = E)); + let y = Te(t); + ((this.#e = (this.#e & dt) | y | ys), + y !== N && y !== G && y !== Q && (this.#e |= gt)); + } + #N = []; + #A = !1; + #q(t) { + this.#A = !1; + let e = this.#N.slice(); + ((this.#N.length = 0), e.forEach((s) => s(null, t))); + } + readdirCB(t, e = !1) { + if (!this.canReaddir()) { + e ? t(null, []) : queueMicrotask(() => t(null, [])); + return; + } + let s = this.children(); + if (this.calledReaddir()) { + let r = s.slice(0, s.provisional); + e ? t(null, r) : queueMicrotask(() => t(null, r)); + return; + } + if ((this.#N.push(t), this.#A)) return; + this.#A = !0; + let i = this.fullpath(); + this.#t.readdir(i, { withFileTypes: !0 }, (r, h) => { + if (r) (this.#B(r.code), (s.provisional = 0)); + else { + for (let o of h) this.#I(o, s); + this.#W(s); + } + this.#q(s.slice(0, s.provisional)); + }); + } + #H; + async readdir() { + if (!this.canReaddir()) return []; + let t = this.children(); + if (this.calledReaddir()) return t.slice(0, t.provisional); + let e = this.fullpath(); + if (this.#H) await this.#H; + else { + let s = () => {}; + this.#H = new Promise((i) => (s = i)); + try { + for (let i of await this.#t.promises.readdir(e, { + withFileTypes: !0, + })) + this.#I(i, t); + this.#W(t); + } catch (i) { + (this.#B(i.code), (t.provisional = 0)); + } + ((this.#H = void 0), s()); + } + return t.slice(0, t.provisional); + } + readdirSync() { + if (!this.canReaddir()) return []; + let t = this.children(); + if (this.calledReaddir()) return t.slice(0, t.provisional); + let e = this.fullpath(); + try { + for (let s of this.#t.readdirSync(e, { withFileTypes: !0 })) + this.#I(s, t); + this.#W(t); + } catch (s) { + (this.#B(s.code), (t.provisional = 0)); + } + return t.slice(0, t.provisional); + } + canReaddir() { + if (this.#e & Ss) return !1; + let t = j & this.#e; + return t === N || t === G || t === Q; + } + shouldWalk(t, e) { + return ( + (this.#e & G) === G && + !(this.#e & Ss) && + !t.has(this) && + (!e || e(this)) + ); + } + async realpath() { + if (this.#C) return this.#C; + if (!((Xt | Vt | W) & this.#e)) + try { + let t = await this.#t.promises.realpath(this.fullpath()); + return (this.#C = this.resolve(t)); + } catch { + this.#L(); + } + } + realpathSync() { + if (this.#C) return this.#C; + if (!((Xt | Vt | W) & this.#e)) + try { + let t = this.#t.realpathSync(this.fullpath()); + return (this.#C = this.resolve(t)); + } catch { + this.#L(); + } + } + [ks](t) { + if (t === this) return; + ((t.isCWD = !1), (this.isCWD = !0)); + let e = new Set([]), + s = [], + i = this; + for (; i && i.parent; ) + (e.add(i), + (i.#E = s.join(this.sep)), + (i.#T = s.join("/")), + (i = i.parent), + s.push("..")); + for (i = t; i && i.parent && !e.has(i); ) + ((i.#E = void 0), (i.#T = void 0), (i = i.parent)); + } + }; + _.PathBase = A; + var yt = class n extends A { + sep = "\\"; + splitSep = _r; + constructor(t, e = N, s, i, r, h, o) { + super(t, e, s, i, r, h, o); + } + newChild(t, e = N, s = {}) { + return new n( + t, + e, + this.root, + this.roots, + this.nocase, + this.childrenCache(), + s, + ); + } + getRootString(t) { + return Yt.win32.parse(t).root; + } + getRoot(t) { + if (((t = Er(t.toUpperCase())), t === this.root.name)) + return this.root; + for (let [e, s] of Object.entries(this.roots)) + if (this.sameRoot(t, e)) return (this.roots[t] = s); + return (this.roots[t] = new Et(t, this).root); + } + sameRoot(t, e = this.root.name) { + return ( + (t = t.toUpperCase().replace(/\//g, "\\").replace(Os, "$1\\")), + t === e + ); + } + }; + _.PathWin32 = yt; + var St = class n extends A { + splitSep = "/"; + sep = "/"; + constructor(t, e = N, s, i, r, h, o) { + super(t, e, s, i, r, h, o); + } + getRootString(t) { + return t.startsWith("/") ? "/" : ""; + } + getRoot(t) { + return this.root; + } + newChild(t, e = N, s = {}) { + return new n( + t, + e, + this.root, + this.roots, + this.nocase, + this.childrenCache(), + s, + ); + } + }; + _.PathPosix = St; + var vt = class { + root; + rootPath; + roots; + cwd; + #t; + #s; + #n; + nocase; + #r; + constructor( + t = process.cwd(), + e, + s, + { nocase: i, childrenCacheSize: r = 16 * 1024, fs: h = mt } = {}, + ) { + ((this.#r = _s(h)), + (t instanceof URL || t.startsWith("file://")) && + (t = (0, yr.fileURLToPath)(t))); + let o = e.resolve(t); + ((this.roots = Object.create(null)), + (this.rootPath = this.parseRootPath(o)), + (this.#t = new bt()), + (this.#s = new bt()), + (this.#n = new Jt(r))); + let a = o.substring(this.rootPath.length).split(s); + if ((a.length === 1 && !a[0] && a.pop(), i === void 0)) + throw new TypeError( + "must provide nocase setting to PathScurryBase ctor", + ); + ((this.nocase = i), + (this.root = this.newRoot(this.#r)), + (this.roots[this.rootPath] = this.root)); + let l = this.root, + f = a.length - 1, + c = e.sep, + d = this.rootPath, + u = !1; + for (let m of a) { + let p = f--; + ((l = l.child(m, { + relative: new Array(p).fill("..").join(c), + relativePosix: new Array(p).fill("..").join("/"), + fullpath: (d += (u ? "" : c) + m), + })), + (u = !0)); + } + this.cwd = l; + } + depth(t = this.cwd) { + return ( + typeof t == "string" && (t = this.cwd.resolve(t)), + t.depth() + ); + } + childrenCache() { + return this.#n; + } + resolve(...t) { + let e = ""; + for (let r = t.length - 1; r >= 0; r--) { + let h = t[r]; + if ( + !(!h || h === ".") && + ((e = e ? `${h}/${e}` : h), this.isAbsolute(h)) + ) + break; + } + let s = this.#t.get(e); + if (s !== void 0) return s; + let i = this.cwd.resolve(e).fullpath(); + return (this.#t.set(e, i), i); + } + resolvePosix(...t) { + let e = ""; + for (let r = t.length - 1; r >= 0; r--) { + let h = t[r]; + if ( + !(!h || h === ".") && + ((e = e ? `${h}/${e}` : h), this.isAbsolute(h)) + ) + break; + } + let s = this.#s.get(e); + if (s !== void 0) return s; + let i = this.cwd.resolve(e).fullpathPosix(); + return (this.#s.set(e, i), i); + } + relative(t = this.cwd) { + return ( + typeof t == "string" && (t = this.cwd.resolve(t)), + t.relative() + ); + } + relativePosix(t = this.cwd) { + return ( + typeof t == "string" && (t = this.cwd.resolve(t)), + t.relativePosix() + ); + } + basename(t = this.cwd) { + return (typeof t == "string" && (t = this.cwd.resolve(t)), t.name); + } + dirname(t = this.cwd) { + return ( + typeof t == "string" && (t = this.cwd.resolve(t)), + (t.parent || t).fullpath() + ); + } + async readdir(t = this.cwd, e = { withFileTypes: !0 }) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)); + let { withFileTypes: s } = e; + if (t.canReaddir()) { + let i = await t.readdir(); + return s ? i : i.map((r) => r.name); + } else return []; + } + readdirSync(t = this.cwd, e = { withFileTypes: !0 }) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)); + let { withFileTypes: s = !0 } = e; + return t.canReaddir() + ? s + ? t.readdirSync() + : t.readdirSync().map((i) => i.name) + : []; + } + async lstat(t = this.cwd) { + return ( + typeof t == "string" && (t = this.cwd.resolve(t)), + t.lstat() + ); + } + lstatSync(t = this.cwd) { + return ( + typeof t == "string" && (t = this.cwd.resolve(t)), + t.lstatSync() + ); + } + async readlink( + t = this.cwd, + { withFileTypes: e } = { withFileTypes: !1 }, + ) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t.withFileTypes), (t = this.cwd)); + let s = await t.readlink(); + return e ? s : s?.fullpath(); + } + readlinkSync( + t = this.cwd, + { withFileTypes: e } = { withFileTypes: !1 }, + ) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t.withFileTypes), (t = this.cwd)); + let s = t.readlinkSync(); + return e ? s : s?.fullpath(); + } + async realpath( + t = this.cwd, + { withFileTypes: e } = { withFileTypes: !1 }, + ) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t.withFileTypes), (t = this.cwd)); + let s = await t.realpath(); + return e ? s : s?.fullpath(); + } + realpathSync( + t = this.cwd, + { withFileTypes: e } = { withFileTypes: !1 }, + ) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t.withFileTypes), (t = this.cwd)); + let s = t.realpathSync(); + return e ? s : s?.fullpath(); + } + async walk(t = this.cwd, e = {}) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)); + let { + withFileTypes: s = !0, + follow: i = !1, + filter: r, + walkFilter: h, + } = e, + o = []; + (!r || r(t)) && o.push(s ? t : t.fullpath()); + let a = new Set(), + l = (c, d) => { + (a.add(c), + c.readdirCB((u, m) => { + if (u) return d(u); + let p = m.length; + if (!p) return d(); + let b = () => { + --p === 0 && d(); + }; + for (let w of m) + ((!r || r(w)) && o.push(s ? w : w.fullpath()), + i && w.isSymbolicLink() + ? w + .realpath() + .then((v) => (v?.isUnknown() ? v.lstat() : v)) + .then((v) => + v?.shouldWalk(a, h) ? l(v, b) : b(), + ) + : w.shouldWalk(a, h) + ? l(w, b) + : b()); + }, !0)); + }, + f = t; + return new Promise((c, d) => { + l(f, (u) => { + if (u) return d(u); + c(o); + }); + }); + } + walkSync(t = this.cwd, e = {}) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)); + let { + withFileTypes: s = !0, + follow: i = !1, + filter: r, + walkFilter: h, + } = e, + o = []; + (!r || r(t)) && o.push(s ? t : t.fullpath()); + let a = new Set([t]); + for (let l of a) { + let f = l.readdirSync(); + for (let c of f) { + (!r || r(c)) && o.push(s ? c : c.fullpath()); + let d = c; + if (c.isSymbolicLink()) { + if (!(i && (d = c.realpathSync()))) continue; + d.isUnknown() && d.lstatSync(); + } + d.shouldWalk(a, h) && a.add(d); + } + } + return o; + } + [Symbol.asyncIterator]() { + return this.iterate(); + } + iterate(t = this.cwd, e = {}) { + return ( + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)), + this.stream(t, e)[Symbol.asyncIterator]() + ); + } + [Symbol.iterator]() { + return this.iterateSync(); + } + *iterateSync(t = this.cwd, e = {}) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)); + let { + withFileTypes: s = !0, + follow: i = !1, + filter: r, + walkFilter: h, + } = e; + (!r || r(t)) && (yield s ? t : t.fullpath()); + let o = new Set([t]); + for (let a of o) { + let l = a.readdirSync(); + for (let f of l) { + (!r || r(f)) && (yield s ? f : f.fullpath()); + let c = f; + if (f.isSymbolicLink()) { + if (!(i && (c = f.realpathSync()))) continue; + c.isUnknown() && c.lstatSync(); + } + c.shouldWalk(o, h) && o.add(c); + } + } + } + stream(t = this.cwd, e = {}) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)); + let { + withFileTypes: s = !0, + follow: i = !1, + filter: r, + walkFilter: h, + } = e, + o = new bs.Minipass({ objectMode: !0 }); + (!r || r(t)) && o.write(s ? t : t.fullpath()); + let a = new Set(), + l = [t], + f = 0, + c = () => { + let d = !1; + for (; !d; ) { + let u = l.shift(); + if (!u) { + f === 0 && o.end(); + return; + } + (f++, a.add(u)); + let m = (b, w, v = !1) => { + if (b) return o.emit("error", b); + if (i && !v) { + let E = []; + for (let y of w) + y.isSymbolicLink() && + E.push( + y + .realpath() + .then((S) => (S?.isUnknown() ? S.lstat() : S)), + ); + if (E.length) { + Promise.all(E).then(() => m(null, w, !0)); + return; + } + } + for (let E of w) + E && + (!r || r(E)) && + (o.write(s ? E : E.fullpath()) || (d = !0)); + f--; + for (let E of w) { + let y = E.realpathCached() || E; + y.shouldWalk(a, h) && l.push(y); + } + d && !o.flowing ? o.once("drain", c) : p || c(); + }, + p = !0; + (u.readdirCB(m, !0), (p = !1)); + } + }; + return (c(), o); + } + streamSync(t = this.cwd, e = {}) { + typeof t == "string" + ? (t = this.cwd.resolve(t)) + : t instanceof A || ((e = t), (t = this.cwd)); + let { + withFileTypes: s = !0, + follow: i = !1, + filter: r, + walkFilter: h, + } = e, + o = new bs.Minipass({ objectMode: !0 }), + a = new Set(); + (!r || r(t)) && o.write(s ? t : t.fullpath()); + let l = [t], + f = 0, + c = () => { + let d = !1; + for (; !d; ) { + let u = l.shift(); + if (!u) { + f === 0 && o.end(); + return; + } + (f++, a.add(u)); + let m = u.readdirSync(); + for (let p of m) + (!r || r(p)) && (o.write(s ? p : p.fullpath()) || (d = !0)); + f--; + for (let p of m) { + let b = p; + if (p.isSymbolicLink()) { + if (!(i && (b = p.realpathSync()))) continue; + b.isUnknown() && b.lstatSync(); + } + b.shouldWalk(a, h) && l.push(b); + } + } + d && !o.flowing && o.once("drain", c); + }; + return (c(), o); + } + chdir(t = this.cwd) { + let e = this.cwd; + ((this.cwd = typeof t == "string" ? this.cwd.resolve(t) : t), + this.cwd[ks](e)); + } + }; + _.PathScurryBase = vt; + var Et = class extends vt { + sep = "\\"; + constructor(t = process.cwd(), e = {}) { + let { nocase: s = !0 } = e; + (super(t, Yt.win32, "\\", { ...e, nocase: s }), (this.nocase = s)); + for (let i = this.cwd; i; i = i.parent) i.nocase = this.nocase; + } + parseRootPath(t) { + return Yt.win32.parse(t).root.toUpperCase(); + } + newRoot(t) { + return new yt( + this.rootPath, + G, + void 0, + this.roots, + this.nocase, + this.childrenCache(), + { fs: t }, + ); + } + isAbsolute(t) { + return ( + t.startsWith("/") || + t.startsWith("\\") || + /^[a-z]:(\/|\\)/i.test(t) + ); + } + }; + _.PathScurryWin32 = Et; + var _t = class extends vt { + sep = "/"; + constructor(t = process.cwd(), e = {}) { + let { nocase: s = !1 } = e; + (super(t, Yt.posix, "/", { ...e, nocase: s }), (this.nocase = s)); + } + parseRootPath(t) { + return "/"; + } + newRoot(t) { + return new St( + this.rootPath, + G, + void 0, + this.roots, + this.nocase, + this.childrenCache(), + { fs: t }, + ); + } + isAbsolute(t) { + return t.startsWith("/"); + } + }; + _.PathScurryPosix = _t; + var Zt = class extends _t { + constructor(t = process.cwd(), e = {}) { + let { nocase: s = !0 } = e; + super(t, { ...e, nocase: s }); + } + }; + _.PathScurryDarwin = Zt; + _.Path = process.platform === "win32" ? yt : St; + _.PathScurry = + process.platform === "win32" + ? Et + : process.platform === "darwin" + ? Zt + : _t; + }); + var Re = R((te) => { + "use strict"; + Object.defineProperty(te, "__esModule", { value: !0 }); + te.Pattern = void 0; + var xr = H(), + Tr = (n) => n.length >= 1, + Cr = (n) => n.length >= 1, + Rr = Symbol.for("nodejs.util.inspect.custom"), + Ce = class n { + #t; + #s; + #n; + length; + #r; + #h; + #S; + #w; + #c; + #o; + #f = !0; + constructor(t, e, s, i) { + if (!Tr(t)) throw new TypeError("empty pattern list"); + if (!Cr(e)) throw new TypeError("empty glob list"); + if (e.length !== t.length) + throw new TypeError( + "mismatched pattern list and glob list lengths", + ); + if (((this.length = t.length), s < 0 || s >= this.length)) + throw new TypeError("index out of range"); + if ( + ((this.#t = t), + (this.#s = e), + (this.#n = s), + (this.#r = i), + this.#n === 0) + ) { + if (this.isUNC()) { + let [r, h, o, a, ...l] = this.#t, + [f, c, d, u, ...m] = this.#s; + l[0] === "" && (l.shift(), m.shift()); + let p = [r, h, o, a, ""].join("/"), + b = [f, c, d, u, ""].join("/"); + ((this.#t = [p, ...l]), + (this.#s = [b, ...m]), + (this.length = this.#t.length)); + } else if (this.isDrive() || this.isAbsolute()) { + let [r, ...h] = this.#t, + [o, ...a] = this.#s; + h[0] === "" && (h.shift(), a.shift()); + let l = r + "/", + f = o + "/"; + ((this.#t = [l, ...h]), + (this.#s = [f, ...a]), + (this.length = this.#t.length)); + } + } + } + [Rr]() { + return "Pattern <" + this.#s.slice(this.#n).join("/") + ">"; + } + pattern() { + return this.#t[this.#n]; + } + isString() { + return typeof this.#t[this.#n] == "string"; + } + isGlobstar() { + return this.#t[this.#n] === xr.GLOBSTAR; + } + isRegExp() { + return this.#t[this.#n] instanceof RegExp; + } + globString() { + return (this.#S = + this.#S || + (this.#n === 0 + ? this.isAbsolute() + ? this.#s[0] + this.#s.slice(1).join("/") + : this.#s.join("/") + : this.#s.slice(this.#n).join("/"))); + } + hasMore() { + return this.length > this.#n + 1; + } + rest() { + return this.#h !== void 0 + ? this.#h + : this.hasMore() + ? ((this.#h = new n(this.#t, this.#s, this.#n + 1, this.#r)), + (this.#h.#o = this.#o), + (this.#h.#c = this.#c), + (this.#h.#w = this.#w), + this.#h) + : (this.#h = null); + } + isUNC() { + let t = this.#t; + return this.#c !== void 0 + ? this.#c + : (this.#c = + this.#r === "win32" && + this.#n === 0 && + t[0] === "" && + t[1] === "" && + typeof t[2] == "string" && + !!t[2] && + typeof t[3] == "string" && + !!t[3]); + } + isDrive() { + let t = this.#t; + return this.#w !== void 0 + ? this.#w + : (this.#w = + this.#r === "win32" && + this.#n === 0 && + this.length > 1 && + typeof t[0] == "string" && + /^[a-z]:$/i.test(t[0])); + } + isAbsolute() { + let t = this.#t; + return this.#o !== void 0 + ? this.#o + : (this.#o = + (t[0] === "" && t.length > 1) || + this.isDrive() || + this.isUNC()); + } + root() { + let t = this.#t[0]; + return typeof t == "string" && this.isAbsolute() && this.#n === 0 + ? t + : ""; + } + checkFollowGlobstar() { + return !(this.#n === 0 || !this.isGlobstar() || !this.#f); + } + markFollowGlobstar() { + return this.#n === 0 || !this.isGlobstar() || !this.#f + ? !1 + : ((this.#f = !1), !0); + } + }; + te.Pattern = Ce; + }); + var ke = R((ee) => { + "use strict"; + Object.defineProperty(ee, "__esModule", { value: !0 }); + ee.Ignore = void 0; + var Ps = H(), + Ar = Re(), + kr = + typeof process == "object" && + process && + typeof process.platform == "string" + ? process.platform + : "linux", + Ae = class { + relative; + relativeChildren; + absolute; + absoluteChildren; + platform; + mmopts; + constructor( + t, + { + nobrace: e, + nocase: s, + noext: i, + noglobstar: r, + platform: h = kr, + }, + ) { + ((this.relative = []), + (this.absolute = []), + (this.relativeChildren = []), + (this.absoluteChildren = []), + (this.platform = h), + (this.mmopts = { + dot: !0, + nobrace: e, + nocase: s, + noext: i, + noglobstar: r, + optimizationLevel: 2, + platform: h, + nocomment: !0, + nonegate: !0, + })); + for (let o of t) this.add(o); + } + add(t) { + let e = new Ps.Minimatch(t, this.mmopts); + for (let s = 0; s < e.set.length; s++) { + let i = e.set[s], + r = e.globParts[s]; + if (!i || !r) throw new Error("invalid pattern object"); + for (; i[0] === "." && r[0] === "."; ) (i.shift(), r.shift()); + let h = new Ar.Pattern(i, r, 0, this.platform), + o = new Ps.Minimatch(h.globString(), this.mmopts), + a = r[r.length - 1] === "**", + l = h.isAbsolute(); + (l ? this.absolute.push(o) : this.relative.push(o), + a && + (l + ? this.absoluteChildren.push(o) + : this.relativeChildren.push(o))); + } + } + ignored(t) { + let e = t.fullpath(), + s = `${e}/`, + i = t.relative() || ".", + r = `${i}/`; + for (let h of this.relative) + if (h.match(i) || h.match(r)) return !0; + for (let h of this.absolute) + if (h.match(e) || h.match(s)) return !0; + return !1; + } + childrenIgnored(t) { + let e = t.fullpath() + "/", + s = (t.relative() || ".") + "/"; + for (let i of this.relativeChildren) if (i.match(s)) return !0; + for (let i of this.absoluteChildren) if (i.match(e)) return !0; + return !1; + } + }; + ee.Ignore = Ae; + }); + var Fs = R((z) => { + "use strict"; + Object.defineProperty(z, "__esModule", { value: !0 }); + z.Processor = z.SubWalks = z.MatchRecord = z.HasWalkedCache = void 0; + var Ds = H(), + se = class n { + store; + constructor(t = new Map()) { + this.store = t; + } + copy() { + return new n(new Map(this.store)); + } + hasWalked(t, e) { + return this.store.get(t.fullpath())?.has(e.globString()); + } + storeWalked(t, e) { + let s = t.fullpath(), + i = this.store.get(s); + i + ? i.add(e.globString()) + : this.store.set(s, new Set([e.globString()])); + } + }; + z.HasWalkedCache = se; + var ie = class { + store = new Map(); + add(t, e, s) { + let i = (e ? 2 : 0) | (s ? 1 : 0), + r = this.store.get(t); + this.store.set(t, r === void 0 ? i : i & r); + } + entries() { + return [...this.store.entries()].map(([t, e]) => [ + t, + !!(e & 2), + !!(e & 1), + ]); + } + }; + z.MatchRecord = ie; + var re = class { + store = new Map(); + add(t, e) { + if (!t.canReaddir()) return; + let s = this.store.get(t); + s + ? s.find((i) => i.globString() === e.globString()) || s.push(e) + : this.store.set(t, [e]); + } + get(t) { + let e = this.store.get(t); + if (!e) throw new Error("attempting to walk unknown path"); + return e; + } + entries() { + return this.keys().map((t) => [t, this.store.get(t)]); + } + keys() { + return [...this.store.keys()].filter((t) => t.canReaddir()); + } + }; + z.SubWalks = re; + var Me = class n { + hasWalkedCache; + matches = new ie(); + subwalks = new re(); + patterns; + follow; + dot; + opts; + constructor(t, e) { + ((this.opts = t), + (this.follow = !!t.follow), + (this.dot = !!t.dot), + (this.hasWalkedCache = e ? e.copy() : new se())); + } + processPatterns(t, e) { + this.patterns = e; + let s = e.map((i) => [t, i]); + for (let [i, r] of s) { + this.hasWalkedCache.storeWalked(i, r); + let h = r.root(), + o = r.isAbsolute() && this.opts.absolute !== !1; + if (h) { + i = i.resolve( + h === "/" && this.opts.root !== void 0 ? this.opts.root : h, + ); + let c = r.rest(); + if (c) r = c; + else { + this.matches.add(i, !0, !1); + continue; + } + } + if (i.isENOENT()) continue; + let a, + l, + f = !1; + for (; typeof (a = r.pattern()) == "string" && (l = r.rest()); ) + ((i = i.resolve(a)), (r = l), (f = !0)); + if (((a = r.pattern()), (l = r.rest()), f)) { + if (this.hasWalkedCache.hasWalked(i, r)) continue; + this.hasWalkedCache.storeWalked(i, r); + } + if (typeof a == "string") { + let c = a === ".." || a === "" || a === "."; + this.matches.add(i.resolve(a), o, c); + continue; + } else if (a === Ds.GLOBSTAR) { + (!i.isSymbolicLink() || + this.follow || + r.checkFollowGlobstar()) && + this.subwalks.add(i, r); + let c = l?.pattern(), + d = l?.rest(); + if (!l || ((c === "" || c === ".") && !d)) + this.matches.add(i, o, c === "" || c === "."); + else if (c === "..") { + let u = i.parent || i; + d + ? this.hasWalkedCache.hasWalked(u, d) || + this.subwalks.add(u, d) + : this.matches.add(u, o, !0); + } + } else a instanceof RegExp && this.subwalks.add(i, r); + } + return this; + } + subwalkTargets() { + return this.subwalks.keys(); + } + child() { + return new n(this.opts, this.hasWalkedCache); + } + filterEntries(t, e) { + let s = this.subwalks.get(t), + i = this.child(); + for (let r of e) + for (let h of s) { + let o = h.isAbsolute(), + a = h.pattern(), + l = h.rest(); + a === Ds.GLOBSTAR + ? i.testGlobstar(r, h, l, o) + : a instanceof RegExp + ? i.testRegExp(r, a, l, o) + : i.testString(r, a, l, o); + } + return i; + } + testGlobstar(t, e, s, i) { + if ( + ((this.dot || !t.name.startsWith(".")) && + (e.hasMore() || this.matches.add(t, i, !1), + t.canReaddir() && + (this.follow || !t.isSymbolicLink() + ? this.subwalks.add(t, e) + : t.isSymbolicLink() && + (s && e.checkFollowGlobstar() + ? this.subwalks.add(t, s) + : e.markFollowGlobstar() && this.subwalks.add(t, e)))), + s) + ) { + let r = s.pattern(); + if (typeof r == "string" && r !== ".." && r !== "" && r !== ".") + this.testString(t, r, s.rest(), i); + else if (r === "..") { + let h = t.parent || t; + this.subwalks.add(h, s); + } else r instanceof RegExp && this.testRegExp(t, r, s.rest(), i); + } + } + testRegExp(t, e, s, i) { + e.test(t.name) && + (s ? this.subwalks.add(t, s) : this.matches.add(t, i, !1)); + } + testString(t, e, s, i) { + t.isNamed(e) && + (s ? this.subwalks.add(t, s) : this.matches.add(t, i, !1)); + } + }; + z.Processor = Me; + }); + var Ls = R((X) => { + "use strict"; + Object.defineProperty(X, "__esModule", { value: !0 }); + X.GlobStream = X.GlobWalker = X.GlobUtil = void 0; + var Mr = Oe(), + js = ke(), + Ns = Fs(), + Pr = (n, t) => + typeof n == "string" + ? new js.Ignore([n], t) + : Array.isArray(n) + ? new js.Ignore(n, t) + : n, + Ot = class { + path; + patterns; + opts; + seen = new Set(); + paused = !1; + aborted = !1; + #t = []; + #s; + #n; + signal; + maxDepth; + includeChildMatches; + constructor(t, e, s) { + if ( + ((this.patterns = t), + (this.path = e), + (this.opts = s), + (this.#n = !s.posix && s.platform === "win32" ? "\\" : "/"), + (this.includeChildMatches = s.includeChildMatches !== !1), + (s.ignore || !this.includeChildMatches) && + ((this.#s = Pr(s.ignore ?? [], s)), + !this.includeChildMatches && + typeof this.#s.add != "function")) + ) { + let i = + "cannot ignore child matches, ignore lacks add() method."; + throw new Error(i); + } + ((this.maxDepth = s.maxDepth || 1 / 0), + s.signal && + ((this.signal = s.signal), + this.signal.addEventListener("abort", () => { + this.#t.length = 0; + }))); + } + #r(t) { + return this.seen.has(t) || !!this.#s?.ignored?.(t); + } + #h(t) { + return !!this.#s?.childrenIgnored?.(t); + } + pause() { + this.paused = !0; + } + resume() { + if (this.signal?.aborted) return; + this.paused = !1; + let t; + for (; !this.paused && (t = this.#t.shift()); ) t(); + } + onResume(t) { + this.signal?.aborted || (this.paused ? this.#t.push(t) : t()); + } + async matchCheck(t, e) { + if (e && this.opts.nodir) return; + let s; + if (this.opts.realpath) { + if (((s = t.realpathCached() || (await t.realpath())), !s)) + return; + t = s; + } + let r = t.isUnknown() || this.opts.stat ? await t.lstat() : t; + if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) { + let h = await r.realpath(); + h && (h.isUnknown() || this.opts.stat) && (await h.lstat()); + } + return this.matchCheckTest(r, e); + } + matchCheckTest(t, e) { + return t && + (this.maxDepth === 1 / 0 || t.depth() <= this.maxDepth) && + (!e || t.canReaddir()) && + (!this.opts.nodir || !t.isDirectory()) && + (!this.opts.nodir || + !this.opts.follow || + !t.isSymbolicLink() || + !t.realpathCached()?.isDirectory()) && + !this.#r(t) + ? t + : void 0; + } + matchCheckSync(t, e) { + if (e && this.opts.nodir) return; + let s; + if (this.opts.realpath) { + if (((s = t.realpathCached() || t.realpathSync()), !s)) return; + t = s; + } + let r = t.isUnknown() || this.opts.stat ? t.lstatSync() : t; + if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) { + let h = r.realpathSync(); + h && (h?.isUnknown() || this.opts.stat) && h.lstatSync(); + } + return this.matchCheckTest(r, e); + } + matchFinish(t, e) { + if (this.#r(t)) return; + if (!this.includeChildMatches && this.#s?.add) { + let r = `${t.relativePosix()}/**`; + this.#s.add(r); + } + let s = this.opts.absolute === void 0 ? e : this.opts.absolute; + this.seen.add(t); + let i = this.opts.mark && t.isDirectory() ? this.#n : ""; + if (this.opts.withFileTypes) this.matchEmit(t); + else if (s) { + let r = this.opts.posix ? t.fullpathPosix() : t.fullpath(); + this.matchEmit(r + i); + } else { + let r = this.opts.posix ? t.relativePosix() : t.relative(), + h = + this.opts.dotRelative && !r.startsWith(".." + this.#n) + ? "." + this.#n + : ""; + this.matchEmit(r ? h + r + i : "." + i); + } + } + async match(t, e, s) { + let i = await this.matchCheck(t, s); + i && this.matchFinish(i, e); + } + matchSync(t, e, s) { + let i = this.matchCheckSync(t, s); + i && this.matchFinish(i, e); + } + walkCB(t, e, s) { + (this.signal?.aborted && s(), + this.walkCB2(t, e, new Ns.Processor(this.opts), s)); + } + walkCB2(t, e, s, i) { + if (this.#h(t)) return i(); + if ((this.signal?.aborted && i(), this.paused)) { + this.onResume(() => this.walkCB2(t, e, s, i)); + return; + } + s.processPatterns(t, e); + let r = 1, + h = () => { + --r === 0 && i(); + }; + for (let [o, a, l] of s.matches.entries()) + this.#r(o) || (r++, this.match(o, a, l).then(() => h())); + for (let o of s.subwalkTargets()) { + if (this.maxDepth !== 1 / 0 && o.depth() >= this.maxDepth) + continue; + r++; + let a = o.readdirCached(); + o.calledReaddir() + ? this.walkCB3(o, a, s, h) + : o.readdirCB((l, f) => this.walkCB3(o, f, s, h), !0); + } + h(); + } + walkCB3(t, e, s, i) { + s = s.filterEntries(t, e); + let r = 1, + h = () => { + --r === 0 && i(); + }; + for (let [o, a, l] of s.matches.entries()) + this.#r(o) || (r++, this.match(o, a, l).then(() => h())); + for (let [o, a] of s.subwalks.entries()) + (r++, this.walkCB2(o, a, s.child(), h)); + h(); + } + walkCBSync(t, e, s) { + (this.signal?.aborted && s(), + this.walkCB2Sync(t, e, new Ns.Processor(this.opts), s)); + } + walkCB2Sync(t, e, s, i) { + if (this.#h(t)) return i(); + if ((this.signal?.aborted && i(), this.paused)) { + this.onResume(() => this.walkCB2Sync(t, e, s, i)); + return; + } + s.processPatterns(t, e); + let r = 1, + h = () => { + --r === 0 && i(); + }; + for (let [o, a, l] of s.matches.entries()) + this.#r(o) || this.matchSync(o, a, l); + for (let o of s.subwalkTargets()) { + if (this.maxDepth !== 1 / 0 && o.depth() >= this.maxDepth) + continue; + r++; + let a = o.readdirSync(); + this.walkCB3Sync(o, a, s, h); + } + h(); + } + walkCB3Sync(t, e, s, i) { + s = s.filterEntries(t, e); + let r = 1, + h = () => { + --r === 0 && i(); + }; + for (let [o, a, l] of s.matches.entries()) + this.#r(o) || this.matchSync(o, a, l); + for (let [o, a] of s.subwalks.entries()) + (r++, this.walkCB2Sync(o, a, s.child(), h)); + h(); + } + }; + X.GlobUtil = Ot; + var Pe = class extends Ot { + matches = new Set(); + constructor(t, e, s) { + super(t, e, s); + } + matchEmit(t) { + this.matches.add(t); + } + async walk() { + if (this.signal?.aborted) throw this.signal.reason; + return ( + this.path.isUnknown() && (await this.path.lstat()), + await new Promise((t, e) => { + this.walkCB(this.path, this.patterns, () => { + this.signal?.aborted + ? e(this.signal.reason) + : t(this.matches); + }); + }), + this.matches + ); + } + walkSync() { + if (this.signal?.aborted) throw this.signal.reason; + return ( + this.path.isUnknown() && this.path.lstatSync(), + this.walkCBSync(this.path, this.patterns, () => { + if (this.signal?.aborted) throw this.signal.reason; + }), + this.matches + ); + } + }; + X.GlobWalker = Pe; + var De = class extends Ot { + results; + constructor(t, e, s) { + (super(t, e, s), + (this.results = new Mr.Minipass({ + signal: this.signal, + objectMode: !0, + })), + this.results.on("drain", () => this.resume()), + this.results.on("resume", () => this.resume())); + } + matchEmit(t) { + (this.results.write(t), this.results.flowing || this.pause()); + } + stream() { + let t = this.path; + return ( + t.isUnknown() + ? t.lstat().then(() => { + this.walkCB(t, this.patterns, () => this.results.end()); + }) + : this.walkCB(t, this.patterns, () => this.results.end()), + this.results + ); + } + streamSync() { + return ( + this.path.isUnknown() && this.path.lstatSync(), + this.walkCBSync(this.path, this.patterns, () => + this.results.end(), + ), + this.results + ); + } + }; + X.GlobStream = De; + }); + var je = R((oe) => { + "use strict"; + Object.defineProperty(oe, "__esModule", { value: !0 }); + oe.Glob = void 0; + var Dr = H(), + Fr = __nccwpck_require__(3136), + ne = Ms(), + jr = Re(), + he = Ls(), + Nr = + typeof process == "object" && + process && + typeof process.platform == "string" + ? process.platform + : "linux", + Fe = class { + absolute; + cwd; + root; + dot; + dotRelative; + follow; + ignore; + magicalBraces; + mark; + matchBase; + maxDepth; + nobrace; + nocase; + nodir; + noext; + noglobstar; + pattern; + platform; + realpath; + scurry; + stat; + signal; + windowsPathsNoEscape; + withFileTypes; + includeChildMatches; + opts; + patterns; + constructor(t, e) { + if (!e) throw new TypeError("glob options required"); + if ( + ((this.withFileTypes = !!e.withFileTypes), + (this.signal = e.signal), + (this.follow = !!e.follow), + (this.dot = !!e.dot), + (this.dotRelative = !!e.dotRelative), + (this.nodir = !!e.nodir), + (this.mark = !!e.mark), + e.cwd + ? (e.cwd instanceof URL || e.cwd.startsWith("file://")) && + (e.cwd = (0, Fr.fileURLToPath)(e.cwd)) + : (this.cwd = ""), + (this.cwd = e.cwd || ""), + (this.root = e.root), + (this.magicalBraces = !!e.magicalBraces), + (this.nobrace = !!e.nobrace), + (this.noext = !!e.noext), + (this.realpath = !!e.realpath), + (this.absolute = e.absolute), + (this.includeChildMatches = e.includeChildMatches !== !1), + (this.noglobstar = !!e.noglobstar), + (this.matchBase = !!e.matchBase), + (this.maxDepth = + typeof e.maxDepth == "number" ? e.maxDepth : 1 / 0), + (this.stat = !!e.stat), + (this.ignore = e.ignore), + this.withFileTypes && this.absolute !== void 0) + ) + throw new Error("cannot set absolute and withFileTypes:true"); + if ( + (typeof t == "string" && (t = [t]), + (this.windowsPathsNoEscape = + !!e.windowsPathsNoEscape || e.allowWindowsEscape === !1), + this.windowsPathsNoEscape && + (t = t.map((a) => a.replace(/\\/g, "/"))), + this.matchBase) + ) { + if (e.noglobstar) + throw new TypeError("base matching requires globstar"); + t = t.map((a) => (a.includes("/") ? a : `./**/${a}`)); + } + if ( + ((this.pattern = t), + (this.platform = e.platform || Nr), + (this.opts = { ...e, platform: this.platform }), + e.scurry) + ) { + if ( + ((this.scurry = e.scurry), + e.nocase !== void 0 && e.nocase !== e.scurry.nocase) + ) + throw new Error( + "nocase option contradicts provided scurry option", + ); + } else { + let a = + e.platform === "win32" + ? ne.PathScurryWin32 + : e.platform === "darwin" + ? ne.PathScurryDarwin + : e.platform + ? ne.PathScurryPosix + : ne.PathScurry; + this.scurry = new a(this.cwd, { nocase: e.nocase, fs: e.fs }); + } + this.nocase = this.scurry.nocase; + let s = this.platform === "darwin" || this.platform === "win32", + i = { + braceExpandMax: 1e4, + ...e, + dot: this.dot, + matchBase: this.matchBase, + nobrace: this.nobrace, + nocase: this.nocase, + nocaseMagicOnly: s, + nocomment: !0, + noext: this.noext, + nonegate: !0, + optimizationLevel: 2, + platform: this.platform, + windowsPathsNoEscape: this.windowsPathsNoEscape, + debug: !!this.opts.debug, + }, + r = this.pattern.map((a) => new Dr.Minimatch(a, i)), + [h, o] = r.reduce( + (a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), + [[], []], + ); + this.patterns = h.map((a, l) => { + let f = o[l]; + if (!f) throw new Error("invalid pattern object"); + return new jr.Pattern(a, f, 0, this.platform); + }); + } + async walk() { + return [ + ...(await new he.GlobWalker(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: + this.maxDepth !== 1 / 0 + ? this.maxDepth + this.scurry.cwd.depth() + : 1 / 0, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).walk()), + ]; + } + walkSync() { + return [ + ...new he.GlobWalker(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: + this.maxDepth !== 1 / 0 + ? this.maxDepth + this.scurry.cwd.depth() + : 1 / 0, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).walkSync(), + ]; + } + stream() { + return new he.GlobStream(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: + this.maxDepth !== 1 / 0 + ? this.maxDepth + this.scurry.cwd.depth() + : 1 / 0, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).stream(); + } + streamSync() { + return new he.GlobStream(this.patterns, this.scurry.cwd, { + ...this.opts, + maxDepth: + this.maxDepth !== 1 / 0 + ? this.maxDepth + this.scurry.cwd.depth() + : 1 / 0, + platform: this.platform, + nocase: this.nocase, + includeChildMatches: this.includeChildMatches, + }).streamSync(); + } + iterateSync() { + return this.streamSync()[Symbol.iterator](); + } + [Symbol.iterator]() { + return this.iterateSync(); + } + iterate() { + return this.stream()[Symbol.asyncIterator](); + } + [Symbol.asyncIterator]() { + return this.iterate(); + } + }; + oe.Glob = Fe; + }); + var Ne = R((ae) => { + "use strict"; + Object.defineProperty(ae, "__esModule", { value: !0 }); + ae.hasMagic = void 0; + var Lr = H(), + Wr = (n, t = {}) => { + Array.isArray(n) || (n = [n]); + for (let e of n) if (new Lr.Minimatch(e, t).hasMagic()) return !0; + return !1; + }; + ae.hasMagic = Wr; + }); + Object.defineProperty(exports, "__esModule", { value: !0 }); + exports.glob = + exports.sync = + exports.iterate = + exports.iterateSync = + exports.stream = + exports.streamSync = + exports.Ignore = + exports.hasMagic = + exports.Glob = + exports.unescape = + exports.escape = + void 0; + exports.globStreamSync = xt; + exports.globStream = Le; + exports.globSync = We; + exports.globIterateSync = Tt; + exports.globIterate = Be; + var Ws = H(), + tt = je(), + Br = Ne(), + Is = H(); + Object.defineProperty(exports, "escape", { + enumerable: !0, + get: function () { + return Is.escape; + }, + }); + Object.defineProperty(exports, "unescape", { + enumerable: !0, + get: function () { + return Is.unescape; + }, + }); + var Ir = je(); + Object.defineProperty(exports, "Glob", { + enumerable: !0, + get: function () { + return Ir.Glob; + }, + }); + var Gr = Ne(); + Object.defineProperty(exports, "hasMagic", { + enumerable: !0, + get: function () { + return Gr.hasMagic; + }, + }); + var zr = ke(); + Object.defineProperty(exports, "Ignore", { + enumerable: !0, + get: function () { + return zr.Ignore; + }, + }); + function xt(n, t = {}) { + return new tt.Glob(n, t).streamSync(); + } + function Le(n, t = {}) { + return new tt.Glob(n, t).stream(); + } + function We(n, t = {}) { + return new tt.Glob(n, t).walkSync(); + } + async function Bs(n, t = {}) { + return new tt.Glob(n, t).walk(); + } + function Tt(n, t = {}) { + return new tt.Glob(n, t).iterateSync(); + } + function Be(n, t = {}) { + return new tt.Glob(n, t).iterate(); + } + exports.streamSync = xt; + exports.stream = Object.assign(Le, { sync: xt }); + exports.iterateSync = Tt; + exports.iterate = Object.assign(Be, { sync: Tt }); + exports.sync = Object.assign(We, { stream: xt, iterate: Tt }); + exports.glob = Object.assign(Bs, { + glob: Bs, + globSync: We, + sync: exports.sync, + globStream: Le, + stream: exports.stream, + globStreamSync: xt, + streamSync: exports.streamSync, + globIterate: Be, + iterate: exports.iterate, + globIterateSync: Tt, + iterateSync: exports.iterateSync, + Glob: tt.Glob, + hasMagic: Br.hasMagic, + escape: Ws.escape, + unescape: Ws.unescape, + }); + exports.glob.glob = exports.glob; + //# sourceMappingURL=index.min.js.map + + /***/ + }, + + /***/ 9433: /***/ ( + __unused_webpack___webpack_module__, + __webpack_exports__, + __nccwpck_require__, + ) => { + "use strict"; + // ESM COMPAT FLAG + __nccwpck_require__.r(__webpack_exports__); + + // EXPORTS + __nccwpck_require__.d(__webpack_exports__, { + ExitCode: () => /* binding */ ExitCode, + addPath: () => /* binding */ addPath, + debug: () => /* binding */ debug, + endGroup: () => /* binding */ endGroup, + error: () => /* binding */ error, + exportVariable: () => /* binding */ exportVariable, + getBooleanInput: () => /* binding */ getBooleanInput, + getIDToken: () => /* binding */ getIDToken, + getInput: () => /* binding */ getInput, + getMultilineInput: () => /* binding */ getMultilineInput, + getState: () => /* binding */ getState, + group: () => /* binding */ group, + info: () => /* binding */ info, + isDebug: () => /* binding */ isDebug, + markdownSummary: () => /* reexport */ markdownSummary, + notice: () => /* binding */ notice, + platform: () => /* reexport */ platform_namespaceObject, + saveState: () => /* binding */ saveState, + setCommandEcho: () => /* binding */ setCommandEcho, + setFailed: () => /* binding */ setFailed, + setOutput: () => /* binding */ setOutput, + setSecret: () => /* binding */ setSecret, + startGroup: () => /* binding */ startGroup, + summary: () => /* reexport */ summary, + toPlatformPath: () => /* reexport */ toPlatformPath, + toPosixPath: () => /* reexport */ toPosixPath, + toWin32Path: () => /* reexport */ toWin32Path, + warning: () => /* binding */ warning, + }); + + // NAMESPACE OBJECT: ./node_modules/@actions/core/lib/platform.js + var platform_namespaceObject = {}; + __nccwpck_require__.r(platform_namespaceObject); + __nccwpck_require__.d(platform_namespaceObject, { + arch: () => arch, + getDetails: () => getDetails, + isLinux: () => isLinux, + isMacOS: () => isMacOS, + isWindows: () => isWindows, + platform: () => platform, + }); // CONCATENATED MODULE: external "os" + + const external_os_namespaceObject = require("os"); // CONCATENATED MODULE: ./node_modules/@actions/core/lib/utils.js + // We use any as a valid input type + /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ + function toCommandValue(input) { + if (input === null || input === undefined) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + /** + * + * @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 {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn, + }; + } // CONCATENATED MODULE: ./node_modules/@actions/core/lib/command.js + //# sourceMappingURL=utils.js.map + /** + * Issues a command to the GitHub Actions runner + * + * @param command - The command name to issue + * @param properties - Additional properties for the command (key-value pairs) + * @param message - The message to include with the command + * @remarks + * This function outputs a specially formatted string to stdout that the Actions + * runner interprets as a command. These commands can control workflow behavior, + * set outputs, create annotations, mask values, and more. + * + * Command Format: + * ::name key=value,key=value::message + * + * @example + * ```typescript + * // Issue a warning annotation + * issueCommand('warning', {}, 'This is a warning message'); + * // Output: ::warning::This is a warning message + * + * // Set an environment variable + * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); + * // Output: ::set-env name=MY_VAR::some value + * + * // Add a secret mask + * issueCommand('add-mask', {}, 'secretValue123'); + * // Output: ::add-mask::secretValue123 + * ``` + * + * @internal + * This is an internal utility function that powers the public API functions + * such as setSecret, warning, error, and exportVariable. + */ + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + external_os_namespaceObject.EOL); + } + function issue(name, message = "") { + issueCommand(name, {}, message); + } + 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 toCommandValue(s) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return toCommandValue(s) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A") + .replace(/:/g, "%3A") + .replace(/,/g, "%2C"); + } // CONCATENATED MODULE: external "crypto" + //# sourceMappingURL=command.js.map + const external_crypto_namespaceObject = require("crypto"); + // EXTERNAL MODULE: external "fs" + var external_fs_ = __nccwpck_require__(9896); // CONCATENATED MODULE: ./node_modules/@actions/core/lib/file-command.js + // For internal use, subject to change. + // We use any as a valid input type + /* eslint-disable @typescript-eslint/no-explicit-any */ + + 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 (!external_fs_.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + external_fs_.appendFileSync( + filePath, + `${toCommandValue(message)}${external_os_namespaceObject.EOL}`, + { + encoding: "utf8", + }, + ); + } + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${external_crypto_namespaceObject.randomUUID()}`; + const convertedValue = toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error( + `Unexpected input: name should not contain the delimiter "${delimiter}"`, + ); + } + if (convertedValue.includes(delimiter)) { + throw new Error( + `Unexpected input: value should not contain the delimiter "${delimiter}"`, + ); + } + return `${key}<<${delimiter}${external_os_namespaceObject.EOL}${convertedValue}${external_os_namespaceObject.EOL}${delimiter}`; + } // CONCATENATED MODULE: external "path" + //# sourceMappingURL=file-command.js.map + const external_path_namespaceObject = require("path"); + // EXTERNAL MODULE: external "http" + var external_http_ = __nccwpck_require__(8611); + var external_http_namespaceObject = /*#__PURE__*/ __nccwpck_require__.t( + external_http_, + 2, + ); + // EXTERNAL MODULE: external "https" + var external_https_ = __nccwpck_require__(5692); + var external_https_namespaceObject = /*#__PURE__*/ __nccwpck_require__.t( + external_https_, + 2, + ); // CONCATENATED MODULE: ./node_modules/@actions/http-client/lib/proxy.js + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if ( + !proxyVar.startsWith("http://") && + !proxyVar.startsWith("https://") + ) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return undefined; + } + } + 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; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(",") + .map((x) => x.trim().toUpperCase()) + .filter((x) => x)) { + if ( + upperNoProxyItem === "*" || + upperReqHosts.some( + (x) => + x === upperNoProxyItem || + x.endsWith(`.${upperNoProxyItem}`) || + (upperNoProxyItem.startsWith(".") && + x.endsWith(`${upperNoProxyItem}`)), + ) + ) { + return true; + } + } + return false; + } + 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); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + } + //# sourceMappingURL=proxy.js.map + // EXTERNAL MODULE: ./node_modules/tunnel/index.js + var tunnel = __nccwpck_require__(770); + // EXTERNAL MODULE: ./node_modules/undici/index.js + var undici = __nccwpck_require__(6752); // CONCATENATED MODULE: ./node_modules/@actions/http-client/lib/index.js + /* eslint-disable @typescript-eslint/no-explicit-any */ + var __awaiter = + (undefined && undefined.__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 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 || (HttpCodes = {})); + var Headers; + (function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; + })(Headers || (Headers = {})); + var MediaTypes; + (function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; + })(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 lib_getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + 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); + } + } + 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)); + }); + }), + ); + }); + } + } + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + 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 = this._getUserAgentWithOrchestrationId(userAgent); + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = + requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + 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_1) { + return __awaiter( + this, + arguments, + void 0, + function* (requestUrl, additionalHeaders = {}) { + 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_1, obj_1) { + return __awaiter( + this, + arguments, + void 0, + function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = + this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.Accept, + MediaTypes.ApplicationJson, + ); + additionalHeaders[Headers.ContentType] = + this._getExistingOrDefaultContentTypeHeader( + additionalHeaders, + MediaTypes.ApplicationJson, + ); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }, + ); + } + putJson(requestUrl_1, obj_1) { + return __awaiter( + this, + arguments, + void 0, + function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = + this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.Accept, + MediaTypes.ApplicationJson, + ); + additionalHeaders[Headers.ContentType] = + this._getExistingOrDefaultContentTypeHeader( + additionalHeaders, + MediaTypes.ApplicationJson, + ); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }, + ); + } + patchJson(requestUrl_1, obj_1) { + return __awaiter( + this, + arguments, + void 0, + function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = + this._getExistingOrDefaultHeader( + additionalHeaders, + Headers.Accept, + MediaTypes.ApplicationJson, + ); + additionalHeaders[Headers.ContentType] = + this._getExistingOrDefaultContentTypeHeader( + additionalHeaders, + 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._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); + } + } + 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(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(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on("error", function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function () { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * 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 = 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 + ? external_https_namespaceObject + : external_http_namespaceObject; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers["user-agent"] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign( + {}, + lowercaseKeys(this.requestOptions.headers), + lowercaseKeys(headers || {}), + ); + } + return lowercaseKeys(headers || {}); + } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[ + header + ]; + if (headerValue) { + clientHeader = + typeof headerValue === "number" + ? headerValue.toString() + : headerValue; + } + } + const additionalValue = additionalHeaders[header]; + if (additionalValue !== undefined) { + return typeof additionalValue === "number" + ? additionalValue.toString() + : additionalValue; + } + if (clientHeader !== undefined) { + return clientHeader; + } + return _default; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[ + Headers.ContentType + ]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + // Return the first non-undefined value, converting numbers or arrays to strings if necessary + if (additionalValue !== undefined) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== undefined) { + return clientHeader; + } + return _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = 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 || + external_http_.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + 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 tunneling agent isn't assigned create a new agent + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl + ? new external_https_.Agent(options) + : new external_http_.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false, + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + // if agent is already assigned use that agent. + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici /* ProxyAgent */.kT( + Object.assign( + { uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, + (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}`, + }, + ), + ); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + proxyAgent.options = Object.assign( + proxyAgent.options.requestTls || {}, + { + rejectUnauthorized: false, + }, + ); + } + return proxyAgent; + } + _getUserAgentWithOrchestrationId(userAgent) { + const baseUserAgent = userAgent || "actions/http-client"; + const orchId = process.env["ACTIONS_ORCHESTRATION_ID"]; + if (orchId) { + // Sanitize the orchestration ID to ensure it contains only valid characters + // Valid characters: 0-9, a-z, _, -, . + const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, "_"); + return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; + } + return baseUserAgent; + } + _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)); + }); + } + _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); + } + }), + ); + }); + } + } + const lowercaseKeys = (obj) => + Object.keys(obj).reduce( + (c, k) => ((c[k.toLowerCase()] = obj[k]), c), + {}, + ); // CONCATENATED MODULE: ./node_modules/@actions/http-client/lib/auth.js + //# sourceMappingURL=index.js.map + var auth_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = + `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return auth_awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + } + 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"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return auth_awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + } + 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"); + } + options.headers["Authorization"] = + `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return auth_awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + } // CONCATENATED MODULE: ./node_modules/@actions/core/lib/oidc-utils.js + //# sourceMappingURL=auth.js.map + var oidc_utils_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry, + }; + return new HttpClient( + "actions/oidc-client", + [new BearerCredentialHandler(OidcClient.getRequestToken())], + requestOptions, + ); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error( + "Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable", + ); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error( + "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable", + ); + } + return runtimeUrl; + } + static getCall(id_token_url) { + return oidc_utils_awaiter(this, void 0, void 0, function* () { + var _a; + 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; + }); + } + static getIDToken(audience) { + return oidc_utils_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}`; + } + debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + setSecret(id_token); + return id_token; + } catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } + } // CONCATENATED MODULE: ./node_modules/@actions/core/lib/summary.js + //# sourceMappingURL=oidc-utils.js.map + var summary_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + const { access, appendFile, writeFile } = external_fs_.promises; + const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + const 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 summary_awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error( + `Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`, + ); + } + try { + yield access( + pathFromEnv, + external_fs_.constants.R_OK | external_fs_.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; + }); + } + /** + * 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(options) { + return summary_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 summary_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(external_os_namespaceObject.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` + */ + const markdownSummary = _summary; + const summary = _summary; // CONCATENATED MODULE: ./node_modules/@actions/core/lib/path-utils.js + //# sourceMappingURL=summary.js.map + /** + * 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, "/"); + } + /** + * 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, "\\"); + } + /** + * 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, external_path_namespaceObject.sep); + } + //# sourceMappingURL=path-utils.js.map + // EXTERNAL MODULE: external "string_decoder" + var external_string_decoder_ = __nccwpck_require__(3193); + // EXTERNAL MODULE: external "events" + var external_events_ = __nccwpck_require__(4434); // CONCATENATED MODULE: external "child_process" + const external_child_process_namespaceObject = require("child_process"); + // EXTERNAL MODULE: external "assert" + var external_assert_ = __nccwpck_require__(2613); // CONCATENATED MODULE: ./node_modules/@actions/io/lib/io-util.js + var io_util_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + const { + chmod, + copyFile, + lstat, + mkdir, + open: io_util_open, + readdir, + rename, + rm, + rmdir, + stat, + symlink, + unlink, + } = external_fs_.promises; + // export const {open} = 'fs' + const IS_WINDOWS = process.platform === "win32"; + /** + * Custom implementation of readlink to ensure Windows junctions + * maintain trailing backslash for backward compatibility with Node.js < 24 + * + * In Node.js 20, Windows junctions (directory symlinks) always returned paths + * with trailing backslashes. Node.js 24 removed this behavior, which breaks + * code that relied on this format for path operations. + * + * This implementation restores the Node 20 behavior by adding a trailing + * backslash to all junction results on Windows. + */ + function readlink(fsPath) { + return io_util_awaiter(this, void 0, void 0, function* () { + const result = yield fs.promises.readlink(fsPath); + // On Windows, restore Node 20 behavior: add trailing backslash to all results + // since junctions on Windows are always directory links + if (IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + // See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 + const UV_FS_O_EXLOCK = 0x10000000; + const READONLY = external_fs_.constants.O_RDONLY; + function exists(fsPath) { + return io_util_awaiter(this, void 0, void 0, function* () { + try { + yield stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return io_util_awaiter( + this, + arguments, + void 0, + function* (fsPath, useStat = false) { + const stats = useStat ? yield stat(fsPath) : yield lstat(fsPath); + return stats.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'); + } + if (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("/"); + } + /** + * 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 io_util_awaiter(this, void 0, void 0, function* () { + let stats = undefined; + try { + // test file exists + stats = yield 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 (IS_WINDOWS) { + // on Windows, test for valid extension + const upperExt = external_path_namespaceObject + .extname(filePath) + .toUpperCase(); + if ( + extensions.some( + (validExt) => validExt.toUpperCase() === upperExt, + ) + ) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + // try each extension + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = undefined; + try { + stats = yield 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 (IS_WINDOWS) { + // preserve the case of the actual file (since an extension was appended) + try { + const directory = + external_path_namespaceObject.dirname(filePath); + const upperName = external_path_namespaceObject + .basename(filePath) + .toUpperCase(); + for (const actualName of yield readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = external_path_namespaceObject.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; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (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 && + process.getgid !== undefined && + stats.gid === process.getgid()) || + ((stats.mode & 64) > 0 && + process.getuid !== undefined && + 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`; + } // CONCATENATED MODULE: ./node_modules/@actions/io/lib/io.js + //# sourceMappingURL=io-util.js.map + var io_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + /** + * 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_1, dest_1) { + return io_awaiter( + this, + arguments, + void 0, + function* (source, dest, options = {}) { + 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; + } + // 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 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 (path.relative(source, newDest) === "") { + // a file cannot be copied to itself + throw new Error( + `'${newDest}' and '${source}' are the same file`, + ); + } + yield io_copyFile(source, newDest, force); + } + }, + ); + } + /** + * Moves a path. + * + * @param source source path + * @param dest destination path + * @param options optional. See MoveOptions. + */ + function mv(source_1, dest_1) { + return io_awaiter( + this, + arguments, + void 0, + function* (source, dest, options = {}) { + 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"); + } + } + } + yield mkdirP(path.dirname(dest)); + yield ioUtil.rename(source, dest); + }, + ); + } + /** + * Remove a path recursively with force + * + * @param inputPath path to remove + */ + function rmRF(inputPath) { + return io_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', + ); + } + } + try { + // note if path does not exist, error is silent + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300, + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + /** + * 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 io_awaiter(this, void 0, void 0, function* () { + ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + /** + * 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 io_awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // recursive when check=true + if (check) { + const result = yield which(tool, false); + if (!result) { + if (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 ""; + }); + } + /** + * 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 io_awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // build the list of extensions to try + const extensions = []; + if (IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split( + external_path_namespaceObject.delimiter, + )) { + if (extension) { + extensions.push(extension); + } + } + } + // if it's rooted, return it if exists. otherwise return empty. + if (isRooted(tool)) { + const filePath = yield tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + // if any path separators, return empty + if (tool.includes(external_path_namespaceObject.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( + external_path_namespaceObject.delimiter, + )) { + if (p) { + directories.push(p); + } + } + } + // find all matches + const matches = []; + for (const directory of directories) { + const filePath = yield tryGetExecutablePath( + external_path_namespaceObject.join(directory, tool), + extensions, + ); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + 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 io_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 io_copyFile(srcFile, destFile, force); + } + } + // Change the mode for the newly created directory + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + // Buffered file copy + function io_copyFile(srcFile, destFile, force) { + return io_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 (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } // CONCATENATED MODULE: external "timers" + //# sourceMappingURL=io.js.map + const external_timers_namespaceObject = require("timers"); // CONCATENATED MODULE: ./node_modules/@actions/exec/lib/toolrunner.js + var toolrunner_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + /* eslint-disable @typescript-eslint/unbound-method */ + const toolrunner_IS_WINDOWS = process.platform === "win32"; + /* + * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. + */ + class ToolRunner extends external_events_.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _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 (toolrunner_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)}`; + } + } + } 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}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(external_os_namespaceObject.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + // the rest of the string ... + s = s.substring(n + external_os_namespaceObject.EOL.length); + n = s.indexOf(external_os_namespaceObject.EOL); + } + return s; + } catch (err) { + // streaming lines to console is best effort. Don't fail a build. + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (toolrunner_IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (toolrunner_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]; + } + } + 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 '""'; + } + // 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; + } + } + // 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 + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; // double the quote + } else { + quoteHit = false; + } + } + 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 += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + 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}"`; + } + 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 toolrunner_awaiter(this, void 0, void 0, function* () { + // root the tool path if it is unrooted and contains relative pathing + if ( + !isRooted(this.toolPath) && + (this.toolPath.includes("/") || + (toolrunner_IS_WINDOWS && this.toolPath.includes("\\"))) + ) { + // prefer options.cwd if it is specified, however options.cwd may also need to be rooted + this.toolPath = external_path_namespaceObject.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 which(this.toolPath, true); + return new Promise((resolve, reject) => + toolrunner_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) + + external_os_namespaceObject.EOL, + ); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield exists(this.options.cwd))) { + return reject( + new Error(`The cwd: ${this.options.cwd} does not exist!`), + ); + } + const fileName = this._getSpawnFileName(); + const cp = external_child_process_namespaceObject.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); + } + }), + ); + }); + } + } + /** + * 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 += "\\"; + } + 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; + } + 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 args; + } + class ExecState extends external_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"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = (0, external_timers_namespaceObject.setTimeout)( + ExecState.HandleTimeout, + this.delay, + this, + ); + } + } + _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}`, + ); + } 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`, + ); + } + } + // clear the timeout + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + 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); + } + state._setResult(); + } + } // CONCATENATED MODULE: ./node_modules/@actions/exec/lib/exec.js + //# sourceMappingURL=toolrunner.js.map + var exec_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + /** + * 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 exec_awaiter(this, void 0, void 0, function* () { + const commandArgs = argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + // Path to tool to execute should be first arg + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new ToolRunner(toolPath, args, options); + return runner.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) { + return exec_awaiter(this, void 0, void 0, function* () { + var _a, _b; + let stdout = ""; + let stderr = ""; + //Using string decoder covers the case where a mult-byte character is split + const stdoutDecoder = new external_string_decoder_.StringDecoder( + "utf8", + ); + const stderrDecoder = new external_string_decoder_.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(); + return { + exitCode, + stdout, + stderr, + }; + }); + } // CONCATENATED MODULE: ./node_modules/@actions/core/lib/platform.js + //# sourceMappingURL=exec.js.map + var platform_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + const getWindowsInfo = () => + platform_awaiter(void 0, void 0, void 0, function* () { + const { stdout: version } = yield getExecOutput( + 'powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', + undefined, + { + silent: true, + }, + ); + const { stdout: name } = yield getExecOutput( + 'powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', + undefined, + { + silent: true, + }, + ); + return { + name: name.trim(), + version: version.trim(), + }; + }); + const getMacOsInfo = () => + platform_awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield 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 = () => + platform_awaiter(void 0, void 0, void 0, function* () { + const { stdout } = yield getExecOutput( + "lsb_release", + ["-i", "-r", "-s"], + { + silent: true, + }, + ); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version, + }; + }); + const platform = external_os_namespaceObject.platform(); + const arch = external_os_namespaceObject.arch(); + const isWindows = platform === "win32"; + const isMacOS = platform === "darwin"; + const isLinux = platform === "linux"; + function getDetails() { + return platform_awaiter(this, void 0, void 0, function* () { + return Object.assign( + Object.assign( + {}, + yield isWindows + ? getWindowsInfo() + : isMacOS + ? getMacOsInfo() + : getLinuxInfo(), + ), + { platform, arch, isWindows, isMacOS, isLinux }, + ); + }); + } // CONCATENATED MODULE: ./node_modules/@actions/core/lib/core.js + //# sourceMappingURL=platform.js.map + var core_awaiter = + (undefined && undefined.__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(), + ); + }); + }; + + /** + * 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 || (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 = toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return issueFileCommand("ENV", prepareKeyValueMessage(name, val)); + } + issueCommand("set-env", { name }, convertedVal); + } + /** + * Registers a secret which will get masked from logs + * + * @param secret - Value of the secret to be masked + * @remarks + * This function instructs the Actions runner to mask the specified value in any + * logs produced during the workflow run. Once registered, the secret value will + * be replaced with asterisks (***) whenever it appears in console output, logs, + * or error messages. + * + * This is useful for protecting sensitive information such as: + * - API keys + * - Access tokens + * - Authentication credentials + * - URL parameters containing signatures (SAS tokens) + * + * Note that masking only affects future logs; any previous appearances of the + * secret in logs before calling this function will remain unmasked. + * + * @example + * ```typescript + * // Register an API token as a secret + * const apiToken = "abc123xyz456"; + * setSecret(apiToken); + * + * // Now any logs containing this value will show *** instead + * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" + * ``` + */ + function setSecret(secret) { + issueCommand("add-mask", {}, secret); + } + /** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + issueFileCommand("PATH", inputPath); + } else { + issueCommand("add-path", {}, inputPath); + } + process.env["PATH"] = + `${inputPath}${external_path_namespaceObject.delimiter}${process.env["PATH"]}`; + } + /** + * 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}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + /** + * 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; + } + return inputs.map((input) => input.trim()); + } + /** + * 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\``, + ); + } + /** + * 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 issueFileCommand( + "OUTPUT", + prepareKeyValueMessage(name, value), + ); + } + process.stdout.write(external_os_namespaceObject.EOL); + issueCommand("set-output", { name }, toCommandValue(value)); + } + /** + * 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) { + issue("echo", enabled ? "on" : "off"); + } + //----------------------------------------------------------------------- + // 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); + } + //----------------------------------------------------------------------- + // Logging Commands + //----------------------------------------------------------------------- + /** + * Gets whether Actions Step Debug is on or not + */ + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + /** + * Writes debug message to user log + * @param message debug message + */ + function debug(message) { + issueCommand("debug", {}, message); + } + /** + * 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 = {}) { + issueCommand( + "error", + toCommandProperties(properties), + message instanceof Error ? message.toString() : message, + ); + } + /** + * 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 = {}) { + issueCommand( + "warning", + toCommandProperties(properties), + message instanceof Error ? message.toString() : message, + ); + } + /** + * 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 = {}) { + issueCommand( + "notice", + toCommandProperties(properties), + message instanceof Error ? message.toString() : message, + ); + } + /** + * Writes info to log with console.log. + * @param message info message + */ + function info(message) { + process.stdout.write(message + external_os_namespaceObject.EOL); + } + /** + * 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) { + issue("group", name); + } + /** + * End an output group. + */ + function endGroup() { + issue("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 core_awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); + } + //----------------------------------------------------------------------- + // 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 issueFileCommand("STATE", prepareKeyValueMessage(name, value)); + } + issueCommand("save-state", { name }, toCommandValue(value)); + } + /** + * 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}`] || ""; + } + function getIDToken(aud) { + return core_awaiter(this, void 0, void 0, function* () { + return yield OidcClient.getIDToken(aud); + }); + } + /** + * Summary exports + */ + + /** + * @deprecated use core.summary + */ + + /** + * Path exports + */ + + /** + * Platform utilities exports + */ + + //# sourceMappingURL=core.js.map + + /***/ + }, + + /***/ 2955: /***/ ( + __unused_webpack___webpack_module__, + __webpack_exports__, + __nccwpck_require__, + ) => { + "use strict"; + // ESM COMPAT FLAG + __nccwpck_require__.r(__webpack_exports__); + + // EXPORTS + __nccwpck_require__.d(__webpack_exports__, { + AbortError: () => /* reexport */ AbortError, + CacheError: () => /* reexport */ CacheError, + HTTPError: () => /* reexport */ HTTPError, + MaxRedirectsError: () => /* reexport */ MaxRedirectsError, + Options: () => /* reexport */ Options, + ParseError: () => /* reexport */ ParseError, + ReadError: () => /* reexport */ ReadError, + RequestError: () => /* reexport */ RequestError, + RetryError: () => /* reexport */ RetryError, + TimeoutError: () => /* reexport */ TimeoutError, + UploadError: () => /* reexport */ UploadError, + applyUrlOverride: () => /* reexport */ applyUrlOverride, + cacheDecodedBody: () => /* reexport */ cacheDecodedBody, + calculateRetryDelay: () => /* reexport */ calculate_retry_delay, + create: () => /* reexport */ source_create, + crossOriginStripHeaders: () => /* reexport */ crossOriginStripHeaders, + decodeUint8Array: () => /* reexport */ decodeUint8Array, + default: () => /* binding */ dist_source, + generateRequestId: () => /* reexport */ generateRequestId, + hasExplicitCredentialInUrlChange: () => + /* reexport */ hasExplicitCredentialInUrlChange, + isBodyUnchanged: () => /* reexport */ isBodyUnchanged, + isCrossOriginCredentialChanged: () => + /* reexport */ isCrossOriginCredentialChanged, + isResponseOk: () => /* reexport */ isResponseOk, + isSameOrigin: () => /* reexport */ isSameOrigin, + isUtf8Encoding: () => /* reexport */ isUtf8Encoding, + normalizeError: () => /* reexport */ normalizeError, + parseBody: () => /* reexport */ parseBody, + parseLinkHeader: () => /* reexport */ parseLinkHeader, + publishError: () => /* reexport */ publishError, + publishRedirect: () => /* reexport */ publishRedirect, + publishRequestCreate: () => /* reexport */ publishRequestCreate, + publishRequestStart: () => /* reexport */ publishRequestStart, + publishResponseEnd: () => /* reexport */ publishResponseEnd, + publishResponseStart: () => /* reexport */ publishResponseStart, + publishRetry: () => /* reexport */ publishRetry, + snapshotCrossOriginState: () => /* reexport */ snapshotCrossOriginState, + }); // CONCATENATED MODULE: external "node:timers/promises" + + const promises_namespaceObject = require("node:timers/promises"); // CONCATENATED MODULE: ./node_modules/@sindresorhus/is/distribution/utilities.js + function keysOf(value) { + return Object.keys(value); + } // CONCATENATED MODULE: ./node_modules/@sindresorhus/is/distribution/index.js + + const typedArrayTypeNames = [ + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "BigInt64Array", + "BigUint64Array", + ]; + function isTypedArrayName(name) { + return typedArrayTypeNames.includes(name); + } + const objectTypeNames = [ + "Function", + "Generator", + "AsyncGenerator", + "GeneratorFunction", + "AsyncGeneratorFunction", + "AsyncFunction", + "Observable", + "Array", + "Buffer", + "Blob", + "Object", + "RegExp", + "Date", + "Error", + "Map", + "Set", + "WeakMap", + "WeakSet", + "WeakRef", + "ArrayBuffer", + "SharedArrayBuffer", + "DataView", + "Promise", + "URL", + "FormData", + "URLSearchParams", + "HTMLElement", + "NaN", + ...typedArrayTypeNames, + ]; + function isObjectTypeName(name) { + return objectTypeNames.includes(name); + } + const primitiveTypeNames = [ + "null", + "undefined", + "string", + "number", + "bigint", + "boolean", + "symbol", + ]; + function isPrimitiveTypeName(name) { + return primitiveTypeNames.includes(name); + } + const assertionTypeDescriptions = [ + "bound Function", + "positive number", + "negative number", + "Class", + "string with a number", + "null or undefined", + "Iterable", + "AsyncIterable", + "native Promise", + "EnumCase", + "string with a URL", + "truthy", + "falsy", + "primitive", + "integer", + "plain object", + "TypedArray", + "array-like", + "tuple-like", + "Node.js Stream", + "infinite number", + "empty array", + "non-empty array", + "empty string", + "empty string or whitespace", + "non-empty string", + "non-empty string and not whitespace", + "empty object", + "non-empty object", + "empty set", + "non-empty set", + "empty map", + "non-empty map", + "PropertyKey", + "even integer", + "finite number", + "negative integer", + "non-negative integer", + "non-negative number", + "odd integer", + "positive integer", + "safe integer", + "T", + "in range", + "predicate returns truthy for any value", + "predicate returns truthy for all values", + "valid Date", + "valid length", + "whitespace string", + ...objectTypeNames, + ...primitiveTypeNames, + ]; + const getObjectType = (value) => { + const objectTypeName = Object.prototype.toString + .call(value) + .slice(8, -1); + if (/HTML\w+Element/v.test(objectTypeName) && isHtmlElement(value)) { + return "HTMLElement"; + } + if (isObjectTypeName(objectTypeName)) { + return objectTypeName; + } + return undefined; + }; + function detect(value) { + if (value === null) { + return "null"; + } + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check + switch (typeof value) { + case "undefined": { + return "undefined"; + } + case "string": { + return "string"; + } + case "number": { + return Number.isNaN(value) ? "NaN" : "number"; + } + case "boolean": { + return "boolean"; + } + case "function": { + return "Function"; + } + case "bigint": { + return "bigint"; + } + case "symbol": { + return "symbol"; + } + default: + } + if (isObservable(value)) { + return "Observable"; + } + if (isArray(value)) { + return "Array"; + } + if (isBuffer(value)) { + return "Buffer"; + } + const tagType = getObjectType(value); + if (tagType !== undefined && tagType !== "Object") { + return tagType; + } + if (hasPromiseApi(value)) { + return "Promise"; + } + if (isBoxedPrimitiveObject(value)) { + throw new TypeError( + "Please don't use object wrappers for primitive types", + ); + } + return "Object"; + } + function hasPromiseApi(value) { + return isFunction(value?.then) && isFunction(value?.catch); + } + function hasBoxedPrimitiveBrand(value, valueOf) { + try { + // `Object.prototype.toString` can be spoofed via `Symbol.toStringTag`, but the + // boxed primitive `valueOf` methods still enforce the real internal brand. + Reflect.apply(valueOf, value, []); + return true; + } catch { + return false; + } + } + function isBoxedPrimitiveObject(value) { + return ( + hasBoxedPrimitiveBrand(value, String.prototype.valueOf) || + hasBoxedPrimitiveBrand(value, Boolean.prototype.valueOf) || + hasBoxedPrimitiveBrand(value, Number.prototype.valueOf) + ); + } + const is = Object.assign(detect, { + all: isAll, + any: isAny, + array: isArray, + arrayBuffer: isArrayBuffer, + arrayLike: isArrayLike, + arrayOf: isArrayOf, + asyncFunction: isAsyncFunction, + asyncGenerator: isAsyncGenerator, + asyncGeneratorFunction: isAsyncGeneratorFunction, + asyncIterable: isAsyncIterable, + bigint: isBigint, + bigInt64Array: isBigInt64Array, + bigUint64Array: isBigUint64Array, + blob: isBlob, + boolean: isBoolean, + boundFunction: isBoundFunction, + buffer: isBuffer, + class: isClass, + dataView: isDataView, + date: isDate, + detect, + directInstanceOf: isDirectInstanceOf, + emptyArray: isEmptyArray, + emptyMap: isEmptyMap, + emptyObject: isEmptyObject, + emptySet: isEmptySet, + emptyString: isEmptyString, + emptyStringOrWhitespace: isEmptyStringOrWhitespace, + enumCase: isEnumCase, + error: isError, + evenInteger: isEvenInteger, + falsy: isFalsy, + finiteNumber: isFiniteNumber, + float32Array: isFloat32Array, + float64Array: isFloat64Array, + formData: isFormData, + function: isFunction, + generator: isGenerator, + generatorFunction: isGeneratorFunction, + htmlElement: isHtmlElement, + infinite: isInfinite, + inRange: isInRange, + int16Array: isInt16Array, + int32Array: isInt32Array, + int8Array: isInt8Array, + integer: isInteger, + iterable: isIterable, + map: isMap, + nan: isNan, + nativePromise: isNativePromise, + negativeInteger: isNegativeInteger, + negativeNumber: isNegativeNumber, + nodeStream: isNodeStream, + nonEmptyArray: isNonEmptyArray, + nonEmptyMap: isNonEmptyMap, + nonEmptyObject: isNonEmptyObject, + nonEmptySet: isNonEmptySet, + nonEmptyString: isNonEmptyString, + nonEmptyStringAndNotWhitespace: isNonEmptyStringAndNotWhitespace, + nonNegativeInteger: isNonNegativeInteger, + nonNegativeNumber: isNonNegativeNumber, + null: isNull, + nullOrUndefined: isNullOrUndefined, + number: isNumber, + numericString: isNumericString, + object: isObject, + observable: isObservable, + oddInteger: isOddInteger, + oneOf: isOneOf, + plainObject: isPlainObject, + positiveInteger: isPositiveInteger, + positiveNumber: isPositiveNumber, + primitive: isPrimitive, + promise: isPromise, + propertyKey: isPropertyKey, + regExp: isRegExp, + safeInteger: isSafeInteger, + set: isSet, + sharedArrayBuffer: isSharedArrayBuffer, + string: isString, + symbol: isSymbol, + truthy: isTruthy, + tupleLike: isTupleLike, + typedArray: isTypedArray, + uint16Array: isUint16Array, + uint32Array: isUint32Array, + uint8Array: isUint8Array, + uint8ClampedArray: isUint8ClampedArray, + undefined: isUndefined, + urlInstance: isUrlInstance, + urlSearchParams: isUrlSearchParams, + urlString: isUrlString, + optional: isOptional, + validDate: isValidDate, + validLength: isValidLength, + weakMap: isWeakMap, + weakRef: isWeakRef, + weakSet: isWeakSet, + whitespaceString: isWhitespaceString, + }); + function isAbsoluteModule2(remainder) { + return (value) => isInteger(value) && Math.abs(value % 2) === remainder; + } + function validatePredicateArray(predicateArray, allowEmpty) { + if (predicateArray.length === 0) { + if (allowEmpty) { + // Next major release: throw for empty predicate arrays to avoid vacuous results. + // throw new TypeError('Invalid predicate array'); + } else { + throw new TypeError("Invalid predicate array"); + } + return; + } + for (const predicate of predicateArray) { + validatePredicate(predicate); + } + } + function validatePredicate(predicate) { + if (!isFunction(predicate)) { + throw new TypeError( + `Invalid predicate: ${JSON.stringify(predicate)}`, + ); + } + } + function isAll(predicate, ...values) { + if (Array.isArray(predicate)) { + const predicateArray = predicate; + validatePredicateArray(predicateArray, values.length === 0); + const combinedPredicate = (value) => + predicateArray.every((singlePredicate) => singlePredicate(value)); + if (values.length === 0) { + return combinedPredicate; + } + return predicateOnArray( + Array.prototype.every, + combinedPredicate, + values, + ); + } + return predicateOnArray(Array.prototype.every, predicate, values); + } + function isAny(predicate, ...values) { + if (Array.isArray(predicate)) { + const predicateArray = predicate; + validatePredicateArray(predicateArray, values.length === 0); + const combinedPredicate = (value) => + predicateArray.some((singlePredicate) => singlePredicate(value)); + if (values.length === 0) { + return combinedPredicate; + } + return predicateOnArray( + Array.prototype.some, + combinedPredicate, + values, + ); + } + return predicateOnArray(Array.prototype.some, predicate, values); + } + function isOptional(value, predicate) { + return isUndefined(value) || predicate(value); + } + function isArray(value, assertion) { + if (!Array.isArray(value)) { + return false; + } + if (!isFunction(assertion)) { + return true; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + return value.every((element) => assertion(element)); + } + function isArrayBuffer(value) { + return getObjectType(value) === "ArrayBuffer"; + } + function isArrayLike(value) { + return ( + !isNullOrUndefined(value) && + !isFunction(value) && + isValidLength(value.length) + ); + } + function isArrayOf(predicate) { + return (value) => + isArray(value) && value.every((element) => predicate(element)); + } + function isAsyncFunction(value) { + return getObjectType(value) === "AsyncFunction"; + } + function isAsyncGenerator(value) { + return ( + isAsyncIterable(value) && + isFunction(value.next) && + isFunction(value.throw) + ); + } + function isAsyncGeneratorFunction(value) { + return getObjectType(value) === "AsyncGeneratorFunction"; + } + function isAsyncIterable(value) { + return isFunction(value?.[Symbol.asyncIterator]); + } + function isBigint(value) { + return typeof value === "bigint"; + } + function isBigInt64Array(value) { + return getObjectType(value) === "BigInt64Array"; + } + function isBigUint64Array(value) { + return getObjectType(value) === "BigUint64Array"; + } + function isBlob(value) { + return getObjectType(value) === "Blob"; + } + function isBoolean(value) { + return value === true || value === false; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + function isBoundFunction(value) { + return isFunction(value) && !Object.hasOwn(value, "prototype"); + } + /** +Note: [Prefer using `Uint8Array` instead of `Buffer`.](https://sindresorhus.com/blog/goodbye-nodejs-buffer) +*/ + function isBuffer(value) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access + return value?.constructor?.isBuffer?.(value) ?? false; + } + function isClass(value) { + return isFunction(value) && /^class(?:\s+|\{)/v.test(value.toString()); + } + function isDataView(value) { + return getObjectType(value) === "DataView"; + } + function isDate(value) { + return getObjectType(value) === "Date"; + } + function isDirectInstanceOf(instance, class_) { + if (instance === undefined || instance === null) { + return false; + } + return Object.getPrototypeOf(instance) === class_.prototype; + } + function isEmptyArray(value) { + return isArray(value) && value.length === 0; + } + function isEmptyMap(value) { + return isMap(value) && value.size === 0; + } + function isEmptyObject(value) { + return ( + isObject(value) && + !isFunction(value) && + !isArray(value) && + !isMap(value) && + !isSet(value) && + Object.keys(value).length === 0 + ); + } + function isEmptySet(value) { + return isSet(value) && value.size === 0; + } + function isEmptyString(value) { + return isString(value) && value.length === 0; + } + function isEmptyStringOrWhitespace(value) { + return isEmptyString(value) || isWhitespaceString(value); + } + function isEnumCase(value, targetEnum) { + // Numeric enums have reverse mappings (e.g. `Direction[0] = "Up"`), so their runtime object contains both `{ Up: 0 }` and `{ "0": "Up" }`. Filtering out entries that round-trip like a canonical number and point back to an own property leaves only actual enum member values. + const enumObject = targetEnum; + return Object.entries(enumObject).some(([key, enumValue]) => { + if (!isString(enumValue)) { + return enumValue === value; + } + const numericKey = Number(key); + if (Number.isNaN(numericKey) || String(numericKey) !== key) { + return enumValue === value; + } + return ( + enumValue === value && + !( + Object.hasOwn(enumObject, enumValue) && + enumObject[enumValue] === numericKey + ) + ); + }); + } + function isError(value) { + // TODO: Use `Error.isError` when targeting Node.js 24. + return getObjectType(value) === "Error"; + } + function isEvenInteger(value) { + return isAbsoluteModule2(0)(value); + } + // Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);` + function isFalsy(value) { + return !value; + } + function isFiniteNumber(value) { + return Number.isFinite(value); + } + // TODO: Support detecting Float16Array when targeting Node.js 24. + function isFloat32Array(value) { + return getObjectType(value) === "Float32Array"; + } + function isFloat64Array(value) { + return getObjectType(value) === "Float64Array"; + } + function isFormData(value) { + return getObjectType(value) === "FormData"; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + function isFunction(value) { + return typeof value === "function"; + } + function isGenerator(value) { + return ( + isIterable(value) && + isFunction(value?.next) && + isFunction(value?.throw) + ); + } + function isGeneratorFunction(value) { + return getObjectType(value) === "GeneratorFunction"; + } + const NODE_TYPE_ELEMENT = 1; // eslint-disable-line @typescript-eslint/naming-convention + const DOM_PROPERTIES_TO_CHECK = [ + "innerHTML", + "ownerDocument", + "style", + "attributes", + "nodeValue", + ]; + function isHtmlElement(value) { + return ( + isObject(value) && + value.nodeType === NODE_TYPE_ELEMENT && + isString(value.nodeName) && + !isPlainObject(value) && + DOM_PROPERTIES_TO_CHECK.every((property) => property in value) + ); + } + function isInfinite(value) { + return ( + value === Number.POSITIVE_INFINITY || + value === Number.NEGATIVE_INFINITY + ); + } + function isInRange(value, range) { + if (isNumber(range)) { + return value >= Math.min(0, range) && value <= Math.max(range, 0); + } + if (isArray(range) && range.length === 2) { + if (Number.isNaN(range[0]) || Number.isNaN(range[1])) { + throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); + } + return value >= Math.min(...range) && value <= Math.max(...range); + } + throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); + } + function isInt16Array(value) { + return getObjectType(value) === "Int16Array"; + } + function isInt32Array(value) { + return getObjectType(value) === "Int32Array"; + } + function isInt8Array(value) { + return getObjectType(value) === "Int8Array"; + } + function isInteger(value) { + return Number.isInteger(value); + } + function isIterable(value) { + return isFunction(value?.[Symbol.iterator]); + } + function isMap(value) { + return getObjectType(value) === "Map"; + } + function isNan(value) { + return Number.isNaN(value); + } + function isNativePromise(value) { + return getObjectType(value) === "Promise"; + } + function isNegativeInteger(value) { + return isInteger(value) && value < 0; + } + function isNegativeNumber(value) { + return isNumber(value) && value < 0; + } + function isNodeStream(value) { + return ( + isObject(value) && isFunction(value.pipe) && !isObservable(value) + ); + } + function isNonEmptyArray(value) { + return isArray(value) && value.length > 0; + } + function isNonEmptyMap(value) { + return isMap(value) && value.size > 0; + } + // TODO: Use `not` operator here to remove `Map` and `Set` from type guard: + // - https://github.com/Microsoft/TypeScript/pull/29317 + function isNonEmptyObject(value) { + return ( + isObject(value) && + !isFunction(value) && + !isArray(value) && + !isMap(value) && + !isSet(value) && + Object.keys(value).length > 0 + ); + } + function isNonEmptySet(value) { + return isSet(value) && value.size > 0; + } + // TODO: Use `not ''` when the `not` operator is available. + function isNonEmptyString(value) { + return isString(value) && value.length > 0; + } + // TODO: Use `not ''` when the `not` operator is available. + function isNonEmptyStringAndNotWhitespace(value) { + return isString(value) && !isEmptyStringOrWhitespace(value); + } + function isNonNegativeInteger(value) { + return isInteger(value) && value >= 0; + } + function isNonNegativeNumber(value) { + return isNumber(value) && value >= 0; + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function isNull(value) { + return value === null; + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function isNullOrUndefined(value) { + return isNull(value) || isUndefined(value); + } + function isNumber(value) { + return typeof value === "number" && !Number.isNaN(value); + } + function isNumericString(value) { + return ( + isString(value) && + !isEmptyStringOrWhitespace(value) && + value === value.trim() && + !Number.isNaN(Number(value)) + ); + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function isObject(value) { + return ( + !isNull(value) && (typeof value === "object" || isFunction(value)) + ); + } + function isObservable(value) { + if (!value) { + return false; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access + if ( + Symbol.observable !== undefined && + value === value[Symbol.observable]?.() + ) { + return true; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access + if (value === value["@@observable"]?.()) { + return true; + } + return false; + } + function isOddInteger(value) { + return isAbsoluteModule2(1)(value); + } + function isOneOf(values) { + return (value) => values.includes(value); + } + function isPlainObject(value) { + // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js + if (typeof value !== "object" || value === null) { + return false; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const prototype = Object.getPrototypeOf(value); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(Symbol.toStringTag in value) && + !(Symbol.iterator in value) + ); + } + function isPositiveInteger(value) { + return isInteger(value) && value > 0; + } + function isPositiveNumber(value) { + return isNumber(value) && value > 0; + } + function isPrimitive(value) { + return isNull(value) || isPrimitiveTypeName(typeof value); + } + function isPromise(value) { + return isNativePromise(value) || hasPromiseApi(value); + } + // `PropertyKey` is any value that can be used as an object key (string, number, or symbol). Note: NaN is technically `typeof 'number'` and thus fits TypeScript's `PropertyKey`, but we intentionally exclude it here because using NaN as a property key is almost always a mistake. + function isPropertyKey(value) { + return isAny([isString, isNumber, isSymbol], value); + } + function isRegExp(value) { + return getObjectType(value) === "RegExp"; + } + function isSafeInteger(value) { + return Number.isSafeInteger(value); + } + function isSet(value) { + return getObjectType(value) === "Set"; + } + function isSharedArrayBuffer(value) { + return getObjectType(value) === "SharedArrayBuffer"; + } + function isString(value) { + return typeof value === "string"; + } + function isSymbol(value) { + return typeof value === "symbol"; + } + // Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);` + // eslint-disable-next-line unicorn/prefer-native-coercion-functions + function isTruthy(value) { + return Boolean(value); + } + function isTupleLike(value, guards) { + if ( + isArray(guards) && + isArray(value) && + guards.length === value.length + ) { + return guards.every((guard, index) => guard(value[index])); + } + return false; + } + function isTypedArray(value) { + return isTypedArrayName(getObjectType(value)); + } + function isUint16Array(value) { + return getObjectType(value) === "Uint16Array"; + } + function isUint32Array(value) { + return getObjectType(value) === "Uint32Array"; + } + function isUint8Array(value) { + return getObjectType(value) === "Uint8Array"; + } + function isUint8ClampedArray(value) { + return getObjectType(value) === "Uint8ClampedArray"; + } + function isUndefined(value) { + return value === undefined; + } + function isUrlInstance(value) { + return getObjectType(value) === "URL"; + } + // eslint-disable-next-line unicorn/prevent-abbreviations + function isUrlSearchParams(value) { + return getObjectType(value) === "URLSearchParams"; + } + function isUrlString(value) { + if (!isString(value)) { + return false; + } + try { + new URL(value); // eslint-disable-line no-new + return true; + } catch { + return false; + } + } + function isValidDate(value) { + return isDate(value) && !isNan(Number(value)); + } + function isValidLength(value) { + return isSafeInteger(value) && value >= 0; + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function isWeakMap(value) { + return getObjectType(value) === "WeakMap"; + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function isWeakRef(value) { + return getObjectType(value) === "WeakRef"; + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function isWeakSet(value) { + return getObjectType(value) === "WeakSet"; + } + function isWhitespaceString(value) { + return isString(value) && /^\s+$/v.test(value); + } + function predicateOnArray(method, predicate, values) { + validatePredicate(predicate); + if (values.length === 0) { + throw new TypeError("Invalid number of values"); + } + return method.call(values, predicate); + } + function typeErrorMessage(description, value) { + return `Expected value which is \`${description}\`, received value of type \`${is(value)}\`.`; + } + function typeErrorMessageNot(description, value) { + return `Expected value which is not \`${description}\`, received value of type \`${is(value)}\`.`; + } + function unique(values) { + // eslint-disable-next-line unicorn/prefer-spread + return Array.from(new Set(values)); + } + const andFormatter = new Intl.ListFormat("en", { + style: "long", + type: "conjunction", + }); + const orFormatter = new Intl.ListFormat("en", { + style: "long", + type: "disjunction", + }); + function typeErrorMessageMultipleValues(expectedType, values) { + const uniqueExpectedTypes = unique( + (isArray(expectedType) ? expectedType : [expectedType]).map( + (value) => `\`${value}\``, + ), + ); + const uniqueValueTypes = unique( + values.map((value) => `\`${is(value)}\``), + ); + return `Expected values which are ${orFormatter.format(uniqueExpectedTypes)}. Received values of type${uniqueValueTypes.length > 1 ? "s" : ""} ${andFormatter.format(uniqueValueTypes)}.`; + } + // Negative assertions are limited to types where the assertion rejects every TypeScript value assignable to the forbidden type. Structural object types such as `Map`, `Set`, `Date`, and `Array` are excluded because TypeScript accepts shape-compatible mocks while the runtime checks use object brands, so `Exclude` would narrow values that can pass the negative assertion. + function createAssertNot(predicate, description) { + return (value, message) => { + if (predicate(value)) { + throw new TypeError( + message ?? typeErrorMessageNot(description, value), + ); + } + }; + } + const assertNotUndefined = createAssertNot(isUndefined, "undefined"); + // eslint-disable-next-line @typescript-eslint/no-restricted-types + const assertNotNull = createAssertNot(isNull, "null"); + // eslint-disable-next-line @typescript-eslint/no-restricted-types + const assertNotNullOrUndefined = + // eslint-disable-next-line @typescript-eslint/no-restricted-types + createAssertNot(isNullOrUndefined, "null or undefined"); + const assertNotString = createAssertNot(isString, "string"); + const assertNotBoolean = createAssertNot(isBoolean, "boolean"); + const assertNotSymbol = createAssertNot(isSymbol, "symbol"); + const assertNotBigint = createAssertNot(isBigint, "bigint"); + const assertNotPrimitive = createAssertNot(isPrimitive, "primitive"); // eslint-disable-line @typescript-eslint/no-restricted-types + // We intentionally do not support `assert.not(is.undefined, value)`. TypeScript cannot derive safe complement types from arbitrary predicates, and many predicates here are refinements (for example, `is.number` rejects `NaN`). Explicit methods keep runtime checks and type narrowing aligned. + const notAssertions = { + bigint: assertNotBigint, + boolean: assertNotBoolean, + null: assertNotNull, + nullOrUndefined: assertNotNullOrUndefined, + primitive: assertNotPrimitive, + string: assertNotString, + symbol: assertNotSymbol, + undefined: assertNotUndefined, + }; + const assert = { + all: assertAll, + any: assertAny, + not: notAssertions, + optional: assertOptional, + array: assertArray, + arrayBuffer: assertArrayBuffer, + arrayLike: assertArrayLike, + asyncFunction: assertAsyncFunction, + asyncGenerator: assertAsyncGenerator, + asyncGeneratorFunction: assertAsyncGeneratorFunction, + asyncIterable: assertAsyncIterable, + bigint: assertBigint, + bigInt64Array: assertBigInt64Array, + bigUint64Array: assertBigUint64Array, + blob: assertBlob, + boolean: assertBoolean, + boundFunction: assertBoundFunction, + buffer: assertBuffer, + class: assertClass, + dataView: assertDataView, + date: assertDate, + directInstanceOf: assertDirectInstanceOf, + emptyArray: assertEmptyArray, + emptyMap: assertEmptyMap, + emptyObject: assertEmptyObject, + emptySet: assertEmptySet, + emptyString: assertEmptyString, + emptyStringOrWhitespace: assertEmptyStringOrWhitespace, + enumCase: assertEnumCase, + error: assertError, + evenInteger: assertEvenInteger, + falsy: assertFalsy, + finiteNumber: assertFiniteNumber, + float32Array: assertFloat32Array, + float64Array: assertFloat64Array, + formData: assertFormData, + function: assertFunction, + generator: assertGenerator, + generatorFunction: assertGeneratorFunction, + htmlElement: assertHtmlElement, + infinite: assertInfinite, + inRange: assertInRange, + int16Array: assertInt16Array, + int32Array: assertInt32Array, + int8Array: assertInt8Array, + integer: assertInteger, + iterable: assertIterable, + map: assertMap, + nan: assertNan, + nativePromise: assertNativePromise, + negativeInteger: assertNegativeInteger, + negativeNumber: assertNegativeNumber, + nodeStream: assertNodeStream, + nonEmptyArray: assertNonEmptyArray, + nonEmptyMap: assertNonEmptyMap, + nonEmptyObject: assertNonEmptyObject, + nonEmptySet: assertNonEmptySet, + nonEmptyString: assertNonEmptyString, + nonEmptyStringAndNotWhitespace: assertNonEmptyStringAndNotWhitespace, + nonNegativeInteger: assertNonNegativeInteger, + nonNegativeNumber: assertNonNegativeNumber, + null: assertNull, + nullOrUndefined: assertNullOrUndefined, + number: assertNumber, + numericString: assertNumericString, + object: assertObject, + observable: assertObservable, + oddInteger: assertOddInteger, + plainObject: assertPlainObject, + positiveInteger: assertPositiveInteger, + positiveNumber: assertPositiveNumber, + primitive: assertPrimitive, + promise: assertPromise, + propertyKey: assertPropertyKey, + regExp: assertRegExp, + safeInteger: assertSafeInteger, + set: assertSet, + sharedArrayBuffer: assertSharedArrayBuffer, + string: assertString, + symbol: assertSymbol, + truthy: assertTruthy, + tupleLike: assertTupleLike, + typedArray: assertTypedArray, + uint16Array: assertUint16Array, + uint32Array: assertUint32Array, + uint8Array: assertUint8Array, + uint8ClampedArray: assertUint8ClampedArray, + undefined: assertUndefined, + urlInstance: assertUrlInstance, + urlSearchParams: assertUrlSearchParams, + urlString: assertUrlString, + validDate: assertValidDate, + validLength: assertValidLength, + weakMap: assertWeakMap, + weakRef: assertWeakRef, + weakSet: assertWeakSet, + whitespaceString: assertWhitespaceString, + }; + const methodTypeMap = { + isArray: "Array", + isArrayBuffer: "ArrayBuffer", + isArrayLike: "array-like", + isAsyncFunction: "AsyncFunction", + isAsyncGenerator: "AsyncGenerator", + isAsyncGeneratorFunction: "AsyncGeneratorFunction", + isAsyncIterable: "AsyncIterable", + isBigint: "bigint", + isBigInt64Array: "BigInt64Array", + isBigUint64Array: "BigUint64Array", + isBlob: "Blob", + isBoolean: "boolean", + isBoundFunction: "bound Function", + isBuffer: "Buffer", + isClass: "Class", + isDataView: "DataView", + isDate: "Date", + isDirectInstanceOf: "T", + isEmptyArray: "empty array", + isEmptyMap: "empty map", + isEmptyObject: "empty object", + isEmptySet: "empty set", + isEmptyString: "empty string", + isEmptyStringOrWhitespace: "empty string or whitespace", + isEnumCase: "EnumCase", + isError: "Error", + isEvenInteger: "even integer", + isFalsy: "falsy", + isFiniteNumber: "finite number", + isFloat32Array: "Float32Array", + isFloat64Array: "Float64Array", + isFormData: "FormData", + isFunction: "Function", + isGenerator: "Generator", + isGeneratorFunction: "GeneratorFunction", + isHtmlElement: "HTMLElement", + isInfinite: "infinite number", + isInRange: "in range", + isInt16Array: "Int16Array", + isInt32Array: "Int32Array", + isInt8Array: "Int8Array", + isInteger: "integer", + isIterable: "Iterable", + isMap: "Map", + isNan: "NaN", + isNativePromise: "native Promise", + isNegativeInteger: "negative integer", + isNegativeNumber: "negative number", + isNodeStream: "Node.js Stream", + isNonEmptyArray: "non-empty array", + isNonEmptyMap: "non-empty map", + isNonEmptyObject: "non-empty object", + isNonEmptySet: "non-empty set", + isNonEmptyString: "non-empty string", + isNonEmptyStringAndNotWhitespace: "non-empty string and not whitespace", + isNonNegativeInteger: "non-negative integer", + isNonNegativeNumber: "non-negative number", + isNull: "null", + isNullOrUndefined: "null or undefined", + isNumber: "number", + isNumericString: "string with a number", + isObject: "Object", + isObservable: "Observable", + isOddInteger: "odd integer", + isPlainObject: "plain object", + isPositiveInteger: "positive integer", + isPositiveNumber: "positive number", + isPrimitive: "primitive", + isPromise: "Promise", + isPropertyKey: "PropertyKey", + isRegExp: "RegExp", + isSafeInteger: "safe integer", + isSet: "Set", + isSharedArrayBuffer: "SharedArrayBuffer", + isString: "string", + isSymbol: "symbol", + isTruthy: "truthy", + isTupleLike: "tuple-like", + isTypedArray: "TypedArray", + isUint16Array: "Uint16Array", + isUint32Array: "Uint32Array", + isUint8Array: "Uint8Array", + isUint8ClampedArray: "Uint8ClampedArray", + isUndefined: "undefined", + isUrlInstance: "URL", + isUrlSearchParams: "URLSearchParams", + isUrlString: "string with a URL", + isValidDate: "valid Date", + isValidLength: "valid length", + isWeakMap: "WeakMap", + isWeakRef: "WeakRef", + isWeakSet: "WeakSet", + isWhitespaceString: "whitespace string", + }; + const isMethodNames = keysOf(methodTypeMap); + function isIsMethodName(value) { + return isMethodNames.includes(value); + } + function assertAll(predicate, ...values) { + if (values.length === 0) { + throw new TypeError("Invalid number of values"); + } + if (!isAll(predicate, ...values)) { + const predicateFunction = predicate; + const expectedType = + !Array.isArray(predicate) && isIsMethodName(predicateFunction.name) + ? methodTypeMap[predicateFunction.name] + : "predicate returns truthy for all values"; + throw new TypeError( + typeErrorMessageMultipleValues(expectedType, values), + ); + } + } + function assertAny(predicate, ...values) { + if (values.length === 0) { + throw new TypeError("Invalid number of values"); + } + if (!isAny(predicate, ...values)) { + const predicates = Array.isArray(predicate) ? predicate : [predicate]; + const expectedTypes = predicates.map((singlePredicate) => + isIsMethodName(singlePredicate.name) + ? methodTypeMap[singlePredicate.name] + : "predicate returns truthy for any value", + ); + throw new TypeError( + typeErrorMessageMultipleValues(expectedTypes, values), + ); + } + } + function assertOptional(value, assertion, message) { + if (!isUndefined(value)) { + assertion(value, message); + } + } + function assertArray(value, assertion, message) { + if (!isArray(value)) { + throw new TypeError(message ?? typeErrorMessage("Array", value)); + } + if (assertion) { + for (const element of value) { + // @ts-expect-error: "Assertions require every name in the call target to be declared with an explicit type annotation." + assertion(element, message); + } + } + } + function assertArrayBuffer(value, message) { + if (!isArrayBuffer(value)) { + throw new TypeError( + message ?? typeErrorMessage("ArrayBuffer", value), + ); + } + } + function assertArrayLike(value, message) { + if (!isArrayLike(value)) { + throw new TypeError(message ?? typeErrorMessage("array-like", value)); + } + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + function assertAsyncFunction(value, message) { + if (!isAsyncFunction(value)) { + throw new TypeError( + message ?? typeErrorMessage("AsyncFunction", value), + ); + } + } + function assertAsyncGenerator(value, message) { + if (!isAsyncGenerator(value)) { + throw new TypeError( + message ?? typeErrorMessage("AsyncGenerator", value), + ); + } + } + function assertAsyncGeneratorFunction(value, message) { + if (!isAsyncGeneratorFunction(value)) { + throw new TypeError( + message ?? typeErrorMessage("AsyncGeneratorFunction", value), + ); + } + } + function assertAsyncIterable(value, message) { + if (!isAsyncIterable(value)) { + throw new TypeError( + message ?? typeErrorMessage("AsyncIterable", value), + ); + } + } + function assertBigint(value, message) { + if (!isBigint(value)) { + throw new TypeError(message ?? typeErrorMessage("bigint", value)); + } + } + function assertBigInt64Array(value, message) { + if (!isBigInt64Array(value)) { + throw new TypeError( + message ?? typeErrorMessage("BigInt64Array", value), + ); + } + } + function assertBigUint64Array(value, message) { + if (!isBigUint64Array(value)) { + throw new TypeError( + message ?? typeErrorMessage("BigUint64Array", value), + ); + } + } + function assertBlob(value, message) { + if (!isBlob(value)) { + throw new TypeError(message ?? typeErrorMessage("Blob", value)); + } + } + function assertBoolean(value, message) { + if (!isBoolean(value)) { + throw new TypeError(message ?? typeErrorMessage("boolean", value)); + } + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + function assertBoundFunction(value, message) { + if (!isBoundFunction(value)) { + throw new TypeError( + message ?? typeErrorMessage("bound Function", value), + ); + } + } + /** +Note: [Prefer using `Uint8Array` instead of `Buffer`.](https://sindresorhus.com/blog/goodbye-nodejs-buffer) +*/ + function assertBuffer(value, message) { + if (!isBuffer(value)) { + throw new TypeError(message ?? typeErrorMessage("Buffer", value)); + } + } + function assertClass(value, message) { + if (!isClass(value)) { + throw new TypeError(message ?? typeErrorMessage("Class", value)); + } + } + function assertDataView(value, message) { + if (!isDataView(value)) { + throw new TypeError(message ?? typeErrorMessage("DataView", value)); + } + } + function assertDate(value, message) { + if (!isDate(value)) { + throw new TypeError(message ?? typeErrorMessage("Date", value)); + } + } + function assertDirectInstanceOf(instance, class_, message) { + if (!isDirectInstanceOf(instance, class_)) { + throw new TypeError(message ?? typeErrorMessage("T", instance)); + } + } + function assertEmptyArray(value, message) { + if (!isEmptyArray(value)) { + throw new TypeError( + message ?? typeErrorMessage("empty array", value), + ); + } + } + function assertEmptyMap(value, message) { + if (!isEmptyMap(value)) { + throw new TypeError(message ?? typeErrorMessage("empty map", value)); + } + } + function assertEmptyObject(value, message) { + if (!isEmptyObject(value)) { + throw new TypeError( + message ?? typeErrorMessage("empty object", value), + ); + } + } + function assertEmptySet(value, message) { + if (!isEmptySet(value)) { + throw new TypeError(message ?? typeErrorMessage("empty set", value)); + } + } + function assertEmptyString(value, message) { + if (!isEmptyString(value)) { + throw new TypeError( + message ?? typeErrorMessage("empty string", value), + ); + } + } + function assertEmptyStringOrWhitespace(value, message) { + if (!isEmptyStringOrWhitespace(value)) { + throw new TypeError( + message ?? typeErrorMessage("empty string or whitespace", value), + ); + } + } + function assertEnumCase(value, targetEnum, message) { + if (!isEnumCase(value, targetEnum)) { + throw new TypeError(message ?? typeErrorMessage("EnumCase", value)); + } + } + function assertError(value, message) { + if (!isError(value)) { + throw new TypeError(message ?? typeErrorMessage("Error", value)); + } + } + function assertEvenInteger(value, message) { + if (!isEvenInteger(value)) { + throw new TypeError( + message ?? typeErrorMessage("even integer", value), + ); + } + } + function assertFalsy(value, message) { + if (!isFalsy(value)) { + throw new TypeError(message ?? typeErrorMessage("falsy", value)); + } + } + function assertFiniteNumber(value, message) { + if (!isFiniteNumber(value)) { + throw new TypeError( + message ?? typeErrorMessage("finite number", value), + ); + } + } + function assertFloat32Array(value, message) { + if (!isFloat32Array(value)) { + throw new TypeError( + message ?? typeErrorMessage("Float32Array", value), + ); + } + } + function assertFloat64Array(value, message) { + if (!isFloat64Array(value)) { + throw new TypeError( + message ?? typeErrorMessage("Float64Array", value), + ); + } + } + function assertFormData(value, message) { + if (!isFormData(value)) { + throw new TypeError(message ?? typeErrorMessage("FormData", value)); + } + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + function assertFunction(value, message) { + if (!isFunction(value)) { + throw new TypeError(message ?? typeErrorMessage("Function", value)); + } + } + function assertGenerator(value, message) { + if (!isGenerator(value)) { + throw new TypeError(message ?? typeErrorMessage("Generator", value)); + } + } + function assertGeneratorFunction(value, message) { + if (!isGeneratorFunction(value)) { + throw new TypeError( + message ?? typeErrorMessage("GeneratorFunction", value), + ); + } + } + function assertHtmlElement(value, message) { + if (!isHtmlElement(value)) { + throw new TypeError( + message ?? typeErrorMessage("HTMLElement", value), + ); + } + } + function assertInfinite(value, message) { + if (!isInfinite(value)) { + throw new TypeError( + message ?? typeErrorMessage("infinite number", value), + ); + } + } + function assertInRange(value, range, message) { + if (!isInRange(value, range)) { + throw new TypeError(message ?? typeErrorMessage("in range", value)); + } + } + function assertInt16Array(value, message) { + if (!isInt16Array(value)) { + throw new TypeError(message ?? typeErrorMessage("Int16Array", value)); + } + } + function assertInt32Array(value, message) { + if (!isInt32Array(value)) { + throw new TypeError(message ?? typeErrorMessage("Int32Array", value)); + } + } + function assertInt8Array(value, message) { + if (!isInt8Array(value)) { + throw new TypeError(message ?? typeErrorMessage("Int8Array", value)); + } + } + function assertInteger(value, message) { + if (!isInteger(value)) { + throw new TypeError(message ?? typeErrorMessage("integer", value)); + } + } + function assertIterable(value, message) { + if (!isIterable(value)) { + throw new TypeError(message ?? typeErrorMessage("Iterable", value)); + } + } + function assertMap(value, message) { + if (!isMap(value)) { + throw new TypeError(message ?? typeErrorMessage("Map", value)); + } + } + function assertNan(value, message) { + if (!isNan(value)) { + throw new TypeError(message ?? typeErrorMessage("NaN", value)); + } + } + function assertNativePromise(value, message) { + if (!isNativePromise(value)) { + throw new TypeError( + message ?? typeErrorMessage("native Promise", value), + ); + } + } + function assertNegativeInteger(value, message) { + if (!isNegativeInteger(value)) { + throw new TypeError( + message ?? typeErrorMessage("negative integer", value), + ); + } + } + function assertNegativeNumber(value, message) { + if (!isNegativeNumber(value)) { + throw new TypeError( + message ?? typeErrorMessage("negative number", value), + ); + } + } + function assertNodeStream(value, message) { + if (!isNodeStream(value)) { + throw new TypeError( + message ?? typeErrorMessage("Node.js Stream", value), + ); + } + } + function assertNonEmptyArray(value, message) { + if (!isNonEmptyArray(value)) { + throw new TypeError( + message ?? typeErrorMessage("non-empty array", value), + ); + } + } + function assertNonEmptyMap(value, message) { + if (!isNonEmptyMap(value)) { + throw new TypeError( + message ?? typeErrorMessage("non-empty map", value), + ); + } + } + function assertNonEmptyObject(value, message) { + if (!isNonEmptyObject(value)) { + throw new TypeError( + message ?? typeErrorMessage("non-empty object", value), + ); + } + } + function assertNonEmptySet(value, message) { + if (!isNonEmptySet(value)) { + throw new TypeError( + message ?? typeErrorMessage("non-empty set", value), + ); + } + } + function assertNonEmptyString(value, message) { + if (!isNonEmptyString(value)) { + throw new TypeError( + message ?? typeErrorMessage("non-empty string", value), + ); + } + } + function assertNonEmptyStringAndNotWhitespace(value, message) { + if (!isNonEmptyStringAndNotWhitespace(value)) { + throw new TypeError( + message ?? + typeErrorMessage("non-empty string and not whitespace", value), + ); + } + } + function assertNonNegativeInteger(value, message) { + if (!isNonNegativeInteger(value)) { + throw new TypeError( + message ?? typeErrorMessage("non-negative integer", value), + ); + } + } + function assertNonNegativeNumber(value, message) { + if (!isNonNegativeNumber(value)) { + throw new TypeError( + message ?? typeErrorMessage("non-negative number", value), + ); + } + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function assertNull(value, message) { + if (!isNull(value)) { + throw new TypeError(message ?? typeErrorMessage("null", value)); + } + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function assertNullOrUndefined(value, message) { + if (!isNullOrUndefined(value)) { + throw new TypeError( + message ?? typeErrorMessage("null or undefined", value), + ); + } + } + function assertNumber(value, message) { + if (!isNumber(value)) { + throw new TypeError(message ?? typeErrorMessage("number", value)); + } + } + function assertNumericString(value, message) { + if (!isNumericString(value)) { + throw new TypeError( + message ?? typeErrorMessage("string with a number", value), + ); + } + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function assertObject(value, message) { + if (!isObject(value)) { + throw new TypeError(message ?? typeErrorMessage("Object", value)); + } + } + function assertObservable(value, message) { + if (!isObservable(value)) { + throw new TypeError(message ?? typeErrorMessage("Observable", value)); + } + } + function assertOddInteger(value, message) { + if (!isOddInteger(value)) { + throw new TypeError( + message ?? typeErrorMessage("odd integer", value), + ); + } + } + function assertPlainObject(value, message) { + if (!isPlainObject(value)) { + throw new TypeError( + message ?? typeErrorMessage("plain object", value), + ); + } + } + function assertPositiveInteger(value, message) { + if (!isPositiveInteger(value)) { + throw new TypeError( + message ?? typeErrorMessage("positive integer", value), + ); + } + } + function assertPositiveNumber(value, message) { + if (!isPositiveNumber(value)) { + throw new TypeError( + message ?? typeErrorMessage("positive number", value), + ); + } + } + function assertPrimitive(value, message) { + if (!isPrimitive(value)) { + throw new TypeError(message ?? typeErrorMessage("primitive", value)); + } + } + function assertPromise(value, message) { + if (!isPromise(value)) { + throw new TypeError(message ?? typeErrorMessage("Promise", value)); + } + } + function assertPropertyKey(value, message) { + if (!isPropertyKey(value)) { + throw new TypeError( + message ?? typeErrorMessage("PropertyKey", value), + ); + } + } + function assertRegExp(value, message) { + if (!isRegExp(value)) { + throw new TypeError(message ?? typeErrorMessage("RegExp", value)); + } + } + function assertSafeInteger(value, message) { + if (!isSafeInteger(value)) { + throw new TypeError( + message ?? typeErrorMessage("safe integer", value), + ); + } + } + function assertSet(value, message) { + if (!isSet(value)) { + throw new TypeError(message ?? typeErrorMessage("Set", value)); + } + } + function assertSharedArrayBuffer(value, message) { + if (!isSharedArrayBuffer(value)) { + throw new TypeError( + message ?? typeErrorMessage("SharedArrayBuffer", value), + ); + } + } + function assertString(value, message) { + if (!isString(value)) { + throw new TypeError(message ?? typeErrorMessage("string", value)); + } + } + function assertSymbol(value, message) { + if (!isSymbol(value)) { + throw new TypeError(message ?? typeErrorMessage("symbol", value)); + } + } + function assertTruthy(value, message) { + if (!isTruthy(value)) { + throw new TypeError(message ?? typeErrorMessage("truthy", value)); + } + } + function assertTupleLike(value, guards, message) { + if (!isTupleLike(value, guards)) { + throw new TypeError(message ?? typeErrorMessage("tuple-like", value)); + } + } + function assertTypedArray(value, message) { + if (!isTypedArray(value)) { + throw new TypeError(message ?? typeErrorMessage("TypedArray", value)); + } + } + function assertUint16Array(value, message) { + if (!isUint16Array(value)) { + throw new TypeError( + message ?? typeErrorMessage("Uint16Array", value), + ); + } + } + function assertUint32Array(value, message) { + if (!isUint32Array(value)) { + throw new TypeError( + message ?? typeErrorMessage("Uint32Array", value), + ); + } + } + function assertUint8Array(value, message) { + if (!isUint8Array(value)) { + throw new TypeError(message ?? typeErrorMessage("Uint8Array", value)); + } + } + function assertUint8ClampedArray(value, message) { + if (!isUint8ClampedArray(value)) { + throw new TypeError( + message ?? typeErrorMessage("Uint8ClampedArray", value), + ); + } + } + function assertUndefined(value, message) { + if (!isUndefined(value)) { + throw new TypeError(message ?? typeErrorMessage("undefined", value)); + } + } + function assertUrlInstance(value, message) { + if (!isUrlInstance(value)) { + throw new TypeError(message ?? typeErrorMessage("URL", value)); + } + } + // eslint-disable-next-line unicorn/prevent-abbreviations + function assertUrlSearchParams(value, message) { + if (!isUrlSearchParams(value)) { + throw new TypeError( + message ?? typeErrorMessage("URLSearchParams", value), + ); + } + } + function assertUrlString(value, message) { + if (!isUrlString(value)) { + throw new TypeError( + message ?? typeErrorMessage("string with a URL", value), + ); + } + } + function assertValidDate(value, message) { + if (!isValidDate(value)) { + throw new TypeError(message ?? typeErrorMessage("valid Date", value)); + } + } + function assertValidLength(value, message) { + if (!isValidLength(value)) { + throw new TypeError( + message ?? typeErrorMessage("valid length", value), + ); + } + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function assertWeakMap(value, message) { + if (!isWeakMap(value)) { + throw new TypeError(message ?? typeErrorMessage("WeakMap", value)); + } + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function assertWeakRef(value, message) { + if (!isWeakRef(value)) { + throw new TypeError(message ?? typeErrorMessage("WeakRef", value)); + } + } + // eslint-disable-next-line @typescript-eslint/no-restricted-types + function assertWeakSet(value, message) { + if (!isWeakSet(value)) { + throw new TypeError(message ?? typeErrorMessage("WeakSet", value)); + } + } + function assertWhitespaceString(value, message) { + if (!isWhitespaceString(value)) { + throw new TypeError( + message ?? typeErrorMessage("whitespace string", value), + ); + } + } + /* harmony default export */ const distribution = is; + + // EXTERNAL MODULE: external "node:events" + var external_node_events_ = __nccwpck_require__(8474); // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/strip-url-auth.js + /* +Returns the URL as a string with `username` and `password` stripped. +*/ + function stripUrlAuth(url) { + const sanitized = new URL(url); + sanitized.username = ""; + sanitized.password = ""; + return sanitized.toString(); + } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/errors.js + + // A hacky check to prevent circular references. + function isRequest(x) { + return distribution.object(x) && "_onResponse" in x; + } + /** +An error to be thrown when a request fails. +Contains a `code` property with error class code, like `ECONNREFUSED`. +*/ + class RequestError extends Error { + name = "RequestError"; + code = "ERR_GOT_REQUEST_ERROR"; + input; + stack; + response; + request; + timings; + constructor(message, error, self) { + super(message, { cause: error }); + Error.captureStackTrace(this, this.constructor); + if (error.code) { + this.code = error.code; + } + this.input = error.input; + if (isRequest(self)) { + Object.defineProperty(this, "request", { + enumerable: false, + value: self, + }); + Object.defineProperty(this, "response", { + enumerable: false, + value: self.response, + }); + this.options = self.options; + } else { + this.options = self; + } + this.timings = this.request?.timings; + // Recover the original stacktrace if ( - // The set is a proper subset when its length is less than the other set. - coveredSession[kOriginSet].length < session[kOriginSet].length && - // And the other set includes all elements of the subset. - coveredSession[kOriginSet].every((origin) => - session[kOriginSet].includes(origin) - ) && - // Makes sure that the session can handle all requests from the covered session. - coveredSession[kCurrentStreamsCount] + - session[kCurrentStreamsCount] <= - session.remoteSettings.maxConcurrentStreams + distribution.string(error.stack) && + distribution.string(this.stack) ) { - // This allows pending requests to finish and prevents making new requests. - gracefullyClose(coveredSession); + const indexOfMessage = + this.stack.indexOf(this.message) + this.message.length; + const thisStackTrace = this.stack + .slice(indexOfMessage) + .split("\n") + .toReversed(); + const errorStackTrace = error.stack + .slice(error.stack.indexOf(error.message) + error.message.length) + .split("\n") + .toReversed(); + // Remove duplicated traces + while ( + errorStackTrace.length > 0 && + errorStackTrace[0] === thisStackTrace[0] + ) { + thisStackTrace.shift(); + } + this.stack = `${this.stack.slice(0, indexOfMessage)}${thisStackTrace.toReversed().join("\n")}${errorStackTrace.toReversed().join("\n")}`; } } - }; - - // This is basically inverted `closeCoveredSessions(...)`. - const closeSessionIfCovered = (where, coveredSession) => { - for (const session of where) { + } + /** +An error to be thrown when the server redirects you more than ten times. +Includes a `response` property. +*/ + class MaxRedirectsError extends RequestError { + name = "MaxRedirectsError"; + code = "ERR_TOO_MANY_REDIRECTS"; + constructor(request) { + super( + `Redirected ${request.options.maxRedirects} times. Aborting.`, + {}, + request, + ); + } + } + /** +An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304. +Includes a `response` property. +*/ + // eslint-disable-next-line @typescript-eslint/naming-convention + class HTTPError extends RequestError { + name = "HTTPError"; + code = "ERR_NON_2XX_3XX_RESPONSE"; + constructor(response) { + super( + `Request failed with status code ${response.statusCode} (${response.statusMessage}): ${response.request.options.method} ${stripUrlAuth(response.request.options.url)}`, + {}, + response.request, + ); + } + } + /** +An error to be thrown when a cache method fails. +For example, if the database goes down or there's a filesystem error. +*/ + class CacheError extends RequestError { + name = "CacheError"; + constructor(error, request) { + super(error.message, error, request); + this.code = "ERR_CACHE_ACCESS"; + } + } + /** +An error to be thrown when the request body is a stream and an error occurs while reading from that stream. +*/ + class UploadError extends RequestError { + name = "UploadError"; + constructor(error, request) { + super(error.message, error, request); + this.code = "ERR_UPLOAD"; + } + } + /** +An error to be thrown when the request is aborted due to a timeout. +Includes an `event` and `timings` property. +*/ + class TimeoutError extends RequestError { + name = "TimeoutError"; + timings; + event; + constructor(error, timings, request) { + super(error.message, error, request); + this.event = error.event; + this.timings = timings; + } + } + /** +An error to be thrown when reading from response stream fails. +*/ + class ReadError extends RequestError { + name = "ReadError"; + code = "ERR_READING_RESPONSE_STREAM"; + constructor(error, request) { + super(error.message, error, request); if ( - coveredSession[kOriginSet].length < session[kOriginSet].length && - coveredSession[kOriginSet].every((origin) => - session[kOriginSet].includes(origin) - ) && - coveredSession[kCurrentStreamsCount] + - session[kCurrentStreamsCount] <= - session.remoteSettings.maxConcurrentStreams + error.code === "ECONNRESET" || + error.code === "ERR_HTTP_CONTENT_LENGTH_MISMATCH" ) { - gracefullyClose(coveredSession); + this.code = error.code; } } - }; - - const getSessions = ({ agent, isFree }) => { - const result = {}; - - // eslint-disable-next-line guard-for-in - for (const normalizedOptions in agent.sessions) { - const sessions = agent.sessions[normalizedOptions]; - - const filtered = sessions.filter((session) => { - const result = - session[Agent.kCurrentStreamsCount] < - session.remoteSettings.maxConcurrentStreams; - - return isFree ? result : !result; - }); - - if (filtered.length !== 0) { - result[normalizedOptions] = filtered; - } + } + /** +An error which always triggers a new retry when thrown. +*/ + class RetryError extends RequestError { + name = "RetryError"; + code = "ERR_RETRYING"; + constructor(request) { + super("Retrying", {}, request); } - - return result; - }; - - const gracefullyClose = (session) => { - session[kGracefullyClosing] = true; - - if (session[kCurrentStreamsCount] === 0) { - session.close(); + } + /** +An error to be thrown when the request is aborted by AbortController. +*/ + class AbortError extends RequestError { + name = "AbortError"; + code = "ERR_ABORTED"; + constructor(request) { + super("This operation was aborted.", {}, request); } - }; + } // CONCATENATED MODULE: external "node:process" - class Agent extends EventEmitter { - constructor({ - timeout = 60000, - maxSessions = Infinity, - maxFreeSessions = 10, - maxCachedTlsSessions = 100, - } = {}) { - super(); - - // A session is considered busy when its current streams count - // is equal to or greater than the `maxConcurrentStreams` value. - - // A session is considered free when its current streams count - // is less than the `maxConcurrentStreams` value. - - // SESSIONS[NORMALIZED_OPTIONS] = []; - this.sessions = {}; - - // The queue for creating new sessions. It looks like this: - // QUEUE[NORMALIZED_OPTIONS][NORMALIZED_ORIGIN] = ENTRY_FUNCTION - // - // The entry function has `listeners`, `completed` and `destroyed` properties. - // `listeners` is an array of objects containing `resolve` and `reject` functions. - // `completed` is a boolean. It's set to true after ENTRY_FUNCTION is executed. - // `destroyed` is a boolean. If it's set to true, the session will be destroyed if hasn't connected yet. - this.queue = {}; - - // Each session will use this timeout value. - this.timeout = timeout; + const external_node_process_namespaceObject = require("node:process"); + // EXTERNAL MODULE: external "node:buffer" + var external_node_buffer_ = __nccwpck_require__(4573); + // EXTERNAL MODULE: external "node:stream" + var external_node_stream_ = __nccwpck_require__(7075); + // EXTERNAL MODULE: external "node:http" + var external_node_http_ = __nccwpck_require__(7067); // CONCATENATED MODULE: ./node_modules/byte-counter/utilities.js + const textEncoder = new TextEncoder(); - // Max sessions in total - this.maxSessions = maxSessions; + function byteLength(data) { + if (typeof data === "string") { + return textEncoder.encode(data).byteLength; + } - // Max free sessions in total - // TODO: decreasing `maxFreeSessions` should close some sessions - this.maxFreeSessions = maxFreeSessions; + if ( + ArrayBuffer.isView(data) || + data instanceof ArrayBuffer || + data instanceof SharedArrayBuffer + ) { + return data.byteLength; + } - this._freeSessionsCount = 0; - this._sessionsCount = 0; + return 0; + } // CONCATENATED MODULE: ./node_modules/chunk-data/index.js - // We don't support push streams by default. - this.settings = { - enablePush: false, - }; + const toUint8Array = (data) => + data instanceof Uint8Array + ? data + : new Uint8Array(data.buffer, data.byteOffset, data.byteLength); - // Reusing TLS sessions increases performance. - this.tlsSessionCache = new QuickLRU({ - maxSize: maxCachedTlsSessions, - }); + function* chunk(data, chunkSize) { + if (!ArrayBuffer.isView(data)) { + throw new TypeError("Expected data to be ArrayBufferView"); } - static normalizeOrigin(url, servername) { - if (typeof url === "string") { - url = new URL(url); - } + if (!Number.isSafeInteger(chunkSize) || chunkSize <= 0) { + throw new TypeError("Expected chunkSize to be a positive integer"); + } - if (servername && url.hostname !== servername) { - url.hostname = servername; - } + const uint8Array = toUint8Array(data); - return url.origin; + for (let offset = 0; offset < uint8Array.length; offset += chunkSize) { + yield uint8Array.subarray(offset, offset + chunkSize); } + } - normalizeOptions(options) { - let normalized = ""; - - if (options) { - for (const key of nameKeys) { - if (options[key]) { - normalized += `:${options[key]}`; - } - } - } + function* chunkFrom(iterable, chunkSize) { + if ( + typeof iterable?.[Symbol.iterator] !== "function" || + typeof iterable === "string" + ) { + throw new TypeError( + "Expected iterable to be an Iterable", + ); + } - return normalized; + if (!Number.isSafeInteger(chunkSize) || chunkSize <= 0) { + throw new TypeError("Expected chunkSize to be a positive integer"); } - _tryToCreateNewSession(normalizedOptions, normalizedOrigin) { - if ( - !(normalizedOptions in this.queue) || - !(normalizedOrigin in this.queue[normalizedOptions]) - ) { - return; - } + let carryBuffer; + let carryLength = 0; - const item = this.queue[normalizedOptions][normalizedOrigin]; + for (const part of iterable) { + if (!ArrayBuffer.isView(part)) { + throw new TypeError( + "Expected iterable chunks to be Uint8Array or ArrayBufferView", + ); + } - // The entry function can be run only once. - // BUG: The session may be never created when: - // - the first condition is false AND - // - this function is never called with the same arguments in the future. - if (this._sessionsCount < this.maxSessions && !item.completed) { - item.completed = true; + const buffer = toUint8Array(part); - item(); + // Skip empty buffers + if (buffer.length === 0) { + continue; } - } - getSession(origin, options, listeners) { - return new Promise((resolve, reject) => { - if (Array.isArray(listeners)) { - listeners = [...listeners]; + let offset = 0; - // Resolve the current promise ASAP, we're just moving the listeners. - // They will be executed at a different time. - resolve(); + // Fill carry buffer to a full chunk if present + if (carryLength > 0) { + const needed = chunkSize - carryLength; + if (buffer.length >= needed) { + // Complete the chunk: merge carry + needed bytes from buffer + const out = new Uint8Array(chunkSize); + out.set(carryBuffer.subarray(0, carryLength), 0); + out.set(buffer.subarray(0, needed), carryLength); + yield out; + carryLength = 0; + offset = needed; } else { - listeners = [{ resolve, reject }]; - } - - const normalizedOptions = this.normalizeOptions(options); - const normalizedOrigin = Agent.normalizeOrigin( - origin, - options && options.servername - ); - - if (normalizedOrigin === undefined) { - for (const { reject } of listeners) { - reject( - new TypeError( - "The `origin` argument needs to be a string or an URL object" - ) - ); - } - - return; + // Accumulate into fixed carry buffer (avoids O(n²) from repeated reallocations) + // Safe: buffer.length < needed implies carryLength + buffer.length < chunkSize + carryBuffer.set(buffer, carryLength); + carryLength += buffer.length; + continue; } + } - if (normalizedOptions in this.sessions) { - const sessions = this.sessions[normalizedOptions]; - - let maxConcurrentStreams = -1; - let currentStreamsCount = -1; - let optimalSession; - - // We could just do this.sessions[normalizedOptions].find(...) but that isn't optimal. - // Additionally, we are looking for session which has biggest current pending streams count. - for (const session of sessions) { - const sessionMaxConcurrentStreams = - session.remoteSettings.maxConcurrentStreams; + // Emit direct slices from current buffer + for (; offset + chunkSize <= buffer.length; offset += chunkSize) { + yield buffer.subarray(offset, offset + chunkSize); + } - if (sessionMaxConcurrentStreams < maxConcurrentStreams) { - break; - } + // Save remainder in carry buffer + if (offset < buffer.length) { + carryBuffer ||= new Uint8Array(chunkSize); - if (session[kOriginSet].includes(normalizedOrigin)) { - const sessionCurrentStreamsCount = - session[kCurrentStreamsCount]; + const remainder = buffer.length - offset; + carryBuffer.set(buffer.subarray(offset), 0); + carryLength = remainder; + } + } - if ( - sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || - session[kGracefullyClosing] || - // Unfortunately the `close` event isn't called immediately, - // so `session.destroyed` is `true`, but `session.closed` is `false`. - session.destroyed - ) { - continue; - } + if (carryLength > 0) { + yield carryBuffer.subarray(0, carryLength); + } + } - // We only need set this once. - if (!optimalSession) { - maxConcurrentStreams = sessionMaxConcurrentStreams; - } + async function* chunkFromAsync(iterable, chunkSize) { + if ( + typeof iterable?.[Symbol.asyncIterator] !== "function" && + typeof iterable?.[Symbol.iterator] !== "function" + ) { + throw new TypeError( + "Expected iterable to be an async iterable or iterable", + ); + } - // We're looking for the session which has biggest current pending stream count, - // in order to minimalize the amount of active sessions. - if (sessionCurrentStreamsCount > currentStreamsCount) { - optimalSession = session; - currentStreamsCount = sessionCurrentStreamsCount; - } - } - } + if (!Number.isSafeInteger(chunkSize) || chunkSize <= 0) { + throw new TypeError("Expected chunkSize to be a positive integer"); + } - if (optimalSession) { - /* istanbul ignore next: safety check */ - if (listeners.length !== 1) { - for (const { reject } of listeners) { - const error = new Error( - `Expected the length of listeners to be 1, got ${listeners.length}.\n` + - "Please report this to https://github.com/szmarczak/http2-wrapper/" - ); + let carryBuffer; + let carryLength = 0; - reject(error); - } + for await (const part of iterable) { + if (!ArrayBuffer.isView(part)) { + throw new TypeError( + "Expected iterable chunks to be Uint8Array or ArrayBufferView", + ); + } - return; - } + const buffer = toUint8Array(part); - listeners[0].resolve(optimalSession); - return; - } - } + // Skip empty buffers + if (buffer.length === 0) { + continue; + } - if (normalizedOptions in this.queue) { - if (normalizedOrigin in this.queue[normalizedOptions]) { - // There's already an item in the queue, just attach ourselves to it. - this.queue[normalizedOptions][normalizedOrigin].listeners.push( - ...listeners - ); + let offset = 0; - // This shouldn't be executed here. - // See the comment inside _tryToCreateNewSession. - this._tryToCreateNewSession( - normalizedOptions, - normalizedOrigin - ); - return; - } + // Fill carry buffer to a full chunk if present + if (carryLength > 0) { + const needed = chunkSize - carryLength; + if (buffer.length >= needed) { + // Complete the chunk: merge carry + needed bytes from buffer + const out = new Uint8Array(chunkSize); + out.set(carryBuffer.subarray(0, carryLength), 0); + out.set(buffer.subarray(0, needed), carryLength); + yield out; + carryLength = 0; + offset = needed; } else { - this.queue[normalizedOptions] = {}; + // Accumulate into fixed carry buffer (avoids O(n²) from repeated reallocations) + // Safe: buffer.length < needed implies carryLength + buffer.length < chunkSize + carryBuffer.set(buffer, carryLength); + carryLength += buffer.length; + continue; } + } - // The entry must be removed from the queue IMMEDIATELY when: - // 1. the session connects successfully, - // 2. an error occurs. - const removeFromQueue = () => { - // Our entry can be replaced. We cannot remove the new one. - if ( - normalizedOptions in this.queue && - this.queue[normalizedOptions][normalizedOrigin] === entry - ) { - delete this.queue[normalizedOptions][normalizedOrigin]; - - if (Object.keys(this.queue[normalizedOptions]).length === 0) { - delete this.queue[normalizedOptions]; - } - } - }; + // Emit direct slices from current buffer + for (; offset + chunkSize <= buffer.length; offset += chunkSize) { + yield buffer.subarray(offset, offset + chunkSize); + } - // The main logic is here - const entry = () => { - const name = `${normalizedOrigin}:${normalizedOptions}`; - let receivedSettings = false; + // Save remainder in carry buffer + if (offset < buffer.length) { + carryBuffer ||= new Uint8Array(chunkSize); - try { - const session = http2.connect(origin, { - createConnection: this.createConnection, - settings: this.settings, - session: this.tlsSessionCache.get(name), - ...options, - }); - session[kCurrentStreamsCount] = 0; - session[kGracefullyClosing] = false; + const remainder = buffer.length - offset; + carryBuffer.set(buffer.subarray(offset), 0); + carryLength = remainder; + } + } - const isFree = () => - session[kCurrentStreamsCount] < - session.remoteSettings.maxConcurrentStreams; - let wasFree = true; + if (carryLength > 0) { + yield carryBuffer.subarray(0, carryLength); + } + } // CONCATENATED MODULE: ./node_modules/uint8array-extras/index.js - session.socket.once("session", (tlsSession) => { - this.tlsSessionCache.set(name, tlsSession); - }); + const objectToString = Object.prototype.toString; + const uint8ArrayStringified = "[object Uint8Array]"; + const arrayBufferStringified = "[object ArrayBuffer]"; - session.once("error", (error) => { - // Listeners are empty when the session successfully connected. - for (const { reject } of listeners) { - reject(error); - } + function isType(value, typeConstructor, typeStringified) { + if (!value) { + return false; + } - // The connection got broken, purge the cache. - this.tlsSessionCache.delete(name); - }); + if (value.constructor === typeConstructor) { + return true; + } - session.setTimeout(this.timeout, () => { - // Terminates all streams owned by this session. - // TODO: Maybe the streams should have a "Session timed out" error? - session.destroy(); - }); + return objectToString.call(value) === typeStringified; + } - session.once("close", () => { - if (receivedSettings) { - // 1. If it wasn't free then no need to decrease because - // it has been decreased already in session.request(). - // 2. `stream.once('close')` won't increment the count - // because the session is already closed. - if (wasFree) { - this._freeSessionsCount--; - } + function uint8array_extras_isUint8Array(value) { + return isType(value, Uint8Array, uint8ArrayStringified); + } - this._sessionsCount--; + function uint8array_extras_isArrayBuffer(value) { + return isType(value, ArrayBuffer, arrayBufferStringified); + } - // This cannot be moved to the stream logic, - // because there may be a session that hadn't made a single request. - const where = this.sessions[normalizedOptions]; - where.splice(where.indexOf(session), 1); + function isUint8ArrayOrArrayBuffer(value) { + return ( + uint8array_extras_isUint8Array(value) || + uint8array_extras_isArrayBuffer(value) + ); + } - if (where.length === 0) { - delete this.sessions[normalizedOptions]; - } - } else { - // Broken connection - const error = new Error( - "Session closed without receiving a SETTINGS frame" - ); - error.code = "HTTP2WRAPPER_NOSETTINGS"; + function uint8array_extras_assertUint8Array(value) { + if (!uint8array_extras_isUint8Array(value)) { + throw new TypeError( + `Expected \`Uint8Array\`, got \`${typeof value}\``, + ); + } + } - for (const { reject } of listeners) { - reject(error); - } + function assertUint8ArrayOrArrayBuffer(value) { + if (!isUint8ArrayOrArrayBuffer(value)) { + throw new TypeError( + `Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof value}\``, + ); + } + } - removeFromQueue(); - } + function uint8array_extras_toUint8Array(value) { + if (value instanceof ArrayBuffer) { + return new Uint8Array(value); + } - // There may be another session awaiting. - this._tryToCreateNewSession( - normalizedOptions, - normalizedOrigin - ); - }); + if (ArrayBuffer.isView(value)) { + return new Uint8Array( + value.buffer, + value.byteOffset, + value.byteLength, + ); + } - // Iterates over the queue and processes listeners. - const processListeners = () => { - if (!(normalizedOptions in this.queue) || !isFree()) { - return; - } + throw new TypeError(`Unsupported value, got \`${typeof value}\`.`); + } - for (const origin of session[kOriginSet]) { - if (origin in this.queue[normalizedOptions]) { - const { listeners } = this.queue[normalizedOptions][ - origin - ]; + function concatUint8Arrays(arrays, totalLength) { + if (arrays.length === 0) { + return new Uint8Array(0); + } - // Prevents session overloading. - while (listeners.length !== 0 && isFree()) { - // We assume `resolve(...)` calls `request(...)` *directly*, - // otherwise the session will get overloaded. - listeners.shift().resolve(session); - } + totalLength ??= arrays.reduce( + (accumulator, currentValue) => accumulator + currentValue.length, + 0, + ); - const where = this.queue[normalizedOptions]; - if (where[origin].listeners.length === 0) { - delete where[origin]; + const returnValue = new Uint8Array(totalLength); - if (Object.keys(where).length === 0) { - delete this.queue[normalizedOptions]; - break; - } - } + let offset = 0; + for (const array of arrays) { + uint8array_extras_assertUint8Array(array); + returnValue.set(array, offset); + offset += array.length; + } - // We're no longer free, no point in continuing. - if (!isFree()) { - break; - } - } - } - }; + return returnValue; + } - // The Origin Set cannot shrink. No need to check if it suddenly became covered by another one. - session.on("origin", () => { - session[kOriginSet] = session.originSet; + function areUint8ArraysEqual(a, b) { + uint8array_extras_assertUint8Array(a); + uint8array_extras_assertUint8Array(b); - if (!isFree()) { - // The session is full. - return; - } + if (a === b) { + return true; + } - processListeners(); + if (a.length !== b.length) { + return false; + } - // Close covered sessions (if possible). - closeCoveredSessions( - this.sessions[normalizedOptions], - session - ); - }); + // eslint-disable-next-line unicorn/no-for-loop + for (let index = 0; index < a.length; index++) { + if (a[index] !== b[index]) { + return false; + } + } - session.once("remoteSettings", () => { - // Fix Node.js bug preventing the process from exiting - session.ref(); - session.unref(); + return true; + } - this._sessionsCount++; + function compareUint8Arrays(a, b) { + uint8array_extras_assertUint8Array(a); + uint8array_extras_assertUint8Array(b); - // The Agent could have been destroyed already. - if (entry.destroyed) { - const error = new Error("Agent has been destroyed"); + const length = Math.min(a.length, b.length); - for (const listener of listeners) { - listener.reject(error); - } + for (let index = 0; index < length; index++) { + const diff = a[index] - b[index]; + if (diff !== 0) { + return Math.sign(diff); + } + } - session.destroy(); - return; - } + // At this point, all the compared elements are equal. + // The shorter array should come first if the arrays are of different lengths. + return Math.sign(a.length - b.length); + } - session[kOriginSet] = session.originSet; + const cachedDecoders = { + utf8: new globalThis.TextDecoder("utf8"), + }; - { - const where = this.sessions; + function uint8ArrayToString(array, encoding = "utf8") { + assertUint8ArrayOrArrayBuffer(array); + cachedDecoders[encoding] ??= new globalThis.TextDecoder(encoding); + return cachedDecoders[encoding].decode(array); + } - if (normalizedOptions in where) { - const sessions = where[normalizedOptions]; - sessions.splice( - getSortedIndex(sessions, session, compareSessions), - 0, - session - ); - } else { - where[normalizedOptions] = [session]; - } - } + function uint8array_extras_assertString(value) { + if (typeof value !== "string") { + throw new TypeError(`Expected \`string\`, got \`${typeof value}\``); + } + } - this._freeSessionsCount += 1; - receivedSettings = true; + const cachedEncoder = new globalThis.TextEncoder(); - this.emit("session", session); + function stringToUint8Array(string) { + uint8array_extras_assertString(string); + return cachedEncoder.encode(string); + } - processListeners(); - removeFromQueue(); + function base64ToBase64Url(base64) { + return base64 + .replaceAll("+", "-") + .replaceAll("/", "_") + .replace(/=+$/, ""); + } - // TODO: Close last recently used (or least used?) session - if ( - session[kCurrentStreamsCount] === 0 && - this._freeSessionsCount > this.maxFreeSessions - ) { - session.close(); - } + function base64UrlToBase64(base64url) { + const base64 = base64url.replaceAll("-", "+").replaceAll("_", "/"); + const padding = (4 - (base64.length % 4)) % 4; + return base64 + "=".repeat(padding); + } - // Check if we haven't managed to execute all listeners. - if (listeners.length !== 0) { - // Request for a new session with predefined listeners. - this.getSession(normalizedOrigin, options, listeners); - listeners.length = 0; - } + // Reference: https://phuoc.ng/collection/this-vs-that/concat-vs-push/ + // Important: Keep this value divisible by 3 so intermediate chunks produce no Base64 padding. + const MAX_BLOCK_SIZE = 65_535; - // `session.remoteSettings.maxConcurrentStreams` might get increased - session.on("remoteSettings", () => { - processListeners(); + function uint8ArrayToBase64(array, { urlSafe = false } = {}) { + uint8array_extras_assertUint8Array(array); - // In case the Origin Set changes - closeCoveredSessions( - this.sessions[normalizedOptions], - session - ); - }); - }); + let base64 = ""; - // Shim `session.request()` in order to catch all streams - session[kRequest] = session.request; - session.request = (headers, streamOptions) => { - if (session[kGracefullyClosing]) { - throw new Error( - "The session is gracefully closing. No new streams are allowed." - ); - } + for (let index = 0; index < array.length; index += MAX_BLOCK_SIZE) { + const chunk = array.subarray(index, index + MAX_BLOCK_SIZE); + // Required as `btoa` and `atob` don't properly support Unicode: https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem + base64 += globalThis.btoa( + String.fromCodePoint.apply(undefined, chunk), + ); + } - const stream = session[kRequest](headers, streamOptions); + return urlSafe ? base64ToBase64Url(base64) : base64; + } - // The process won't exit until the session is closed or all requests are gone. - session.ref(); + function base64ToUint8Array(base64String) { + uint8array_extras_assertString(base64String); + return Uint8Array.from( + globalThis.atob(base64UrlToBase64(base64String)), + (x) => x.codePointAt(0), + ); + } - ++session[kCurrentStreamsCount]; + function stringToBase64(string, { urlSafe = false } = {}) { + uint8array_extras_assertString(string); + return uint8ArrayToBase64(stringToUint8Array(string), { urlSafe }); + } - if ( - session[kCurrentStreamsCount] === - session.remoteSettings.maxConcurrentStreams - ) { - this._freeSessionsCount--; - } + function base64ToString(base64String) { + uint8array_extras_assertString(base64String); + return uint8ArrayToString(base64ToUint8Array(base64String)); + } - stream.once("close", () => { - wasFree = isFree(); + const byteToHexLookupTable = Array.from({ length: 256 }, (_, index) => + index.toString(16).padStart(2, "0"), + ); - --session[kCurrentStreamsCount]; + function uint8ArrayToHex(array) { + uint8array_extras_assertUint8Array(array); - if (!session.destroyed && !session.closed) { - closeSessionIfCovered( - this.sessions[normalizedOptions], - session - ); + // Concatenating a string is faster than using an array. + let hexString = ""; - if (isFree() && !session.closed) { - if (!wasFree) { - this._freeSessionsCount++; + // eslint-disable-next-line unicorn/no-for-loop -- Max performance is critical. + for (let index = 0; index < array.length; index++) { + hexString += byteToHexLookupTable[array[index]]; + } - wasFree = true; - } + return hexString; + } - const isEmpty = session[kCurrentStreamsCount] === 0; + const hexToDecimalLookupTable = { + 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, + }; - if (isEmpty) { - session.unref(); - } + function hexToUint8Array(hexString) { + uint8array_extras_assertString(hexString); - if ( - isEmpty && - (this._freeSessionsCount > this.maxFreeSessions || - session[kGracefullyClosing]) - ) { - session.close(); - } else { - closeCoveredSessions( - this.sessions[normalizedOptions], - session - ); - processListeners(); - } - } - } - }); + if (hexString.length % 2 !== 0) { + throw new Error("Invalid Hex string length."); + } - return stream; - }; - } catch (error) { - for (const listener of listeners) { - listener.reject(error); - } + const resultLength = hexString.length / 2; + const bytes = new Uint8Array(resultLength); - removeFromQueue(); - } - }; + for (let index = 0; index < resultLength; index++) { + const highNibble = hexToDecimalLookupTable[hexString[index * 2]]; + const lowNibble = hexToDecimalLookupTable[hexString[index * 2 + 1]]; - entry.listeners = listeners; - entry.completed = false; - entry.destroyed = false; + if (highNibble === undefined || lowNibble === undefined) { + throw new Error( + `Invalid Hex character encountered at position ${index * 2}`, + ); + } - this.queue[normalizedOptions][normalizedOrigin] = entry; - this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); - }); + bytes[index] = (highNibble << 4) | lowNibble; // eslint-disable-line no-bitwise } - request(origin, options, headers, streamOptions) { - return new Promise((resolve, reject) => { - this.getSession(origin, options, [ - { - reject, - resolve: (session) => { - try { - resolve(session.request(headers, streamOptions)); - } catch (error) { - reject(error); - } - }, - }, - ]); - }); + return bytes; + } + + /** +@param {DataView} view +@returns {number} +*/ + function getUintBE(view) { + const { byteLength } = view; + + if (byteLength === 6) { + return view.getUint16(0) * 2 ** 32 + view.getUint32(2); } - createConnection(origin, options) { - return Agent.connect(origin, options); + if (byteLength === 5) { + return view.getUint8(0) * 2 ** 32 + view.getUint32(1); } - static connect(origin, options) { - options.ALPNProtocols = ["h2"]; + if (byteLength === 4) { + return view.getUint32(0); + } - const port = origin.port || 443; - const host = origin.hostname || origin.host; + if (byteLength === 3) { + return view.getUint8(0) * 2 ** 16 + view.getUint16(1); + } - if (typeof options.servername === "undefined") { - options.servername = host; - } + if (byteLength === 2) { + return view.getUint16(0); + } - return tls.connect(port, host, options); + if (byteLength === 1) { + return view.getUint8(0); } + } - closeFreeSessions() { - for (const sessions of Object.values(this.sessions)) { - for (const session of sessions) { - if (session[kCurrentStreamsCount] === 0) { - session.close(); - } - } - } + /** +@param {Uint8Array} array +@param {Uint8Array} value +@returns {number} +*/ + function indexOf(array, value) { + const arrayLength = array.length; + const valueLength = value.length; + + if (valueLength === 0) { + return -1; } - destroy(reason) { - for (const sessions of Object.values(this.sessions)) { - for (const session of sessions) { - session.destroy(reason); - } - } + if (valueLength > arrayLength) { + return -1; + } + + const validOffsetLength = arrayLength - valueLength; - for (const entriesOfAuthority of Object.values(this.queue)) { - for (const entry of Object.values(entriesOfAuthority)) { - entry.destroyed = true; + for (let index = 0; index <= validOffsetLength; index++) { + let isMatch = true; + for (let index2 = 0; index2 < valueLength; index2++) { + if (array[index + index2] !== value[index2]) { + isMatch = false; + break; } } - // New requests should NOT attach to destroyed sessions - this.queue = {}; - } - - get freeSessions() { - return getSessions({ agent: this, isFree: true }); + if (isMatch) { + return index; + } } - get busySessions() { - return getSessions({ agent: this, isFree: false }); - } + return -1; } - Agent.kCurrentStreamsCount = kCurrentStreamsCount; - Agent.kGracefullyClosing = kGracefullyClosing; + /** +@param {Uint8Array} array +@param {Uint8Array} value +@returns {boolean} +*/ + function includes(array, value) { + return indexOf(array, value) !== -1; + } - module.exports = { - Agent, - globalAgent: new Agent(), - }; + // EXTERNAL MODULE: external "node:crypto" + var external_node_crypto_ = __nccwpck_require__(7598); + // EXTERNAL MODULE: external "node:url" + var external_node_url_ = __nccwpck_require__(3136); // CONCATENATED MODULE: ./node_modules/is-stream/index.js + function isStream(stream, { checkOpen = true } = {}) { + return ( + stream !== null && + typeof stream === "object" && + (stream.writable || + stream.readable || + !checkOpen || + (stream.writable === undefined && stream.readable === undefined)) && + typeof stream.pipe === "function" + ); + } - /***/ - }, + function isWritableStream(stream, { checkOpen = true } = {}) { + return ( + isStream(stream, { checkOpen }) && + (stream.writable || !checkOpen) && + typeof stream.write === "function" && + typeof stream.end === "function" && + typeof stream.writable === "boolean" && + typeof stream.writableObjectMode === "boolean" && + typeof stream.destroy === "function" && + typeof stream.destroyed === "boolean" + ); + } - /***/ 7167: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + function isReadableStream(stream, { checkOpen = true } = {}) { + return ( + isStream(stream, { checkOpen }) && + (stream.readable || !checkOpen) && + typeof stream.read === "function" && + typeof stream.readable === "boolean" && + typeof stream.readableObjectMode === "boolean" && + typeof stream.destroy === "function" && + typeof stream.destroyed === "boolean" + ); + } - const http = __nccwpck_require__(3685); - const https = __nccwpck_require__(5687); - const resolveALPN = __nccwpck_require__(6624); - const QuickLRU = __nccwpck_require__(9273); - const Http2ClientRequest = __nccwpck_require__(9632); - const calculateServerName = __nccwpck_require__(1982); - const urlToOptions = __nccwpck_require__(2686); + function isDuplexStream(stream, options) { + return ( + isWritableStream(stream, options) && isReadableStream(stream, options) + ); + } - const cache = new QuickLRU({ maxSize: 100 }); - const queue = new Map(); + function isTransformStream(stream, options) { + return ( + isDuplexStream(stream, options) && + typeof stream._transform === "function" + ); + } // CONCATENATED MODULE: ./node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js - const installSocket = (agent, socket, options) => { - socket._httpMessage = { shouldKeepAlive: true }; + const a = Object.getPrototypeOf( + Object.getPrototypeOf( + /* istanbul ignore next */ + async function* () {}, + ).prototype, + ); + class c { + #t; + #n; + #r = !1; + #e = void 0; + constructor(e, t) { + ((this.#t = e), (this.#n = t)); + } + next() { + const e = () => this.#s(); + return ((this.#e = this.#e ? this.#e.then(e, e) : e()), this.#e); + } + return(e) { + const t = () => this.#i(e); + return this.#e ? this.#e.then(t, t) : t(); + } + async #s() { + if (this.#r) + return { + done: !0, + value: void 0, + }; + let e; + try { + e = await this.#t.read(); + } catch (t) { + throw ( + (this.#e = void 0), + (this.#r = !0), + this.#t.releaseLock(), + t + ); + } + return ( + e.done && + ((this.#e = void 0), (this.#r = !0), this.#t.releaseLock()), + e + ); + } + async #i(e) { + if (this.#r) + return { + done: !0, + value: e, + }; + if (((this.#r = !0), !this.#n)) { + const t = this.#t.cancel(e); + return ( + this.#t.releaseLock(), + await t, + { + done: !0, + value: e, + } + ); + } + return ( + this.#t.releaseLock(), + { + done: !0, + value: e, + } + ); + } + } + const n = Symbol(); + function i() { + return this[n].next(); + } + Object.defineProperty(i, "name", { value: "next" }); + function o(r) { + return this[n].return(r); + } + Object.defineProperty(o, "name", { value: "return" }); + const u = Object.create(a, { + next: { + enumerable: !0, + configurable: !0, + writable: !0, + value: i, + }, + return: { + enumerable: !0, + configurable: !0, + writable: !0, + value: o, + }, + }); + function h({ preventCancel: r = !1 } = {}) { + const e = this.getReader(), + t = new c(e, r), + s = Object.create(u); + return ((s[n] = t), s); + } // CONCATENATED MODULE: ./node_modules/@sec-ant/readable-stream/dist/ponyfill/index.js + // CONCATENATED MODULE: ./node_modules/cacheable-request/node_modules/get-stream/source/stream.js + + const getAsyncIterable = (stream) => { + if ( + isReadableStream(stream, { checkOpen: false }) && + nodeImports.on !== undefined + ) { + return getStreamIterable(stream); + } - const onFree = () => { - agent.emit("free", socket, options); - }; + if (typeof stream?.[Symbol.asyncIterator] === "function") { + return stream; + } - socket.on("free", onFree); + // `ReadableStream[Symbol.asyncIterator]` support is missing in multiple browsers, so we ponyfill it + if (stream_toString.call(stream) === "[object ReadableStream]") { + return h.call(stream); + } - const onClose = () => { - agent.removeSocket(socket, options); - }; + throw new TypeError( + "The first argument must be a Readable, a ReadableStream, or an async iterable.", + ); + }; - socket.on("close", onClose); + const { toString: stream_toString } = Object.prototype; - const onRemove = () => { - agent.removeSocket(socket, options); - socket.off("close", onClose); - socket.off("free", onFree); - socket.off("agentRemove", onRemove); - }; + // The default iterable for Node.js streams does not allow for multiple readers at once, so we re-implement it + const getStreamIterable = async function* (stream) { + const controller = new AbortController(); + const state = {}; + handleStreamEnd(stream, controller, state); - socket.on("agentRemove", onRemove); + try { + for await (const [chunk] of nodeImports.on(stream, "data", { + signal: controller.signal, + })) { + yield chunk; + } + } catch (error) { + // Stream failure, for example due to `stream.destroy(error)` + if (state.error !== undefined) { + throw state.error; + // `error` event directly emitted on stream + } else if (!controller.signal.aborted) { + throw error; + // Otherwise, stream completed successfully + } + // The `finally` block also runs when the caller throws, for example due to the `maxBuffer` option + } finally { + stream.destroy(); + } + }; - agent.emit("free", socket, options); + const handleStreamEnd = async (stream, controller, state) => { + try { + await nodeImports.finished(stream, { + cleanup: true, + readable: true, + writable: false, + error: false, + }); + } catch (error) { + state.error = error; + } finally { + controller.abort(); + } }; - const resolveProtocol = async (options) => { - const name = `${options.host}:${ - options.port - }:${options.ALPNProtocols.sort()}`; + // Loaded by the Node entrypoint, but not by the browser one. + // This prevents using dynamic imports. + const nodeImports = {}; // CONCATENATED MODULE: ./node_modules/cacheable-request/node_modules/get-stream/source/contents.js + + const getStreamContents = async ( + stream, + { + init, + convertChunk, + getSize, + truncateChunk, + addChunk, + getFinalChunk, + finalize, + }, + { maxBuffer = Number.POSITIVE_INFINITY } = {}, + ) => { + const asyncIterable = getAsyncIterable(stream); + + const state = init(); + state.length = 0; - if (!cache.has(name)) { - if (queue.has(name)) { - const result = await queue.get(name); - return result.alpnProtocol; + try { + for await (const chunk of asyncIterable) { + const chunkType = getChunkType(chunk); + const convertedChunk = convertChunk[chunkType](chunk, state); + appendChunk({ + convertedChunk, + state, + getSize, + truncateChunk, + addChunk, + maxBuffer, + }); } - const { path, agent } = options; - options.path = options.socketPath; + appendFinalChunk({ + state, + convertChunk, + getSize, + truncateChunk, + addChunk, + getFinalChunk, + maxBuffer, + }); + return finalize(state); + } catch (error) { + const normalizedError = + typeof error === "object" && error !== null + ? error + : new Error(error); + normalizedError.bufferedData = finalize(state); + throw normalizedError; + } + }; - const resultPromise = resolveALPN(options); - queue.set(name, resultPromise); + const appendFinalChunk = ({ + state, + getSize, + truncateChunk, + addChunk, + getFinalChunk, + maxBuffer, + }) => { + const convertedChunk = getFinalChunk(state); + if (convertedChunk !== undefined) { + appendChunk({ + convertedChunk, + state, + getSize, + truncateChunk, + addChunk, + maxBuffer, + }); + } + }; - try { - const { socket, alpnProtocol } = await resultPromise; - cache.set(name, alpnProtocol); + const appendChunk = ({ + convertedChunk, + state, + getSize, + truncateChunk, + addChunk, + maxBuffer, + }) => { + const chunkSize = getSize(convertedChunk); + const newLength = state.length + chunkSize; - options.path = path; + if (newLength <= maxBuffer) { + addNewChunk(convertedChunk, state, addChunk, newLength); + return; + } - if (alpnProtocol === "h2") { - // https://github.com/nodejs/node/issues/33343 - socket.destroy(); - } else { - const { globalAgent } = https; - const defaultCreateConnection = - https.Agent.prototype.createConnection; + const truncatedChunk = truncateChunk( + convertedChunk, + maxBuffer - state.length, + ); - if (agent) { - if (agent.createConnection === defaultCreateConnection) { - installSocket(agent, socket, options); - } else { - socket.destroy(); - } - } else if ( - globalAgent.createConnection === defaultCreateConnection - ) { - installSocket(globalAgent, socket, options); - } else { - socket.destroy(); - } - } + if (truncatedChunk !== undefined) { + addNewChunk(truncatedChunk, state, addChunk, maxBuffer); + } - queue.delete(name); + throw new MaxBufferError(); + }; - return alpnProtocol; - } catch (error) { - queue.delete(name); + const addNewChunk = (convertedChunk, state, addChunk, newLength) => { + state.contents = addChunk(convertedChunk, state, newLength); + state.length = newLength; + }; - throw error; - } + const getChunkType = (chunk) => { + const typeOfChunk = typeof chunk; + + if (typeOfChunk === "string") { + return "string"; } - return cache.get(name); - }; + if (typeOfChunk !== "object" || chunk === null) { + return "others"; + } - module.exports = async (input, options, callback) => { - if (typeof input === "string" || input instanceof URL) { - input = urlToOptions(new URL(input)); + if (globalThis.Buffer?.isBuffer(chunk)) { + return "buffer"; } - if (typeof options === "function") { - callback = options; - options = undefined; + const prototypeName = contents_objectToString.call(chunk); + + if (prototypeName === "[object ArrayBuffer]") { + return "arrayBuffer"; } - options = { - ALPNProtocols: ["h2", "http/1.1"], - ...input, - ...options, - resolveSocket: true, - }; + if (prototypeName === "[object DataView]") { + return "dataView"; + } if ( - !Array.isArray(options.ALPNProtocols) || - options.ALPNProtocols.length === 0 + Number.isInteger(chunk.byteLength) && + Number.isInteger(chunk.byteOffset) && + contents_objectToString.call(chunk.buffer) === "[object ArrayBuffer]" ) { - throw new Error( - "The `ALPNProtocols` option must be an Array with at least one entry" - ); + return "typedArray"; } - options.protocol = options.protocol || "https:"; - const isHttps = options.protocol === "https:"; - - options.host = options.hostname || options.host || "localhost"; - options.session = options.tlsSession; - options.servername = options.servername || calculateServerName(options); - options.port = options.port || (isHttps ? 443 : 80); - options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent; + return "others"; + }; - const agents = options.agent; + const { toString: contents_objectToString } = Object.prototype; - if (agents) { - if (agents.addRequest) { - throw new Error( - "The `options.agent` object can contain only `http`, `https` or `http2` properties" - ); - } + class MaxBufferError extends Error { + name = "MaxBufferError"; - options.agent = agents[isHttps ? "https" : "http"]; + constructor() { + super("maxBuffer exceeded"); } + } // CONCATENATED MODULE: ./node_modules/cacheable-request/node_modules/get-stream/source/utils.js - if (isHttps) { - const protocol = await resolveProtocol(options); + const identity = (value) => value; - if (protocol === "h2") { - if (agents) { - options.agent = agents.http2; - } + const noop = () => undefined; - return new Http2ClientRequest(options, callback); - } - } + const getContentsProperty = ({ contents }) => contents; - return http.request(options, callback); + const throwObjectStream = (chunk) => { + throw new Error( + `Streams in object mode are not supported: ${String(chunk)}`, + ); }; - module.exports.protocolCache = cache; - - /***/ - }, + const getLengthProperty = (convertedChunk) => convertedChunk.length; // CONCATENATED MODULE: ./node_modules/cacheable-request/node_modules/get-stream/source/array-buffer.js - /***/ 9632: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + async function getStreamAsArrayBuffer(stream, options) { + return getStreamContents(stream, arrayBufferMethods, options); + } - const http2 = __nccwpck_require__(5158); - const { Writable } = __nccwpck_require__(2781); - const { Agent, globalAgent } = __nccwpck_require__(9898); - const IncomingMessage = __nccwpck_require__(2575); - const urlToOptions = __nccwpck_require__(2686); - const proxyEvents = __nccwpck_require__(1818); - const isRequestPseudoHeader = __nccwpck_require__(1199); - const { - ERR_INVALID_ARG_TYPE, - ERR_INVALID_PROTOCOL, - ERR_HTTP_HEADERS_SENT, - ERR_INVALID_HTTP_TOKEN, - ERR_HTTP_INVALID_HEADER_VALUE, - ERR_INVALID_CHAR, - } = __nccwpck_require__(7087); + const initArrayBuffer = () => ({ contents: new ArrayBuffer(0) }); - const { - HTTP2_HEADER_STATUS, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_METHOD_CONNECT, - } = http2.constants; + const useTextEncoder = (chunk) => array_buffer_textEncoder.encode(chunk); + const array_buffer_textEncoder = new TextEncoder(); - const kHeaders = Symbol("headers"); - const kOrigin = Symbol("origin"); - const kSession = Symbol("session"); - const kOptions = Symbol("options"); - const kFlushedHeaders = Symbol("flushedHeaders"); - const kJobs = Symbol("jobs"); + const useUint8Array = (chunk) => new Uint8Array(chunk); - const isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/; - const isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/; + const useUint8ArrayWithOffset = (chunk) => + new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); - class ClientRequest extends Writable { - constructor(input, options, callback) { - super({ - autoDestroy: false, - }); + const truncateArrayBufferChunk = (convertedChunk, chunkSize) => + convertedChunk.slice(0, chunkSize); - const hasInput = typeof input === "string" || input instanceof URL; - if (hasInput) { - input = urlToOptions(input instanceof URL ? input : new URL(input)); - } + // `contents` is an increasingly growing `Uint8Array`. + const addArrayBufferChunk = ( + convertedChunk, + { contents, length: previousLength }, + length, + ) => { + const newContents = hasArrayBufferResize() + ? resizeArrayBuffer(contents, length) + : resizeArrayBufferSlow(contents, length); + new Uint8Array(newContents).set(convertedChunk, previousLength); + return newContents; + }; - if (typeof options === "function" || options === undefined) { - // (options, callback) - callback = options; - options = hasInput ? input : { ...input }; - } else { - // (input, options, callback) - options = { ...input, ...options }; - } + // Without `ArrayBuffer.resize()`, `contents` size is always a power of 2. + // This means its last bytes are zeroes (not stream data), which need to be + // trimmed at the end with `ArrayBuffer.slice()`. + const resizeArrayBufferSlow = (contents, length) => { + if (length <= contents.byteLength) { + return contents; + } - if (options.h2session) { - this[kSession] = options.h2session; - } else if (options.agent === false) { - this.agent = new Agent({ maxFreeSessions: 0 }); - } else if ( - typeof options.agent === "undefined" || - options.agent === null - ) { - if (typeof options.createConnection === "function") { - // This is a workaround - we don't have to create the session on our own. - this.agent = new Agent({ maxFreeSessions: 0 }); - this.agent.createConnection = options.createConnection; - } else { - this.agent = globalAgent; - } - } else if (typeof options.agent.request === "function") { - this.agent = options.agent; - } else { - throw new ERR_INVALID_ARG_TYPE( - "options.agent", - ["Agent-like Object", "undefined", "false"], - options.agent - ); - } + const arrayBuffer = new ArrayBuffer(getNewContentsLength(length)); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; + }; - if (options.protocol && options.protocol !== "https:") { - throw new ERR_INVALID_PROTOCOL(options.protocol, "https:"); - } + // With `ArrayBuffer.resize()`, `contents` size matches exactly the size of + // the stream data. It does not include extraneous zeroes to trim at the end. + // The underlying `ArrayBuffer` does allocate a number of bytes that is a power + // of 2, but those bytes are only visible after calling `ArrayBuffer.resize()`. + const resizeArrayBuffer = (contents, length) => { + if (length <= contents.maxByteLength) { + contents.resize(length); + return contents; + } - const port = - options.port || - options.defaultPort || - (this.agent && this.agent.defaultPort) || - 443; - const host = options.hostname || options.host || "localhost"; + const arrayBuffer = new ArrayBuffer(length, { + maxByteLength: getNewContentsLength(length), + }); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; + }; - // Don't enforce the origin via options. It may be changed in an Agent. - delete options.hostname; - delete options.host; - delete options.port; + // Retrieve the closest `length` that is both >= and a power of 2 + const getNewContentsLength = (length) => + SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR)); + + const SCALE_FACTOR = 2; + + const finalizeArrayBuffer = ({ contents, length }) => + hasArrayBufferResize() ? contents : contents.slice(0, length); + + // `ArrayBuffer.slice()` is slow. When `ArrayBuffer.resize()` is available + // (Node >=20.0.0, Safari >=16.4 and Chrome), we can use it instead. + // eslint-disable-next-line no-warning-comments + // TODO: remove after dropping support for Node 20. + // eslint-disable-next-line no-warning-comments + // TODO: use `ArrayBuffer.transferToFixedLength()` instead once it is available + const hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype; + + const arrayBufferMethods = { + init: initArrayBuffer, + convertChunk: { + string: useTextEncoder, + buffer: useUint8Array, + arrayBuffer: useUint8Array, + dataView: useUint8ArrayWithOffset, + typedArray: useUint8ArrayWithOffset, + others: throwObjectStream, + }, + getSize: getLengthProperty, + truncateChunk: truncateArrayBufferChunk, + addChunk: addArrayBufferChunk, + getFinalChunk: noop, + finalize: finalizeArrayBuffer, + }; // CONCATENATED MODULE: ./node_modules/cacheable-request/node_modules/get-stream/source/buffer.js - const { timeout } = options; - options.timeout = undefined; + async function getStreamAsBuffer(stream, options) { + if (!("Buffer" in globalThis)) { + throw new Error("getStreamAsBuffer() is only supported in Node.js"); + } - this[kHeaders] = Object.create(null); - this[kJobs] = []; + try { + return arrayBufferToNodeBuffer( + await getStreamAsArrayBuffer(stream, options), + ); + } catch (error) { + if (error.bufferedData !== undefined) { + error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData); + } - this.socket = null; - this.connection = null; + throw error; + } + } - this.method = options.method || "GET"; - this.path = options.path; + const arrayBufferToNodeBuffer = (arrayBuffer) => + globalThis.Buffer.from(arrayBuffer); - this.res = null; - this.aborted = false; - this.reusedSocket = false; + // EXTERNAL MODULE: ./node_modules/http-cache-semantics/index.js + var http_cache_semantics = __nccwpck_require__(2203); // CONCATENATED MODULE: external "buffer" + const external_buffer_namespaceObject = require("buffer"); // CONCATENATED MODULE: ./node_modules/@keyv/serialize/dist/index.js + // src/index.ts - if (options.headers) { - for (const [header, value] of Object.entries(options.headers)) { - this.setHeader(header, value); + var _serialize = (data, escapeColonStrings = true) => { + if (data === void 0 || data === null) { + return "null"; + } + if (typeof data === "string") { + return JSON.stringify( + escapeColonStrings && data.startsWith(":") ? `:${data}` : data, + ); + } + if (external_buffer_namespaceObject.Buffer.isBuffer(data)) { + return JSON.stringify(`:base64:${data.toString("base64")}`); + } + if (data?.toJSON) { + data = data.toJSON(); + } + if (typeof data === "object") { + let s = ""; + const array = Array.isArray(data); + s = array ? "[" : "{"; + let first = true; + for (const k in data) { + const ignore = + typeof data[k] === "function" || (!array && data[k] === void 0); + if (!Object.hasOwn(data, k) || ignore) { + continue; + } + if (!first) { + s += ","; + } + first = false; + if (array) { + s += _serialize(data[k], escapeColonStrings); + } else if (data[k] !== void 0) { + s += `${_serialize(k, false)}:${_serialize(data[k], escapeColonStrings)}`; } } - - if (options.auth && !("authorization" in this[kHeaders])) { - this[kHeaders].authorization = - "Basic " + Buffer.from(options.auth).toString("base64"); + s += array ? "]" : "}"; + return s; + } + return JSON.stringify(data); + }; + var defaultSerialize = (data) => { + return _serialize(data, true); + }; + var defaultDeserialize = (data) => + JSON.parse(data, (_, value) => { + if (typeof value === "string") { + if (value.startsWith(":base64:")) { + return external_buffer_namespaceObject.Buffer.from( + value.slice(8), + "base64", + ); + } + return value.startsWith(":") ? value.slice(1) : value; } + return value; + }); // CONCATENATED MODULE: ./node_modules/cacheable-request/node_modules/keyv/dist/index.js - options.session = options.tlsSession; - options.path = options.socketPath; - - this[kOptions] = options; - - // Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field. - if (port === 443) { - this[kOrigin] = `https://${host}`; + // src/index.ts - if (!(":authority" in this[kHeaders])) { - this[kHeaders][":authority"] = host; + // src/event-manager.ts + var EventManager = class { + _eventListeners; + _maxListeners; + constructor() { + this._eventListeners = /* @__PURE__ */ new Map(); + this._maxListeners = 100; + } + maxListeners() { + return this._maxListeners; + } + // Add an event listener + addListener(event, listener) { + this.on(event, listener); + } + on(event, listener) { + if (!this._eventListeners.has(event)) { + this._eventListeners.set(event, []); + } + const listeners = this._eventListeners.get(event); + if (listeners) { + if (listeners.length >= this._maxListeners) { + console.warn( + `MaxListenersExceededWarning: Possible event memory leak detected. ${listeners.length + 1} ${event} listeners added. Use setMaxListeners() to increase limit.`, + ); + } + listeners.push(listener); + } + return this; + } + // Remove an event listener + removeListener(event, listener) { + this.off(event, listener); + } + off(event, listener) { + const listeners = this._eventListeners.get(event) ?? []; + const index = listeners.indexOf(listener); + if (index !== -1) { + listeners.splice(index, 1); + } + if (listeners.length === 0) { + this._eventListeners.delete(event); + } + } + once(event, listener) { + const onceListener = (...arguments_) => { + listener(...arguments_); + this.off(event, onceListener); + }; + this.on(event, onceListener); + } + // Emit an event + // biome-ignore lint/suspicious/noExplicitAny: type format + emit(event, ...arguments_) { + const listeners = this._eventListeners.get(event); + if (listeners && listeners.length > 0) { + for (const listener of listeners) { + listener(...arguments_); } + } + } + // Get all listeners for a specific event + listeners(event) { + return this._eventListeners.get(event) ?? []; + } + // Remove all listeners for a specific event + removeAllListeners(event) { + if (event) { + this._eventListeners.delete(event); } else { - this[kOrigin] = `https://${host}:${port}`; + this._eventListeners.clear(); + } + } + // Set the maximum number of listeners for a single event + setMaxListeners(n) { + this._maxListeners = n; + } + }; + var event_manager_default = EventManager; - if (!(":authority" in this[kHeaders])) { - this[kHeaders][":authority"] = `${host}:${port}`; + // src/hooks-manager.ts + var HooksManager = class extends event_manager_default { + _hookHandlers; + constructor() { + super(); + this._hookHandlers = /* @__PURE__ */ new Map(); + } + // Adds a handler function for a specific event + addHandler(event, handler) { + const eventHandlers = this._hookHandlers.get(event); + if (eventHandlers) { + eventHandlers.push(handler); + } else { + this._hookHandlers.set(event, [handler]); + } + } + // Removes a specific handler function for a specific event + removeHandler(event, handler) { + const eventHandlers = this._hookHandlers.get(event); + if (eventHandlers) { + const index = eventHandlers.indexOf(handler); + if (index !== -1) { + eventHandlers.splice(index, 1); } } - - if (timeout) { - this.setTimeout(timeout); + } + // Triggers all handlers for a specific event with provided data + // biome-ignore lint/suspicious/noExplicitAny: type format + trigger(event, data) { + const eventHandlers = this._hookHandlers.get(event); + if (eventHandlers) { + for (const handler of eventHandlers) { + try { + handler(data); + } catch (error) { + this.emit( + "error", + new Error( + `Error in hook handler for event "${event}": ${error.message}`, + ), + ); + } + } } - - if (callback) { - this.once("response", callback); + } + // Provides read-only access to the current handlers + get handlers() { + return new Map(this._hookHandlers); + } + }; + var hooks_manager_default = HooksManager; + + // src/stats-manager.ts + var StatsManager = class extends event_manager_default { + enabled = true; + hits = 0; + misses = 0; + sets = 0; + deletes = 0; + errors = 0; + constructor(enabled) { + super(); + if (enabled !== void 0) { + this.enabled = enabled; } - - this[kFlushedHeaders] = false; + this.reset(); } - - get method() { - return this[kHeaders][HTTP2_HEADER_METHOD]; + hit() { + if (this.enabled) { + this.hits++; + } } - - set method(value) { - if (value) { - this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase(); + miss() { + if (this.enabled) { + this.misses++; } } - - get path() { - return this[kHeaders][HTTP2_HEADER_PATH]; + set() { + if (this.enabled) { + this.sets++; + } } - - set path(value) { - if (value) { - this[kHeaders][HTTP2_HEADER_PATH] = value; + delete() { + if (this.enabled) { + this.deletes++; } } - - get _mustNotHaveABody() { + hitsOrMisses(array) { + for (const item of array) { + if (item === void 0) { + this.miss(); + } else { + this.hit(); + } + } + } + reset() { + this.hits = 0; + this.misses = 0; + this.sets = 0; + this.deletes = 0; + this.errors = 0; + } + }; + var stats_manager_default = StatsManager; + + // src/index.ts + var KeyvHooks = /* @__PURE__ */ ((KeyvHooks2) => { + KeyvHooks2["PRE_SET"] = "preSet"; + KeyvHooks2["POST_SET"] = "postSet"; + KeyvHooks2["PRE_GET"] = "preGet"; + KeyvHooks2["POST_GET"] = "postGet"; + KeyvHooks2["PRE_GET_MANY"] = "preGetMany"; + KeyvHooks2["POST_GET_MANY"] = "postGetMany"; + KeyvHooks2["PRE_GET_RAW"] = "preGetRaw"; + KeyvHooks2["POST_GET_RAW"] = "postGetRaw"; + KeyvHooks2["PRE_GET_MANY_RAW"] = "preGetManyRaw"; + KeyvHooks2["POST_GET_MANY_RAW"] = "postGetManyRaw"; + KeyvHooks2["PRE_DELETE"] = "preDelete"; + KeyvHooks2["POST_DELETE"] = "postDelete"; + return KeyvHooks2; + })(KeyvHooks || {}); + var iterableAdapters = [ + "sqlite", + "postgres", + "mysql", + "mongo", + "redis", + "valkey", + "etcd", + ]; + var Keyv = class extends event_manager_default { + opts; + iterator; + hooks = new hooks_manager_default(); + stats = new stats_manager_default(false); + /** + * Time to live in milliseconds + */ + _ttl; + /** + * Namespace + */ + _namespace; + /** + * Store + */ + // biome-ignore lint/suspicious/noExplicitAny: type format + _store = /* @__PURE__ */ new Map(); + _serialize = defaultSerialize; + _deserialize = defaultDeserialize; + _compression; + _useKeyPrefix = true; + _throwOnErrors = false; + /** + * Keyv Constructor + * @param {KeyvStoreAdapter | KeyvOptions} store + * @param {Omit} [options] if you provide the store you can then provide the Keyv Options + */ + constructor(store, options) { + super(); + options ??= {}; + store ??= {}; + this.opts = { + namespace: "keyv", + serialize: defaultSerialize, + deserialize: defaultDeserialize, + emitErrors: true, + // @ts-expect-error - Map is not a KeyvStoreAdapter + store: /* @__PURE__ */ new Map(), + ...options, + }; + if (store && store.get) { + this.opts.store = store; + } else { + this.opts = { + ...this.opts, + ...store, + }; + } + this._store = this.opts.store ?? /* @__PURE__ */ new Map(); + this._compression = this.opts.compression; + this._serialize = this.opts.serialize; + this._deserialize = this.opts.deserialize; + if (this.opts.namespace) { + this._namespace = this.opts.namespace; + } + if (this._store) { + if (!this._isValidStorageAdapter(this._store)) { + throw new Error("Invalid storage adapter"); + } + if (typeof this._store.on === "function") { + this._store.on("error", (error) => this.emit("error", error)); + } + this._store.namespace = this._namespace; + if ( + typeof this._store[Symbol.iterator] === "function" && + this._store instanceof Map + ) { + this.iterator = this.generateIterator(this._store); + } else if ( + "iterator" in this._store && + this._store.opts && + this._checkIterableAdapter() + ) { + this.iterator = this.generateIterator( + // biome-ignore lint/style/noNonNullAssertion: need to fix + this._store.iterator.bind(this._store), + ); + } + } + if (this.opts.stats) { + this.stats.enabled = this.opts.stats; + } + if (this.opts.ttl) { + this._ttl = this.opts.ttl; + } + if (this.opts.useKeyPrefix !== void 0) { + this._useKeyPrefix = this.opts.useKeyPrefix; + } + if (this.opts.throwOnErrors !== void 0) { + this._throwOnErrors = this.opts.throwOnErrors; + } + } + /** + * Get the current store + */ + // biome-ignore lint/suspicious/noExplicitAny: type format + get store() { + return this._store; + } + /** + * Set the current store. This will also set the namespace, event error handler, and generate the iterator. If the store is not valid it will throw an error. + * @param {KeyvStoreAdapter | Map | any} store the store to set + */ + // biome-ignore lint/suspicious/noExplicitAny: type format + set store(store) { + if (this._isValidStorageAdapter(store)) { + this._store = store; + this.opts.store = store; + if (typeof store.on === "function") { + store.on("error", (error) => this.emit("error", error)); + } + if (this._namespace) { + this._store.namespace = this._namespace; + } + if ( + typeof store[Symbol.iterator] === "function" && + store instanceof Map + ) { + this.iterator = this.generateIterator(store); + } else if ( + "iterator" in store && + store.opts && + this._checkIterableAdapter() + ) { + this.iterator = this.generateIterator( + store.iterator?.bind(store), + ); + } + } else { + throw new Error("Invalid storage adapter"); + } + } + /** + * Get the current compression function + * @returns {CompressionAdapter} The current compression function + */ + get compression() { + return this._compression; + } + /** + * Set the current compression function + * @param {CompressionAdapter} compress The compression function to set + */ + set compression(compress) { + this._compression = compress; + } + /** + * Get the current namespace. + * @returns {string | undefined} The current namespace. + */ + get namespace() { + return this._namespace; + } + /** + * Set the current namespace. + * @param {string | undefined} namespace The namespace to set. + */ + set namespace(namespace) { + this._namespace = namespace; + this.opts.namespace = namespace; + this._store.namespace = namespace; + if (this.opts.store) { + this.opts.store.namespace = namespace; + } + } + /** + * Get the current TTL. + * @returns {number} The current TTL in milliseconds. + */ + get ttl() { + return this._ttl; + } + /** + * Set the current TTL. + * @param {number} ttl The TTL to set in milliseconds. + */ + set ttl(ttl) { + this.opts.ttl = ttl; + this._ttl = ttl; + } + /** + * Get the current serialize function. + * @returns {Serialize} The current serialize function. + */ + get serialize() { + return this._serialize; + } + /** + * Set the current serialize function. + * @param {Serialize} serialize The serialize function to set. + */ + set serialize(serialize) { + this.opts.serialize = serialize; + this._serialize = serialize; + } + /** + * Get the current deserialize function. + * @returns {Deserialize} The current deserialize function. + */ + get deserialize() { + return this._deserialize; + } + /** + * Set the current deserialize function. + * @param {Deserialize} deserialize The deserialize function to set. + */ + set deserialize(deserialize) { + this.opts.deserialize = deserialize; + this._deserialize = deserialize; + } + /** + * Get the current useKeyPrefix value. This will enable or disable key prefixing. + * @returns {boolean} The current useKeyPrefix value. + * @default true + */ + get useKeyPrefix() { + return this._useKeyPrefix; + } + /** + * Set the current useKeyPrefix value. This will enable or disable key prefixing. + * @param {boolean} value The useKeyPrefix value to set. + */ + set useKeyPrefix(value) { + this._useKeyPrefix = value; + this.opts.useKeyPrefix = value; + } + /** + * Get the current throwErrors value. This will enable or disable throwing errors on methods in addition to emitting them. + * @return {boolean} The current throwOnErrors value. + */ + get throwOnErrors() { + return this._throwOnErrors; + } + /** + * Set the current throwOnErrors value. This will enable or disable throwing errors on methods in addition to emitting them. + * @param {boolean} value The throwOnErrors value to set. + */ + set throwOnErrors(value) { + this._throwOnErrors = value; + this.opts.throwOnErrors = value; + } + generateIterator(iterator) { + const function_ = async function* () { + for await (const [key, raw] of typeof iterator === "function" + ? iterator(this._store.namespace) + : iterator) { + const data = await this.deserializeData(raw); + if ( + this._useKeyPrefix && + this._store.namespace && + !key.includes(this._store.namespace) + ) { + continue; + } + if ( + typeof data.expires === "number" && + Date.now() > data.expires + ) { + await this.delete(key); + continue; + } + yield [this._getKeyUnprefix(key), data.value]; + } + }; + return function_.bind(this); + } + _checkIterableAdapter() { return ( - this.method === "GET" || - this.method === "HEAD" || - this.method === "DELETE" + iterableAdapters.includes(this._store.opts.dialect) || + iterableAdapters.some((element) => + this._store.opts.url.includes(element), + ) ); } - - _write(chunk, encoding, callback) { - // https://github.com/nodejs/node/blob/654df09ae0c5e17d1b52a900a545f0664d8c7627/lib/internal/http2/util.js#L148-L156 - if (this._mustNotHaveABody) { - callback( - new Error("The GET, HEAD and DELETE methods must NOT have a body") - ); - /* istanbul ignore next: Node.js 12 throws directly */ - return; + _getKeyPrefix(key) { + if (!this._useKeyPrefix) { + return key; } - - this.flushHeaders(); - - const callWrite = () => - this._request.write(chunk, encoding, callback); - if (this._request) { - callWrite(); - } else { - this[kJobs].push(callWrite); + if (!this._namespace) { + return key; + } + if (key.startsWith(`${this._namespace}:`)) { + return key; + } + return `${this._namespace}:${key}`; + } + _getKeyPrefixArray(keys) { + if (!this._useKeyPrefix) { + return keys; + } + if (!this._namespace) { + return keys; } + return keys.map((key) => `${this._namespace}:${key}`); } - - _final(callback) { - if (this.destroyed) { - return; + _getKeyUnprefix(key) { + if (!this._useKeyPrefix) { + return key; } - - this.flushHeaders(); - - const callEnd = () => { - // For GET, HEAD and DELETE - if (this._mustNotHaveABody) { - callback(); - return; + return key.split(":").splice(1).join(":"); + } + // biome-ignore lint/suspicious/noExplicitAny: type format + _isValidStorageAdapter(store) { + return ( + store instanceof Map || + (typeof store.get === "function" && + typeof store.set === "function" && + typeof store.delete === "function" && + typeof store.clear === "function") + ); + } + // eslint-disable-next-line @stylistic/max-len + async get(key, options) { + const { store } = this.opts; + const isArray = Array.isArray(key); + const keyPrefixed = isArray + ? this._getKeyPrefixArray(key) + : this._getKeyPrefix(key); + const isDataExpired = (data) => + typeof data.expires === "number" && Date.now() > data.expires; + if (isArray) { + if (options?.raw === true) { + return this.getMany(key, { raw: true }); } - - this._request.end(callback); - }; - - if (this._request) { - callEnd(); - } else { - this[kJobs].push(callEnd); + return this.getMany(key, { raw: false }); } - } - - abort() { - if (this.res && this.res.complete) { - return; + this.hooks.trigger("preGet" /* PRE_GET */, { key: keyPrefixed }); + let rawData; + try { + rawData = await store.get(keyPrefixed); + } catch (error) { + if (this.throwOnErrors) { + throw error; + } } - - if (!this.aborted) { - process.nextTick(() => this.emit("abort")); + const deserializedData = + typeof rawData === "string" || this.opts.compression + ? await this.deserializeData(rawData) + : rawData; + if (deserializedData === void 0 || deserializedData === null) { + this.hooks.trigger("postGet" /* POST_GET */, { + key: keyPrefixed, + value: void 0, + }); + this.stats.miss(); + return void 0; + } + if (isDataExpired(deserializedData)) { + await this.delete(key); + this.hooks.trigger("postGet" /* POST_GET */, { + key: keyPrefixed, + value: void 0, + }); + this.stats.miss(); + return void 0; } - - this.aborted = true; - - this.destroy(); + this.hooks.trigger("postGet" /* POST_GET */, { + key: keyPrefixed, + value: deserializedData, + }); + this.stats.hit(); + return options?.raw ? deserializedData : deserializedData.value; } - - _destroy(error, callback) { - if (this.res) { - this.res._dump(); + async getMany(keys, options) { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefixArray(keys); + const isDataExpired = (data) => + typeof data.expires === "number" && Date.now() > data.expires; + this.hooks.trigger("preGetMany" /* PRE_GET_MANY */, { + keys: keyPrefixed, + }); + if (store.getMany === void 0) { + const promises = keyPrefixed.map(async (key) => { + const rawData2 = await store.get(key); + const deserializedRow = + typeof rawData2 === "string" || this.opts.compression + ? await this.deserializeData(rawData2) + : rawData2; + if (deserializedRow === void 0 || deserializedRow === null) { + return void 0; + } + if (isDataExpired(deserializedRow)) { + await this.delete(key); + return void 0; + } + return options?.raw ? deserializedRow : deserializedRow.value; + }); + const deserializedRows = await Promise.allSettled(promises); + const result2 = deserializedRows.map( + // biome-ignore lint/suspicious/noExplicitAny: type format + (row) => row.value, + ); + this.hooks.trigger("postGetMany" /* POST_GET_MANY */, result2); + if (result2.length > 0) { + this.stats.hit(); + } + return result2; + } + const rawData = await store.getMany(keyPrefixed); + const result = []; + const expiredKeys = []; + for (const index in rawData) { + let row = rawData[index]; + if (typeof row === "string") { + row = await this.deserializeData(row); + } + if (row === void 0 || row === null) { + result.push(void 0); + continue; + } + if (isDataExpired(row)) { + expiredKeys.push(keys[index]); + result.push(void 0); + continue; + } + const value = options?.raw ? row : row.value; + result.push(value); } - - if (this._request) { - this._request.destroy(); + if (expiredKeys.length > 0) { + await this.deleteMany(expiredKeys); } - - callback(error); + this.hooks.trigger("postGetMany" /* POST_GET_MANY */, result); + if (result.length > 0) { + this.stats.hit(); + } + return result; } - - async flushHeaders() { - if (this[kFlushedHeaders] || this.destroyed) { - return; + /** + * Get the raw value of a key. This is the replacement for setting raw to true in the get() method. + * @param {string} key the key to get + * @returns {Promise | undefined>} will return a StoredDataRaw or undefined if the key does not exist or is expired. + */ + async getRaw(key) { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefix(key); + this.hooks.trigger("preGetRaw" /* PRE_GET_RAW */, { + key: keyPrefixed, + }); + const rawData = await store.get(keyPrefixed); + if (rawData === void 0 || rawData === null) { + this.hooks.trigger("postGetRaw" /* POST_GET_RAW */, { + key: keyPrefixed, + value: void 0, + }); + this.stats.miss(); + return void 0; } - - this[kFlushedHeaders] = true; - - const isConnectMethod = this.method === HTTP2_METHOD_CONNECT; - - // The real magic is here - const onStream = (stream) => { - this._request = stream; - - if (this.destroyed) { - stream.destroy(); - return; + const deserializedData = + typeof rawData === "string" || this.opts.compression + ? await this.deserializeData(rawData) + : rawData; + if ( + deserializedData !== void 0 && + deserializedData.expires !== void 0 && + deserializedData.expires !== null && // biome-ignore lint/style/noNonNullAssertion: need to fix + deserializedData.expires < Date.now() + ) { + this.hooks.trigger("postGetRaw" /* POST_GET_RAW */, { + key: keyPrefixed, + value: void 0, + }); + this.stats.miss(); + await this.delete(key); + return void 0; + } + this.stats.hit(); + this.hooks.trigger("postGetRaw" /* POST_GET_RAW */, { + key: keyPrefixed, + value: deserializedData, + }); + return deserializedData; + } + /** + * Get the raw values of many keys. This is the replacement for setting raw to true in the getMany() method. + * @param {string[]} keys the keys to get + * @returns {Promise>>} will return an array of StoredDataRaw or undefined if the key does not exist or is expired. + */ + async getManyRaw(keys) { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefixArray(keys); + if (keys.length === 0) { + const result2 = Array.from({ length: keys.length }).fill(void 0); + this.stats.misses += keys.length; + this.hooks.trigger("postGetManyRaw" /* POST_GET_MANY_RAW */, { + keys: keyPrefixed, + values: result2, + }); + return result2; + } + let result = []; + if (store.getMany === void 0) { + const promises = keyPrefixed.map(async (key) => { + const rawData = await store.get(key); + if (rawData !== void 0 && rawData !== null) { + return this.deserializeData(rawData); + } + return void 0; + }); + const deserializedRows = await Promise.allSettled(promises); + result = deserializedRows.map( + // biome-ignore lint/suspicious/noExplicitAny: type format + (row) => row.value, + ); + } else { + const rawData = await store.getMany(keyPrefixed); + for (const row of rawData) { + if (row !== void 0 && row !== null) { + result.push(await this.deserializeData(row)); + } else { + result.push(void 0); + } } - - // Forwards `timeout`, `continue`, `close` and `error` events to this instance. - if (!isConnectMethod) { - proxyEvents(stream, this, [ - "timeout", - "continue", - "close", - "error", - ]); + } + const expiredKeys = []; + const isDataExpired = (data) => + typeof data.expires === "number" && Date.now() > data.expires; + for (const [index, row] of result.entries()) { + if (row !== void 0 && isDataExpired(row)) { + expiredKeys.push(keyPrefixed[index]); + result[index] = void 0; } - - // Wait for the `finish` event. We don't want to emit the `response` event - // before `request.end()` is called. - const waitForEnd = (fn) => { - return (...args) => { - if (!this.writable && !this.destroyed) { - fn(...args); - } else { - this.once("finish", () => { - fn(...args); - }); - } - }; - }; - - // This event tells we are ready to listen for the data. - stream.once( - "response", - waitForEnd((headers, flags, rawHeaders) => { - // If we were to emit raw request stream, it would be as fast as the native approach. - // Note that wrapping the raw stream in a Proxy instance won't improve the performance (already tested it). - const response = new IncomingMessage( - this.socket, - stream.readableHighWaterMark - ); - this.res = response; - - response.req = this; - response.statusCode = headers[HTTP2_HEADER_STATUS]; - response.headers = headers; - response.rawHeaders = rawHeaders; - - response.once("end", () => { - if (this.aborted) { - response.aborted = true; - response.emit("aborted"); - } else { - response.complete = true; - - // Has no effect, just be consistent with the Node.js behavior - response.socket = null; - response.connection = null; - } - }); - - if (isConnectMethod) { - response.upgrade = true; - - // The HTTP1 API says the socket is detached here, - // but we can't do that so we pass the original HTTP2 request. - if (this.emit("connect", response, stream, Buffer.alloc(0))) { - this.emit("close"); - } else { - // No listeners attached, destroy the original request. - stream.destroy(); - } - } else { - // Forwards data - stream.on("data", (chunk) => { - if (!response._dumped && !response.push(chunk)) { - stream.pause(); - } - }); - - stream.once("end", () => { - response.push(null); - }); - - if (!this.emit("response", response)) { - // No listeners attached, dump the response. - response._dump(); - } - } - }) - ); - - // Emits `information` event - stream.once( - "headers", - waitForEnd((headers) => - this.emit("information", { - statusCode: headers[HTTP2_HEADER_STATUS], - }) - ) - ); - - stream.once( - "trailers", - waitForEnd((trailers, flags, rawTrailers) => { - const { res } = this; - - // Assigns trailers to the response object. - res.trailers = trailers; - res.rawTrailers = rawTrailers; - }) + } + if (expiredKeys.length > 0) { + await this.deleteMany(expiredKeys); + } + this.stats.hitsOrMisses(result); + this.hooks.trigger("postGetManyRaw" /* POST_GET_MANY_RAW */, { + keys: keyPrefixed, + values: result, + }); + return result; + } + /** + * Set an item to the store + * @param {string | Array} key the key to use. If you pass in an array of KeyvEntry it will set many items + * @param {Value} value the value of the key + * @param {number} [ttl] time to live in milliseconds + * @returns {boolean} if it sets then it will return a true. On failure will return false. + */ + async set(key, value, ttl) { + const data = { key, value, ttl }; + this.hooks.trigger("preSet" /* PRE_SET */, data); + const keyPrefixed = this._getKeyPrefix(data.key); + data.ttl ??= this._ttl; + if (data.ttl === 0) { + data.ttl = void 0; + } + const { store } = this.opts; + const expires = + typeof data.ttl === "number" ? Date.now() + data.ttl : void 0; + if (typeof data.value === "symbol") { + this.emit("error", "symbol cannot be serialized"); + throw new Error("symbol cannot be serialized"); + } + const formattedValue = { value: data.value, expires }; + const serializedValue = await this.serializeData(formattedValue); + let result = true; + try { + const value2 = await store.set( + keyPrefixed, + serializedValue, + data.ttl, ); - - const { socket } = stream.session; - this.socket = socket; - this.connection = socket; - - for (const job of this[kJobs]) { - job(); + if (typeof value2 === "boolean") { + result = value2; } - - this.emit("socket", this.socket); - }; - - // Makes a HTTP2 request - if (this[kSession]) { - try { - onStream(this[kSession].request(this[kHeaders])); - } catch (error) { - this.emit("error", error); + } catch (error) { + result = false; + this.emit("error", error); + if (this._throwOnErrors) { + throw error; } - } else { - this.reusedSocket = true; - - try { - onStream( - await this.agent.request( - this[kOrigin], - this[kOptions], - this[kHeaders] - ) + } + this.hooks.trigger("postSet" /* POST_SET */, { + key: keyPrefixed, + value: serializedValue, + ttl, + }); + this.stats.set(); + return result; + } + /** + * Set many items to the store + * @param {Array} entries the entries to set + * @returns {boolean[]} will return an array of booleans if it sets then it will return a true. On failure will return false. + */ + // biome-ignore lint/correctness/noUnusedVariables: type format + async setMany(entries) { + let results = []; + try { + if (this._store.setMany === void 0) { + const promises = []; + for (const entry of entries) { + promises.push(this.set(entry.key, entry.value, entry.ttl)); + } + const promiseResults = await Promise.all(promises); + results = promiseResults; + } else { + const serializedEntries = await Promise.all( + entries.map(async ({ key, value, ttl }) => { + ttl ??= this._ttl; + if (ttl === 0) { + ttl = void 0; + } + const expires = + typeof ttl === "number" ? Date.now() + ttl : void 0; + if (typeof value === "symbol") { + this.emit("error", "symbol cannot be serialized"); + throw new Error("symbol cannot be serialized"); + } + const formattedValue = { value, expires }; + const serializedValue = + await this.serializeData(formattedValue); + const keyPrefixed = this._getKeyPrefix(key); + return { key: keyPrefixed, value: serializedValue, ttl }; + }), ); - } catch (error) { - this.emit("error", error); + results = await this._store.setMany(serializedEntries); + } + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; } + results = entries.map(() => false); } + return results; } - - getHeader(name) { - if (typeof name !== "string") { - throw new ERR_INVALID_ARG_TYPE("name", "string", name); + /** + * Delete an Entry + * @param {string | string[]} key the key to be deleted. if an array it will delete many items + * @returns {boolean} will return true if item or items are deleted. false if there is an error + */ + async delete(key) { + const { store } = this.opts; + if (Array.isArray(key)) { + return this.deleteMany(key); } - - return this[kHeaders][name.toLowerCase()]; - } - - get headersSent() { - return this[kFlushedHeaders]; + const keyPrefixed = this._getKeyPrefix(key); + this.hooks.trigger("preDelete" /* PRE_DELETE */, { + key: keyPrefixed, + }); + let result = true; + try { + const value = await store.delete(keyPrefixed); + if (typeof value === "boolean") { + result = value; + } + } catch (error) { + result = false; + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + } + this.hooks.trigger("postDelete" /* POST_DELETE */, { + key: keyPrefixed, + value: result, + }); + this.stats.delete(); + return result; } - - removeHeader(name) { - if (typeof name !== "string") { - throw new ERR_INVALID_ARG_TYPE("name", "string", name); + /** + * Delete many items from the store + * @param {string[]} keys the keys to be deleted + * @returns {boolean} will return true if item or items are deleted. false if there is an error + */ + async deleteMany(keys) { + try { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefixArray(keys); + this.hooks.trigger("preDelete" /* PRE_DELETE */, { + key: keyPrefixed, + }); + if (store.deleteMany !== void 0) { + return await store.deleteMany(keyPrefixed); + } + const promises = keyPrefixed.map(async (key) => store.delete(key)); + const results = await Promise.all(promises); + const returnResult = results.every(Boolean); + this.hooks.trigger("postDelete" /* POST_DELETE */, { + key: keyPrefixed, + value: returnResult, + }); + return returnResult; + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + return false; } - - if (this.headersSent) { - throw new ERR_HTTP_HEADERS_SENT("remove"); + } + /** + * Clear the store + * @returns {void} + */ + async clear() { + this.emit("clear"); + const { store } = this.opts; + try { + await store.clear(); + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } } - - delete this[kHeaders][name.toLowerCase()]; } - - setHeader(name, value) { - if (this.headersSent) { - throw new ERR_HTTP_HEADERS_SENT("set"); + async has(key) { + if (Array.isArray(key)) { + return this.hasMany(key); } - - if ( - typeof name !== "string" || - (!isValidHttpToken.test(name) && !isRequestPseudoHeader(name)) - ) { - throw new ERR_INVALID_HTTP_TOKEN("Header name", name); + const keyPrefixed = this._getKeyPrefix(key); + const { store } = this.opts; + if (store.has !== void 0 && !(store instanceof Map)) { + return store.has(keyPrefixed); } - - if (typeof value === "undefined") { - throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); + let rawData; + try { + rawData = await store.get(keyPrefixed); + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + return false; } - - if (isInvalidHeaderValue.test(value)) { - throw new ERR_INVALID_CHAR("header content", name); + if (rawData) { + const data = await this.deserializeData(rawData); + if (data) { + if (data.expires === void 0 || data.expires === null) { + return true; + } + return data.expires > Date.now(); + } } - - this[kHeaders][name.toLowerCase()] = value; - } - - setNoDelay() { - // HTTP2 sockets cannot be malformed, do nothing. - } - - setSocketKeepAlive() { - // HTTP2 sockets cannot be malformed, do nothing. + return false; } - - setTimeout(ms, callback) { - const applyTimeout = () => this._request.setTimeout(ms, callback); - - if (this._request) { - applyTimeout(); - } else { - this[kJobs].push(applyTimeout); + /** + * Check if many keys exist + * @param {string[]} keys the keys to check + * @returns {boolean[]} will return an array of booleans if the keys exist + */ + async hasMany(keys) { + const keyPrefixed = this._getKeyPrefixArray(keys); + const { store } = this.opts; + if (store.hasMany !== void 0) { + return store.hasMany(keyPrefixed); } - - return this; - } - - get maxHeadersCount() { - if (!this.destroyed && this._request) { - return this._request.session.localSettings.maxHeaderListSize; + const results = []; + for (const key of keys) { + results.push(await this.has(key)); } - - return undefined; - } - - set maxHeadersCount(_value) { - // Updating HTTP2 settings would affect all requests, do nothing. - } - } - - module.exports = ClientRequest; - - /***/ - }, - - /***/ 2575: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; - - const { Readable } = __nccwpck_require__(2781); - - class IncomingMessage extends Readable { - constructor(socket, highWaterMark) { - super({ - highWaterMark, - autoDestroy: false, - }); - - this.statusCode = null; - this.statusMessage = ""; - this.httpVersion = "2.0"; - this.httpVersionMajor = 2; - this.httpVersionMinor = 0; - this.headers = {}; - this.trailers = {}; - this.req = null; - - this.aborted = false; - this.complete = false; - this.upgrade = null; - - this.rawHeaders = []; - this.rawTrailers = []; - - this.socket = socket; - this.connection = socket; - - this._dumped = false; - } - - _destroy(error) { - this.req._request.destroy(error); - } - - setTimeout(ms, callback) { - this.req.setTimeout(ms, callback); - return this; + return results; } - - _dump() { - if (!this._dumped) { - this._dumped = true; - - this.removeAllListeners("data"); - this.resume(); + /** + * Will disconnect the store. This is only available if the store has a disconnect method + * @returns {Promise} + */ + async disconnect() { + const { store } = this.opts; + this.emit("disconnect"); + if (typeof store.disconnect === "function") { + return store.disconnect(); } } - - _read() { - if (this.req) { - this.req._request.resume(); + // biome-ignore lint/suspicious/noExplicitAny: type format + emit(event, ...arguments_) { + if (event === "error" && !this.opts.emitErrors) { + return; } + super.emit(event, ...arguments_); } - } - - module.exports = IncomingMessage; - - /***/ - }, - - /***/ 4645: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; - - const http2 = __nccwpck_require__(5158); - const agent = __nccwpck_require__(9898); - const ClientRequest = __nccwpck_require__(9632); - const IncomingMessage = __nccwpck_require__(2575); - const auto = __nccwpck_require__(7167); - - const request = (url, options, callback) => { - return new ClientRequest(url, options, callback); - }; - - const get = (url, options, callback) => { - // eslint-disable-next-line unicorn/prevent-abbreviations - const req = new ClientRequest(url, options, callback); - req.end(); - - return req; - }; - - module.exports = { - ...http2, - ClientRequest, - IncomingMessage, - ...agent, - request, - get, - auto, - }; - - /***/ - }, - - /***/ 1982: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; - - const net = __nccwpck_require__(1808); - /* istanbul ignore file: https://github.com/nodejs/node/blob/v13.0.1/lib/_http_agent.js */ - - module.exports = (options) => { - let servername = options.host; - const hostHeader = options.headers && options.headers.host; - - if (hostHeader) { - if (hostHeader.startsWith("[")) { - const index = hostHeader.indexOf("]"); - if (index === -1) { - servername = hostHeader; - } else { - servername = hostHeader.slice(1, -1); - } - } else { - servername = hostHeader.split(":", 1)[0]; + async serializeData(data) { + if (!this._serialize) { + return data; } + if (this._compression?.compress) { + return this._serialize({ + value: await this._compression.compress(data.value), + expires: data.expires, + }); + } + return this._serialize(data); } - - if (net.isIP(servername)) { - return ""; - } - - return servername; - }; - - /***/ - }, - - /***/ 7087: /***/ (module) => { - "use strict"; - - /* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */ - - const makeError = (Base, key, getMessage) => { - module.exports[key] = class NodeError extends Base { - constructor(...args) { - super( - typeof getMessage === "string" ? getMessage : getMessage(args) - ); - this.name = `${super.name} [${key}]`; - this.code = key; + async deserializeData(data) { + if (!this._deserialize) { + return data; } - }; + if (this._compression?.decompress && typeof data === "string") { + const result = await this._deserialize(data); + return { + value: await this._compression.decompress(result?.value), + expires: result?.expires, + }; + } + if (typeof data === "string") { + return this._deserialize(data); + } + return void 0; + } }; + var index_default = /* unused pure expression or super */ null && Keyv; // CONCATENATED MODULE: ./node_modules/mimic-response/index.js - makeError(TypeError, "ERR_INVALID_ARG_TYPE", (args) => { - const type = args[0].includes(".") ? "property" : "argument"; + /* v8 ignore next -- @preserve */ - let valid = args[1]; - const isManyTypes = Array.isArray(valid); + // We define these manually to ensure they're always copied + // even if they would move up the prototype chain + // https://nodejs.org/api/http.html#http_class_http_incomingmessage + const knownProperties = [ + "aborted", + "complete", + "headers", + "httpVersion", + "httpVersionMinor", + "httpVersionMajor", + "method", + "rawHeaders", + "rawTrailers", + "setTimeout", + "socket", + "statusCode", + "statusMessage", + "trailers", + "url", + ]; - if (isManyTypes) { - valid = `${valid.slice(0, -1).join(", ")} or ${valid.slice(-1)}`; + function mimicResponse(fromStream, toStream) { + if (toStream._readableState.autoDestroy) { + throw new Error( + "The second stream must have the `autoDestroy` option set to `false`", + ); } - return `The "${args[0]}" ${type} must be ${ - isManyTypes ? "one of" : "of" - } type ${valid}. Received ${typeof args[2]}`; - }); - - makeError(TypeError, "ERR_INVALID_PROTOCOL", (args) => { - return `Protocol "${args[0]}" not supported. Expected "${args[1]}"`; - }); - - makeError(Error, "ERR_HTTP_HEADERS_SENT", (args) => { - return `Cannot ${args[0]} headers after they are sent to the client`; - }); - - makeError(TypeError, "ERR_INVALID_HTTP_TOKEN", (args) => { - return `${args[0]} must be a valid HTTP token [${args[1]}]`; - }); - - makeError(TypeError, "ERR_HTTP_INVALID_HEADER_VALUE", (args) => { - return `Invalid value "${args[0]} for header "${args[1]}"`; - }); + const fromProperties = new Set([ + ...Object.keys(fromStream), + ...knownProperties, + ]); - makeError(TypeError, "ERR_INVALID_CHAR", (args) => { - return `Invalid character in ${args[0]} [${args[1]}]`; - }); + const properties = {}; - /***/ - }, + for (const property of fromProperties) { + // Don't overwrite existing properties. + if (property in toStream) { + continue; + } - /***/ 1199: /***/ (module) => { - "use strict"; + properties[property] = { + get() { + const value = fromStream[property]; + const isFunction = typeof value === "function"; - module.exports = (header) => { - switch (header) { - case ":method": - case ":scheme": - case ":authority": - case ":path": - return true; - default: - return false; + return isFunction ? value.bind(fromStream) : value; + }, + set(value) { + fromStream[property] = value; + }, + enumerable: true, + configurable: false, + }; } - }; - /***/ - }, + Object.defineProperties(toStream, properties); - /***/ 1818: /***/ (module) => { - "use strict"; + fromStream.once("aborted", () => { + toStream.destroy(); - module.exports = (from, to, events) => { - for (const event of events) { - from.on(event, (...args) => to.emit(event, ...args)); - } - }; + toStream.emit("aborted"); + }); - /***/ - }, + fromStream.once("close", () => { + if (fromStream.complete) { + if (toStream.readable) { + toStream.once("end", () => { + toStream.emit("close"); + }); + } else { + toStream.emit("close"); + } + } else { + toStream.emit("close"); + } + }); - /***/ 2686: /***/ (module) => { - "use strict"; + return toStream; + } // CONCATENATED MODULE: ./node_modules/normalize-url/index.js - /* istanbul ignore file: https://github.com/nodejs/node/blob/a91293d4d9ab403046ab5eb022332e4e3d249bd3/lib/internal/url.js#L1257 */ + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs + const DATA_URL_DEFAULT_MIME_TYPE = "text/plain"; + const DATA_URL_DEFAULT_CHARSET = "us-ascii"; - module.exports = (url) => { - const options = { - protocol: url.protocol, - hostname: - typeof url.hostname === "string" && url.hostname.startsWith("[") - ? url.hostname.slice(1, -1) - : url.hostname, - host: url.host, - hash: url.hash, - search: url.search, - pathname: url.pathname, - href: url.href, - path: `${url.pathname || ""}${url.search || ""}`, - }; + const testParameter = (name, filters) => + filters.some((filter) => + filter instanceof RegExp ? filter.test(name) : filter === name, + ); - if (typeof url.port === "string" && url.port.length !== 0) { - options.port = Number(url.port); - } + const supportedProtocols = new Set(["https:", "http:", "file:"]); - if (url.username || url.password) { - options.auth = `${url.username || ""}:${url.password || ""}`; - } + const hasCustomProtocol = (urlString) => { + try { + const { protocol } = new URL(urlString); - return options; + return ( + protocol.endsWith(":") && + !protocol.includes(".") && + !supportedProtocols.has(protocol) + ); + } catch { + return false; + } }; - /***/ - }, + const normalizeDataURL = (urlString, { stripHash }) => { + const match = + /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec( + urlString, + ); - /***/ 2820: /***/ (__unused_webpack_module, exports) => { - //TODO: handle reviver/dehydrate function like normal - //and handle indentation, like normal. - //if anyone needs this... please send pull request. + if (!match) { + throw new Error(`Invalid URL: ${urlString}`); + } - exports.stringify = function stringify(o) { - if ("undefined" == typeof o) return o; + const { type, data, hash } = match.groups; + const mediaType = type.split(";"); - if (o && Buffer.isBuffer(o)) - return JSON.stringify(":base64:" + o.toString("base64")); + const isBase64 = mediaType.at(-1) === "base64"; + if (isBase64) { + mediaType.pop(); + } - if (o && o.toJSON) o = o.toJSON(); + // Lowercase MIME type + const mimeType = mediaType.shift()?.toLowerCase() ?? ""; + const attributes = mediaType + .map((attribute) => { + let [key, value = ""] = attribute + .split("=") + .map((string) => string.trim()); - if (o && "object" === typeof o) { - var s = ""; - var array = Array.isArray(o); - s = array ? "[" : "{"; - var first = true; + // Lowercase `charset` + if (key === "charset") { + value = value.toLowerCase(); - for (var k in o) { - var ignore = - "function" == typeof o[k] || - (!array && "undefined" === typeof o[k]); - if (Object.hasOwnProperty.call(o, k) && !ignore) { - if (!first) s += ","; - first = false; - if (array) { - if (o[k] == undefined) s += "null"; - else s += stringify(o[k]); - } else if (o[k] !== void 0) { - s += stringify(k) + ":" + stringify(o[k]); + if (value === DATA_URL_DEFAULT_CHARSET) { + return ""; } } - } - - s += array ? "]" : "}"; - - return s; - } else if ("string" === typeof o) { - return JSON.stringify(/^:/.test(o) ? ":" + o : o); - } else if ("undefined" === typeof o) { - return "null"; - } else return JSON.stringify(o); - }; - exports.parse = function (s) { - return JSON.parse(s, function (key, value) { - if ("string" === typeof value) { - if (/^:base64:/.test(value)) - return Buffer.from(value.substring(8), "base64"); - else return /^:/.test(value) ? value.substring(1) : value; - } - return value; - }); - }; + return `${key}${value ? `=${value}` : ""}`; + }) + .filter(Boolean); - /***/ - }, + const normalizedMediaType = [...attributes]; - /***/ 1531: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + if (isBase64) { + normalizedMediaType.push("base64"); + } - const EventEmitter = __nccwpck_require__(2361); - const JSONB = __nccwpck_require__(2820); - - const loadStore = (options) => { - const adapters = { - redis: "@keyv/redis", - rediss: "@keyv/redis", - mongodb: "@keyv/mongo", - mongo: "@keyv/mongo", - sqlite: "@keyv/sqlite", - postgresql: "@keyv/postgres", - postgres: "@keyv/postgres", - mysql: "@keyv/mysql", - etcd: "@keyv/etcd", - offline: "@keyv/offline", - tiered: "@keyv/tiered", - }; - if (options.adapter || options.uri) { - const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0]; - return new (require(adapters[adapter]))(options); + if ( + normalizedMediaType.length > 0 || + (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE) + ) { + normalizedMediaType.unshift(mimeType); } - return new Map(); + const hashPart = stripHash || !hash ? "" : `#${hash}`; + return `data:${normalizedMediaType.join(";")},${isBase64 ? data.trim() : data}${hashPart}`; }; - const iterableAdapters = [ - "sqlite", - "postgres", - "mysql", - "mongo", - "redis", - "tiered", - ]; - - class Keyv extends EventEmitter { - constructor(uri, { emitErrors = true, ...options } = {}) { - super(); - this.opts = { - namespace: "keyv", - serialize: JSONB.stringify, - deserialize: JSONB.parse, - ...(typeof uri === "string" ? { uri } : uri), - ...options, - }; - - if (!this.opts.store) { - const adapterOptions = { ...this.opts }; - this.opts.store = loadStore(adapterOptions); - } - - if (this.opts.compression) { - const compression = this.opts.compression; - this.opts.serialize = compression.serialize.bind(compression); - this.opts.deserialize = compression.deserialize.bind(compression); - } + function normalizeUrl(urlString, options) { + options = { + defaultProtocol: "http", + normalizeProtocol: true, + forceHttp: false, + forceHttps: false, + stripAuthentication: true, + stripHash: false, + stripTextFragment: true, + stripWWW: true, + removeQueryParameters: [/^utm_\w+/i], + removeTrailingSlash: true, + removeSingleSlash: true, + removeDirectoryIndex: false, + removeExplicitPort: false, + sortQueryParameters: true, + removePath: false, + transformPath: false, + ...options, + }; - if (typeof this.opts.store.on === "function" && emitErrors) { - this.opts.store.on("error", (error) => this.emit("error", error)); - } + // Legacy: Append `:` to the protocol if missing. + if ( + typeof options.defaultProtocol === "string" && + !options.defaultProtocol.endsWith(":") + ) { + options.defaultProtocol = `${options.defaultProtocol}:`; + } - this.opts.store.namespace = this.opts.namespace; + urlString = urlString.trim(); - const generateIterator = (iterator) => - async function* () { - for await (const [key, raw] of typeof iterator === "function" - ? iterator(this.opts.store.namespace) - : iterator) { - const data = this.opts.deserialize(raw); - if ( - this.opts.store.namespace && - !key.includes(this.opts.store.namespace) - ) { - continue; - } + // Data URL + if (/^data:/i.test(urlString)) { + return normalizeDataURL(urlString, options); + } - if ( - typeof data.expires === "number" && - Date.now() > data.expires - ) { - this.delete(key); - continue; - } + if (hasCustomProtocol(urlString)) { + return urlString; + } - yield [this._getKeyUnprefix(key), data.value]; - } - }; + const hasRelativeProtocol = urlString.startsWith("//"); + const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); - // Attach iterators - if ( - typeof this.opts.store[Symbol.iterator] === "function" && - this.opts.store instanceof Map - ) { - this.iterator = generateIterator(this.opts.store); - } else if ( - typeof this.opts.store.iterator === "function" && - this.opts.store.opts && - this._checkIterableAdaptar() - ) { - this.iterator = generateIterator( - this.opts.store.iterator.bind(this.opts.store) - ); - } + // Prepend protocol + if (!isRelativeUrl) { + urlString = urlString.replace( + /^(?!(?:\w+:)?\/\/)|^\/\//, + options.defaultProtocol, + ); } - _checkIterableAdaptar() { - return ( - iterableAdapters.includes(this.opts.store.opts.dialect) || - iterableAdapters.findIndex((element) => - this.opts.store.opts.url.includes(element) - ) >= 0 + const urlObject = new URL(urlString); + + if (options.forceHttp && options.forceHttps) { + throw new Error( + "The `forceHttp` and `forceHttps` options cannot be used together", ); } - _getKeyPrefix(key) { - return `${this.opts.namespace}:${key}`; + if (options.forceHttp && urlObject.protocol === "https:") { + urlObject.protocol = "http:"; } - _getKeyPrefixArray(keys) { - return keys.map((key) => `${this.opts.namespace}:${key}`); + if (options.forceHttps && urlObject.protocol === "http:") { + urlObject.protocol = "https:"; } - _getKeyUnprefix(key) { - return key.split(":").splice(1).join(":"); + // Remove auth + if (options.stripAuthentication) { + urlObject.username = ""; + urlObject.password = ""; } - get(key, options) { - const { store } = this.opts; - const isArray = Array.isArray(key); - const keyPrefixed = isArray - ? this._getKeyPrefixArray(key) - : this._getKeyPrefix(key); - if (isArray && store.getMany === undefined) { - const promises = []; - for (const key of keyPrefixed) { - promises.push( - Promise.resolve() - .then(() => store.get(key)) - .then((data) => - typeof data === "string" - ? this.opts.deserialize(data) - : this.opts.compression - ? this.opts.deserialize(data) - : data - ) - .then((data) => { - if (data === undefined || data === null) { - return undefined; - } - - if ( - typeof data.expires === "number" && - Date.now() > data.expires - ) { - return this.delete(key).then(() => undefined); - } + // Remove hash + if (options.stripHash) { + urlObject.hash = ""; + } else if (options.stripTextFragment) { + urlObject.hash = urlObject.hash.replace(/#?:~:text.*?$/i, ""); + } - return options && options.raw ? data : data.value; - }) - ); + // Remove duplicate slashes if not preceded by a protocol + // NOTE: This could be implemented using a single negative lookbehind + // regex, but we avoid that to maintain compatibility with older js engines + // which do not have support for that feature. + if (urlObject.pathname) { + // TODO: Replace everything below with `urlObject.pathname = urlObject.pathname.replace(/(? { - const data = []; - for (const value of values) { - data.push(value.value); - } + const protocol = match[0]; + const protocolAtIndex = match.index; + const intermediate = urlObject.pathname.slice( + lastIndex, + protocolAtIndex, + ); - return data; - }); + result += intermediate.replace(/\/{2,}/g, "/"); + result += protocol; + lastIndex = protocolAtIndex + protocol.length; } - return Promise.resolve() - .then(() => - isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed) - ) - .then((data) => - typeof data === "string" - ? this.opts.deserialize(data) - : this.opts.compression - ? this.opts.deserialize(data) - : data - ) - .then((data) => { - if (data === undefined || data === null) { - return undefined; - } + const remnant = urlObject.pathname.slice( + lastIndex, + urlObject.pathname.length, + ); + result += remnant.replace(/\/{2,}/g, "/"); - if (isArray) { - const result = []; + urlObject.pathname = result; + } - for (let row of data) { - if (typeof row === "string") { - row = this.opts.deserialize(row); - } + // Decode URI octets + if (urlObject.pathname) { + try { + urlObject.pathname = decodeURI(urlObject.pathname).replace( + /\\/g, + "%5C", + ); + } catch {} + } - if (row === undefined || row === null) { - result.push(undefined); - continue; - } + // Remove directory index + if (options.removeDirectoryIndex === true) { + options.removeDirectoryIndex = [/^index\.[a-z]+$/]; + } - if ( - typeof row.expires === "number" && - Date.now() > row.expires - ) { - this.delete(key).then(() => undefined); - result.push(undefined); - } else { - result.push(options && options.raw ? row : row.value); - } - } + if ( + Array.isArray(options.removeDirectoryIndex) && + options.removeDirectoryIndex.length > 0 + ) { + const pathComponents = urlObject.pathname.split("/").filter(Boolean); + const lastComponent = pathComponents.at(-1); - return result; - } + if ( + lastComponent && + testParameter(lastComponent, options.removeDirectoryIndex) + ) { + pathComponents.pop(); + urlObject.pathname = + pathComponents.length > 0 ? `/${pathComponents.join("/")}/` : "/"; + } + } - if ( - typeof data.expires === "number" && - Date.now() > data.expires - ) { - return this.delete(key).then(() => undefined); - } + // Remove path + if (options.removePath) { + urlObject.pathname = "/"; + } - return options && options.raw ? data : data.value; - }); + // Transform path components + if ( + options.transformPath && + typeof options.transformPath === "function" + ) { + const pathComponents = urlObject.pathname.split("/").filter(Boolean); + const newComponents = options.transformPath(pathComponents); + urlObject.pathname = + newComponents?.length > 0 ? `/${newComponents.join("/")}` : "/"; + } + + if (urlObject.hostname) { + // Remove trailing dot + urlObject.hostname = urlObject.hostname.replace(/\.$/, ""); + + // Remove `www.` + if ( + options.stripWWW && + /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test( + urlObject.hostname, + ) + ) { + // Each label should be max 63 at length (min: 1). + // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names + // Each TLD should be up to 63 characters long (min: 2). + // It is technically possible to have a single character TLD, but none currently exist. + urlObject.hostname = urlObject.hostname.replace(/^www\./, ""); + } } - set(key, value, ttl) { - const keyPrefixed = this._getKeyPrefix(key); - if (typeof ttl === "undefined") { - ttl = this.opts.ttl; + // Remove query unwanted parameters + if (Array.isArray(options.removeQueryParameters)) { + // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. + for (const key of [...urlObject.searchParams.keys()]) { + if (testParameter(key, options.removeQueryParameters)) { + urlObject.searchParams.delete(key); + } } + } + + if ( + !Array.isArray(options.keepQueryParameters) && + options.removeQueryParameters === true + ) { + urlObject.search = ""; + } - if (ttl === 0) { - ttl = undefined; + // Keep wanted query parameters + if ( + Array.isArray(options.keepQueryParameters) && + options.keepQueryParameters.length > 0 + ) { + // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. + for (const key of [...urlObject.searchParams.keys()]) { + if (!testParameter(key, options.keepQueryParameters)) { + urlObject.searchParams.delete(key); + } } + } - const { store } = this.opts; + // Sort query parameters + if (options.sortQueryParameters) { + const originalSearch = urlObject.search; + urlObject.searchParams.sort(); - return Promise.resolve() - .then(() => { - const expires = typeof ttl === "number" ? Date.now() + ttl : null; - if (typeof value === "symbol") { - this.emit("error", "symbol cannot be serialized"); - } + // Calling `.sort()` encodes the search parameters, so we need to decode them again. + try { + urlObject.search = decodeURIComponent(urlObject.search); + } catch {} - value = { value, expires }; - return this.opts.serialize(value); - }) - .then((value) => store.set(keyPrefixed, value, ttl)) - .then(() => true); + // Fix parameters that originally had no equals sign but got one added by URLSearchParams + const partsWithoutEquals = originalSearch + .slice(1) + .split("&") + .filter((p) => p && !p.includes("=")); + for (const part of partsWithoutEquals) { + const decoded = decodeURIComponent(part); + // Only replace at word boundaries to avoid partial matches + urlObject.search = urlObject.search + .replace(`?${decoded}=`, `?${decoded}`) + .replace(`&${decoded}=`, `&${decoded}`); + } } - delete(key) { - const { store } = this.opts; - if (Array.isArray(key)) { - const keyPrefixed = this._getKeyPrefixArray(key); - if (store.deleteMany === undefined) { - const promises = []; - for (const key of keyPrefixed) { - promises.push(store.delete(key)); - } + if (options.removeTrailingSlash) { + urlObject.pathname = urlObject.pathname.replace(/\/$/, ""); + } - return Promise.allSettled(promises).then((values) => - values.every((x) => x.value === true) - ); - } + // Remove an explicit port number, excluding a default port number, if applicable + if (options.removeExplicitPort && urlObject.port) { + urlObject.port = ""; + } - return Promise.resolve().then(() => store.deleteMany(keyPrefixed)); - } + const oldUrlString = urlString; - const keyPrefixed = this._getKeyPrefix(key); - return Promise.resolve().then(() => store.delete(keyPrefixed)); - } + // Take advantage of many of the Node `url` normalizations + urlString = urlObject.toString(); - clear() { - const { store } = this.opts; - return Promise.resolve().then(() => store.clear()); + if ( + !options.removeSingleSlash && + urlObject.pathname === "/" && + !oldUrlString.endsWith("/") && + urlObject.hash === "" + ) { + urlString = urlString.replace(/\/$/, ""); } - has(key) { - const keyPrefixed = this._getKeyPrefix(key); - const { store } = this.opts; - return Promise.resolve().then(async () => { - if (typeof store.has === "function") { - return store.has(keyPrefixed); - } + // Remove ending `/` unless removeSingleSlash is false + if ( + (options.removeTrailingSlash || urlObject.pathname === "/") && + urlObject.hash === "" && + options.removeSingleSlash + ) { + urlString = urlString.replace(/\/$/, ""); + } - const value = await store.get(keyPrefixed); - return value !== undefined; - }); + // Restore relative protocol, if applicable + if (hasRelativeProtocol && !options.normalizeProtocol) { + urlString = urlString.replace(/^http:\/\//, "//"); } - disconnect() { - const { store } = this.opts; - if (typeof store.disconnect === "function") { - return store.disconnect(); - } + // Remove http/https + if (options.stripProtocol) { + urlString = urlString.replace(/^(?:https?:)?\/\//, ""); } - } - module.exports = Keyv; + return urlString; + } // CONCATENATED MODULE: ./node_modules/lowercase-keys/index.js + + function lowercaseKeys(object) { + return Object.fromEntries( + Object.entries(object).map(([key, value]) => [ + key.toLowerCase(), + value, + ]), + ); + } // CONCATENATED MODULE: ./node_modules/responselike/index.js - /***/ - }, + class responselike_Response extends external_node_stream_.Readable { + statusCode; + headers; + body; + url; + complete; - /***/ 9662: /***/ (module) => { - "use strict"; + constructor({ statusCode, headers, body, url }) { + if (typeof statusCode !== "number") { + throw new TypeError("Argument `statusCode` should be a number"); + } - module.exports = (object) => { - const result = {}; + if (typeof headers !== "object") { + throw new TypeError("Argument `headers` should be an object"); + } - for (const [key, value] of Object.entries(object)) { - result[key.toLowerCase()] = value; - } + if (!(body instanceof Uint8Array)) { + throw new TypeError("Argument `body` should be a buffer"); + } - return result; - }; + if (typeof url !== "string") { + throw new TypeError("Argument `url` should be a string"); + } - /***/ - }, + let bodyPushed = false; + super({ + read() { + // Push body on first read, end stream on second read. + // This allows listeners to attach before data flows through pipes. + if (!bodyPushed) { + bodyPushed = true; + this.push(body); + return; + } - /***/ 2610: /***/ (module) => { - "use strict"; + this.push(null); + }, + }); - // We define these manually to ensure they're always copied - // even if they would move up the prototype chain - // https://nodejs.org/api/http.html#http_class_http_incomingmessage - const knownProps = [ - "destroy", - "setTimeout", - "socket", - "headers", - "trailers", - "rawHeaders", - "statusCode", - "httpVersion", - "httpVersionMinor", - "httpVersionMajor", - "rawTrailers", - "statusMessage", - ]; + this.statusCode = statusCode; + this.headers = lowercaseKeys(headers); + this.body = body; + this.url = url; + this.complete = true; + } + } // CONCATENATED MODULE: ./node_modules/cacheable-request/dist/types.js - module.exports = (fromStream, toStream) => { - const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); + // Type definitions for cacheable-request 6.0 + // Project: https://github.com/lukechilds/cacheable-request#readme + // Definitions by: BendingBender + // Paul Melnikow + // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + // TypeScript Version: 2.3 + class types_RequestError extends Error { + constructor(error) { + super(error.message); + Object.defineProperties( + this, + Object.getOwnPropertyDescriptors(error), + ); + } + } + class types_CacheError extends Error { + constructor(error) { + super(error.message); + Object.defineProperties( + this, + Object.getOwnPropertyDescriptors(error), + ); + } + } // CONCATENATED MODULE: ./node_modules/cacheable-request/dist/index.js + //# sourceMappingURL=types.js.map + // biome-ignore-all lint/suspicious/noImplicitAnyLet: legacy format + // biome-ignore-all lint/suspicious/noExplicitAny: legacy format - for (const prop of fromProps) { - // Don't overwrite existing properties - if (prop in toStream) { - continue; + class CacheableRequest { + constructor(cacheRequest, cacheAdapter) { + this.cache = new Keyv({ namespace: "cacheable-request" }); + this.hooks = new Map(); + this.request = () => (options, callback) => { + let url; + if (typeof options === "string") { + url = normalizeUrlObject(parseWithWhatwg(options)); + options = {}; + } else if (options instanceof external_node_url_.URL) { + url = normalizeUrlObject(parseWithWhatwg(options.toString())); + options = {}; + } else { + const [pathname, ...searchParts] = (options.path ?? "").split( + "?", + ); + const search = + searchParts.length > 0 ? `?${searchParts.join("?")}` : ""; + url = normalizeUrlObject({ ...options, pathname, search }); + } + options = { + headers: {}, + method: "GET", + cache: true, + strictTtl: false, + automaticFailover: false, + ...options, + ...urlObjectToRequestOptions(url), + }; + options.headers = Object.fromEntries( + entries(options.headers).map(([key, value]) => [ + key.toLowerCase(), + value, + ]), + ); + const ee = new external_node_events_(); + const normalizedUrlString = normalizeUrl( + external_node_url_.format(url), + { + stripWWW: false, + removeTrailingSlash: false, + stripAuthentication: false, + }, + ); + let key = `${options.method}:${normalizedUrlString}`; + // POST, PATCH, and PUT requests may be cached, depending on the response + // cache-control headers. As a result, the body of the request should be + // added to the cache key in order to avoid collisions. + if ( + options.body && + options.method !== undefined && + ["POST", "PATCH", "PUT"].includes(options.method) + ) { + if (options.body instanceof external_node_stream_.Readable) { + // Streamed bodies should completely skip the cache because they may + // or may not be hashable and in either case the stream would need to + // close before the cache key could be generated. + options.cache = false; + } else { + key += `:${external_node_crypto_.createHash("md5").update(options.body).digest("hex")}`; + } + } + let revalidate = false; + let madeRequest = false; + const makeRequest = (options_) => { + madeRequest = true; + let requestErrored = false; + /* c8 ignore next 4 */ + let requestErrorCallback = () => { + /* do nothing */ + }; + const requestErrorPromise = new Promise((resolve) => { + requestErrorCallback = () => { + if (!requestErrored) { + requestErrored = true; + resolve(); + } + }; + }); + const handler = async (response) => { + if (revalidate) { + response.status = response.statusCode; + const originalPolicy = http_cache_semantics.fromObject( + revalidate.cachePolicy, + ); + const revalidatedPolicy = originalPolicy.revalidatedPolicy( + options_, + response, + ); + if (!revalidatedPolicy.modified) { + response.resume(); + await new Promise((resolve) => { + // Skipping 'error' handler cause 'error' event should't be emitted for 304 response + response.once("end", resolve); + }); + // Get headers from revalidated policy + const headers = convertHeaders( + revalidatedPolicy.policy.responseHeaders(), + ); + // Preserve headers from the original cached response that may have been + // lost during revalidation (e.g., content-encoding, content-type, etc.) + // This works around a limitation in http-cache-semantics where some headers + // are not preserved when a 304 response has minimal headers + const originalHeaders = convertHeaders( + originalPolicy.responseHeaders(), + ); + // Headers that should be preserved from the cached response + // according to RFC 7232 section 4.1 + const preserveHeaders = [ + "content-encoding", + "content-type", + "content-length", + "content-language", + "content-location", + "etag", + ]; + for (const headerName of preserveHeaders) { + if ( + originalHeaders[headerName] !== undefined && + headers[headerName] === undefined + ) { + headers[headerName] = originalHeaders[headerName]; + } + } + response = new responselike_Response({ + statusCode: revalidate.statusCode, + headers, + body: revalidate.body, + url: revalidate.url, + }); + response.cachePolicy = revalidatedPolicy.policy; + response.fromCache = true; + } + } + if (!response.fromCache) { + response.cachePolicy = new http_cache_semantics( + options_, + response, + options_, + ); + response.fromCache = false; + } + let clonedResponse; + if (options_.cache && response.cachePolicy.storable()) { + clonedResponse = cloneResponse(response); + (async () => { + try { + const bodyPromise = getStreamAsBuffer(response); + await Promise.race([ + requestErrorPromise, + new Promise((resolve) => response.once("end", resolve)), + new Promise((resolve) => + response.once("close", resolve), + ), + ]); + const body = await bodyPromise; + let value = { + url: response.url, + statusCode: response.fromCache + ? revalidate.statusCode + : response.statusCode, + body, + cachePolicy: response.cachePolicy.toObject(), + }; + let ttl = options_.strictTtl + ? response.cachePolicy.timeToLive() + : undefined; + if (options_.maxTtl) { + ttl = ttl + ? Math.min(ttl, options_.maxTtl) + : options_.maxTtl; + } + if (this.hooks.size > 0) { + for (const key_ of this.hooks.keys()) { + value = await this.runHook(key_, value, response); + } + } + await this.cache.set(key, value, ttl); + /* c8 ignore next -- @preserve */ + } catch (error) { + /* c8 ignore next -- @preserve */ + ee.emit("error", new types_CacheError(error)); + /* c8 ignore next -- @preserve */ + } + })(); + } else if (options_.cache && revalidate) { + (async () => { + try { + await this.cache.delete(key); + /* c8 ignore next -- @preserve */ + } catch (error) { + /* c8 ignore next -- @preserve */ + ee.emit("error", new types_CacheError(error)); + /* c8 ignore next -- @preserve */ + } + })(); + } + ee.emit("response", clonedResponse ?? response); + if (typeof callback === "function") { + callback(clonedResponse ?? response); + } + }; + try { + const request_ = this.cacheRequest(options_, handler); + request_.once("error", requestErrorCallback); + request_.once("abort", requestErrorCallback); + request_.once("destroy", requestErrorCallback); + ee.emit("request", request_); + } catch (error) { + ee.emit("error", new types_RequestError(error)); + } + }; + (async () => { + const get = async (options_) => { + await Promise.resolve(); + const cacheEntry = options_.cache + ? await this.cache.get(key) + : undefined; + if (cacheEntry === undefined && !options_.forceRefresh) { + makeRequest(options_); + return; + } + const policy = http_cache_semantics.fromObject( + cacheEntry.cachePolicy, + ); + if ( + policy.satisfiesWithoutRevalidation(options_) && + !options_.forceRefresh + ) { + const headers = convertHeaders(policy.responseHeaders()); + const bodyBuffer = cacheEntry.body; + const body = Buffer.from(bodyBuffer); + const response = new responselike_Response({ + statusCode: cacheEntry.statusCode, + headers, + body, + url: cacheEntry.url, + }); + response.cachePolicy = policy; + response.fromCache = true; + ee.emit("response", response); + if (typeof callback === "function") { + callback(response); + } + } else if ( + policy.satisfiesWithoutRevalidation(options_) && + Date.now() >= policy.timeToLive() && + options_.forceRefresh + ) { + await this.cache.delete(key); + options_.headers = policy.revalidationHeaders(options_); + makeRequest(options_); + } else { + revalidate = cacheEntry; + options_.headers = policy.revalidationHeaders(options_); + makeRequest(options_); + } + }; + const errorHandler = (error) => + ee.emit("error", new types_CacheError(error)); + if (this.cache instanceof Keyv) { + const cachek = this.cache; + cachek.once("error", errorHandler); + ee.on("error", () => { + cachek.removeListener("error", errorHandler); + }); + ee.on("response", () => { + cachek.removeListener("error", errorHandler); + }); + } + try { + await get(options); + } catch (error) { + /* v8 ignore next -- @preserve */ + if (options.automaticFailover && !madeRequest) { + makeRequest(options); + } + ee.emit("error", new types_CacheError(error)); + } + })(); + return ee; + }; + this.addHook = (name, function_) => { + if (!this.hooks.has(name)) { + this.hooks.set(name, function_); + } + }; + this.removeHook = (name) => this.hooks.delete(name); + this.getHook = (name) => this.hooks.get(name); + this.runHook = async (name, ...arguments_) => + this.hooks.get(name)?.(...arguments_); + if (cacheAdapter) { + if (cacheAdapter instanceof Keyv) { + this.cache = cacheAdapter; + } else { + this.cache = new Keyv({ + store: cacheAdapter, + namespace: "cacheable-request", + }); + } } - - toStream[prop] = - typeof fromStream[prop] === "function" - ? fromStream[prop].bind(fromStream) - : fromStream[prop]; - } - }; - - /***/ - }, - - /***/ 1077: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; - - const proc = - typeof process === "object" && process - ? process - : { - stdout: null, - stderr: null, - }; - const EE = __nccwpck_require__(2361); - const Stream = __nccwpck_require__(2781); - const stringdecoder = __nccwpck_require__(1576); - const SD = stringdecoder.StringDecoder; - - const EOF = Symbol("EOF"); - const MAYBE_EMIT_END = Symbol("maybeEmitEnd"); - const EMITTED_END = Symbol("emittedEnd"); - const EMITTING_END = Symbol("emittingEnd"); - const EMITTED_ERROR = Symbol("emittedError"); - const CLOSED = Symbol("closed"); - const READ = Symbol("read"); - const FLUSH = Symbol("flush"); - const FLUSHCHUNK = Symbol("flushChunk"); - const ENCODING = Symbol("encoding"); - const DECODER = Symbol("decoder"); - const FLOWING = Symbol("flowing"); - const PAUSED = Symbol("paused"); - const RESUME = Symbol("resume"); - const BUFFER = Symbol("buffer"); - const PIPES = Symbol("pipes"); - const BUFFERLENGTH = Symbol("bufferLength"); - const BUFFERPUSH = Symbol("bufferPush"); - const BUFFERSHIFT = Symbol("bufferShift"); - const OBJECTMODE = Symbol("objectMode"); - // internal event when stream is destroyed - const DESTROYED = Symbol("destroyed"); - // internal event when stream has an error - const ERROR = Symbol("error"); - const EMITDATA = Symbol("emitData"); - const EMITEND = Symbol("emitEnd"); - const EMITEND2 = Symbol("emitEnd2"); - const ASYNC = Symbol("async"); - const ABORT = Symbol("abort"); - const ABORTED = Symbol("aborted"); - const SIGNAL = Symbol("signal"); - - const defer = (fn) => Promise.resolve().then(fn); - - // TODO remove when Node v8 support drops - const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== "1"; - const ASYNCITERATOR = - (doIter && Symbol.asyncIterator) || - Symbol("asyncIterator not implemented"); - const ITERATOR = - (doIter && Symbol.iterator) || Symbol("iterator not implemented"); - - // events that mean 'the stream is over' - // these are treated specially, and re-emitted - // if they are listened for after emitting. - const isEndish = (ev) => - ev === "end" || ev === "finish" || ev === "prefinish"; - - const isArrayBuffer = (b) => - b instanceof ArrayBuffer || - (typeof b === "object" && - b.constructor && - b.constructor.name === "ArrayBuffer" && - b.byteLength >= 0); - - const isArrayBufferView = (b) => - !Buffer.isBuffer(b) && ArrayBuffer.isView(b); - - class Pipe { - constructor(src, dest, opts) { - this.src = src; - this.dest = dest; - this.opts = opts; - this.ondrain = () => src[RESUME](); - dest.on("drain", this.ondrain); - } - unpipe() { - this.dest.removeListener("drain", this.ondrain); - } - // istanbul ignore next - only here for the prototype - proxyErrors() {} - end() { - this.unpipe(); - if (this.opts.end) this.dest.end(); - } - } - - class PipeProxyErrors extends Pipe { - unpipe() { - this.src.removeListener("error", this.proxyErrors); - super.unpipe(); - } - constructor(src, dest, opts) { - super(src, dest, opts); - this.proxyErrors = (er) => dest.emit("error", er); - src.on("error", this.proxyErrors); + this.request = this.request.bind(this); + this.cacheRequest = cacheRequest; } } - - class Minipass extends Stream { - constructor(options) { - super(); - this[FLOWING] = false; - // whether we're explicitly paused - this[PAUSED] = false; - this[PIPES] = []; - this[BUFFER] = []; - this[OBJECTMODE] = (options && options.objectMode) || false; - if (this[OBJECTMODE]) this[ENCODING] = null; - else this[ENCODING] = (options && options.encoding) || null; - if (this[ENCODING] === "buffer") this[ENCODING] = null; - this[ASYNC] = (options && !!options.async) || false; - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null; - this[EOF] = false; - this[EMITTED_END] = false; - this[EMITTING_END] = false; - this[CLOSED] = false; - this[EMITTED_ERROR] = null; - this.writable = true; - this.readable = true; - this[BUFFERLENGTH] = 0; - this[DESTROYED] = false; - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, "buffer", { get: () => this[BUFFER] }); - } - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, "pipes", { get: () => this[PIPES] }); - } - this[SIGNAL] = options && options.signal; - this[ABORTED] = false; - if (this[SIGNAL]) { - this[SIGNAL].addEventListener("abort", () => this[ABORT]()); - if (this[SIGNAL].aborted) { - this[ABORT](); - } - } - } - - get bufferLength() { - return this[BUFFERLENGTH]; - } - - get encoding() { - return this[ENCODING]; - } - set encoding(enc) { - if (this[OBJECTMODE]) - throw new Error("cannot set encoding in objectMode"); - - if ( - this[ENCODING] && - enc !== this[ENCODING] && - ((this[DECODER] && this[DECODER].lastNeed) || this[BUFFERLENGTH]) - ) - throw new Error("cannot change encoding"); - - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null; - if (this[BUFFER].length) - this[BUFFER] = this[BUFFER].map((chunk) => - this[DECODER].write(chunk) - ); - } - - this[ENCODING] = enc; - } - - setEncoding(enc) { - this.encoding = enc; - } - - get objectMode() { - return this[OBJECTMODE]; - } - set objectMode(om) { - this[OBJECTMODE] = this[OBJECTMODE] || !!om; + const entries = Object.entries; + const cloneResponse = (response) => { + const clone = new external_node_stream_.PassThrough({ + autoDestroy: false, + }); + mimicResponse(response, clone); + return response.pipe(clone); + }; + const urlObjectToRequestOptions = (url) => { + const options = { ...url }; + options.path = `${url.pathname || "/"}${url.search || ""}`; + delete options.pathname; + delete options.search; + return options; + }; + const normalizeUrlObject = (url) => + // If url was parsed by url.parse or new URL: + // - hostname will be set + // - host will be hostname[:port] + // - port will be set if it was explicit in the parsed string + // Otherwise, url was from request options: + // - hostname or host may be set + // - host shall not have port encoded + ({ + protocol: url.protocol, + auth: url.auth, + hostname: url.hostname || url.host || "localhost", + port: url.port, + pathname: url.pathname, + search: url.search, + }); + const convertHeaders = (headers) => { + const result = []; + for (const name of Object.keys(headers)) { + result[name.toLowerCase()] = headers[name]; } + return result; + }; + const parseWithWhatwg = (raw) => { + const u = new external_node_url_.URL(raw); + // If normalizeUrlObject expects the same fields as url.parse() + return { + protocol: u.protocol, // E.g. 'https:' + slashes: true, // Always true for WHATWG URLs + /* c8 ignore next 3 */ + auth: + u.username || u.password + ? `${u.username}:${u.password}` + : undefined, + host: u.host, // E.g. 'example.com:8080' + port: u.port, // E.g. '8080' + hostname: u.hostname, // E.g. 'example.com' + hash: u.hash, // E.g. '#quux' + search: u.search, // E.g. '?bar=baz' + query: Object.fromEntries(u.searchParams), // { bar: 'baz' } + pathname: u.pathname, // E.g. '/foo' + path: u.pathname + u.search, // '/foo?bar=baz' + href: u.href, // Full serialized URL + }; + }; + /* harmony default export */ const dist = CacheableRequest; - get ["async"]() { - return this[ASYNC]; - } - set ["async"](a) { - this[ASYNC] = this[ASYNC] || !!a; - } + const onResponse = "onResponse"; + //# sourceMappingURL=index.js.map + // EXTERNAL MODULE: external "node:zlib" + var external_node_zlib_ = __nccwpck_require__(8522); // CONCATENATED MODULE: ./node_modules/decompress-response/index.js + // Detect zstd support (available in Node.js >= 22.15.0) + const supportsZstd = + typeof external_node_zlib_.createZstdDecompress === "function"; - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true; - this.emit("abort", this[SIGNAL].reason); - this.destroy(this[SIGNAL].reason); + function decompressResponse(response) { + const contentEncoding = ( + response.headers["content-encoding"] || "" + ).toLowerCase(); + const supportedEncodings = ["gzip", "deflate", "br"]; + if (supportsZstd) { + supportedEncodings.push("zstd"); } - get aborted() { - return this[ABORTED]; + if (!supportedEncodings.includes(contentEncoding)) { + return response; } - set aborted(_) {} - - write(chunk, encoding, cb) { - if (this[ABORTED]) return false; - if (this[EOF]) throw new Error("write after end"); - - if (this[DESTROYED]) { - this.emit( - "error", - Object.assign( - new Error("Cannot call write after a stream was destroyed"), - { code: "ERR_STREAM_DESTROYED" } - ) - ); - return true; - } - if (typeof encoding === "function") - (cb = encoding), (encoding = "utf8"); - - if (!encoding) encoding = "utf8"; - - const fn = this[ASYNC] ? defer : (f) => f(); - - // convert array buffers and typed array views into buffers - // at some point in the future, we may want to do the opposite! - // leave strings and buffers as-is - // anything else switches us into object mode - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) - chunk = Buffer.from( - chunk.buffer, - chunk.byteOffset, - chunk.byteLength - ); - else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk); - else if (typeof chunk !== "string") - // use the setter so we throw if we have encoding set - this.objectMode = true; - } - - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true); - - if (this.flowing) this.emit("data", chunk); - else this[BUFFERPUSH](chunk); + let isEmpty = true; - if (this[BUFFERLENGTH] !== 0) this.emit("readable"); + // Clone headers to avoid modifying the original response headers + const headers = { ...response.headers }; - if (cb) fn(cb); + const finalStream = new external_node_stream_.PassThrough({ + autoDestroy: false, + }); - return this.flowing; - } + // Only destroy response on error, not on normal completion + finalStream.once("error", () => { + response.destroy(); + }); - // at this point the chunk is a buffer or string - // don't buffer it up or send it to the decoder - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) this.emit("readable"); - if (cb) fn(cb); - return this.flowing; - } + function handleContentEncoding(data) { + let decompressStream; - // fast-path writing strings of same encoding to a stream with - // an empty buffer, skipping the buffer/decoder dance - if ( - typeof chunk === "string" && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed) + if (contentEncoding === "zstd") { + decompressStream = external_node_zlib_.createZstdDecompress(); + } else if (contentEncoding === "br") { + decompressStream = external_node_zlib_.createBrotliDecompress(); + } else if ( + contentEncoding === "deflate" && + data.length > 0 && + (data[0] & 0x08) === 0 ) { - chunk = Buffer.from(chunk, encoding); - } - - if (Buffer.isBuffer(chunk) && this[ENCODING]) - chunk = this[DECODER].write(chunk); - - // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true); - - if (this.flowing) this.emit("data", chunk); - else this[BUFFERPUSH](chunk); - - if (this[BUFFERLENGTH] !== 0) this.emit("readable"); - - if (cb) fn(cb); - - return this.flowing; - } - - read(n) { - if (this[DESTROYED]) return null; - - if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END](); - return null; - } - - if (this[OBJECTMODE]) n = null; - - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - if (this.encoding) this[BUFFER] = [this[BUFFER].join("")]; - else - this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])]; - } - - const ret = this[READ](n || null, this[BUFFER][0]); - this[MAYBE_EMIT_END](); - return ret; - } - - [READ](n, chunk) { - if (n === chunk.length || n === null) this[BUFFERSHIFT](); - else { - this[BUFFER][0] = chunk.slice(n); - chunk = chunk.slice(0, n); - this[BUFFERLENGTH] -= n; + // eslint-disable-line no-bitwise + decompressStream = external_node_zlib_.createInflateRaw(); + } else { + decompressStream = external_node_zlib_.createUnzip(); } - this.emit("data", chunk); - - if (!this[BUFFER].length && !this[EOF]) this.emit("drain"); - - return chunk; - } - - end(chunk, encoding, cb) { - if (typeof chunk === "function") (cb = chunk), (chunk = null); - if (typeof encoding === "function") - (cb = encoding), (encoding = "utf8"); - if (chunk) this.write(chunk, encoding); - if (cb) this.once("end", cb); - this[EOF] = true; - this.writable = false; - - // if we haven't written anything, then go ahead and emit, - // even if we're not reading. - // we'll re-emit if a new 'end' listener is added anyway. - // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) this[MAYBE_EMIT_END](); - return this; - } - - // don't let the internal resume be overwritten - [RESUME]() { - if (this[DESTROYED]) return; - - this[PAUSED] = false; - this[FLOWING] = true; - this.emit("resume"); - if (this[BUFFER].length) this[FLUSH](); - else if (this[EOF]) this[MAYBE_EMIT_END](); - else this.emit("drain"); - } - - resume() { - return this[RESUME](); - } - - pause() { - this[FLOWING] = false; - this[PAUSED] = true; - } + decompressStream.once("error", (error) => { + if (isEmpty && !response.readable) { + finalStream.end(); + return; + } - get destroyed() { - return this[DESTROYED]; - } + finalStream.destroy(error); + }); - get flowing() { - return this[FLOWING]; + checker.pipe(decompressStream).pipe(finalStream); } - get paused() { - return this[PAUSED]; - } + const checker = new external_node_stream_.Transform({ + transform(data, _encoding, callback) { + if (isEmpty === false) { + callback(null, data); + return; + } - [BUFFERPUSH](chunk) { - if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1; - else this[BUFFERLENGTH] += chunk.length; - this[BUFFER].push(chunk); - } + isEmpty = false; - [BUFFERSHIFT]() { - if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1; - else this[BUFFERLENGTH] -= this[BUFFER][0].length; - return this[BUFFER].shift(); - } + handleContentEncoding(data); - [FLUSH](noDrain) { - do {} while ( - this[FLUSHCHUNK](this[BUFFERSHIFT]()) && - this[BUFFER].length - ); + callback(null, data); + }, - if (!noDrain && !this[BUFFER].length && !this[EOF]) - this.emit("drain"); - } + flush(callback) { + if (isEmpty) { + finalStream.end(); + } - [FLUSHCHUNK](chunk) { - this.emit("data", chunk); - return this.flowing; - } + callback(); + }, + }); - pipe(dest, opts) { - if (this[DESTROYED]) return; + delete headers["content-encoding"]; + delete headers["content-length"]; + finalStream.headers = headers; - const ended = this[EMITTED_END]; - opts = opts || {}; - if (dest === proc.stdout || dest === proc.stderr) opts.end = false; - else opts.end = opts.end !== false; - opts.proxyErrors = !!opts.proxyErrors; + mimicResponse(response, finalStream); - // piping an ended stream ends immediately - if (ended) { - if (opts.end) dest.end(); - } else { - this[PIPES].push( - !opts.proxyErrors - ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts) - ); - if (this[ASYNC]) defer(() => this[RESUME]()); - else this[RESUME](); - } + response.pipe(checker); - return dest; - } + return finalStream; + } - unpipe(dest) { - const p = this[PIPES].find((p) => p.dest === dest); - if (p) { - this[PIPES].splice(this[PIPES].indexOf(p), 1); - p.unpipe(); + // EXTERNAL MODULE: external "node:util" + var external_node_util_ = __nccwpck_require__(7975); // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/defer-to-connect.js + function isTlsSocket(socket) { + return "encrypted" in socket; + } + const deferToConnect = (socket, fn) => { + const listeners = typeof fn === "function" ? { connect: fn } : fn; + const onConnect = () => { + listeners.connect?.(); + if (isTlsSocket(socket) && listeners.secureConnect) { + if (socket.authorized) { + listeners.secureConnect(); + } else { + // Wait for secureConnect event (even if authorization fails, we need the timing) + socket.once("secureConnect", listeners.secureConnect); + } } - } - - addListener(ev, fn) { - return this.on(ev, fn); - } - - on(ev, fn) { - const ret = super.on(ev, fn); - if (ev === "data" && !this[PIPES].length && !this.flowing) - this[RESUME](); - else if (ev === "readable" && this[BUFFERLENGTH] !== 0) - super.emit("readable"); - else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev); - this.removeAllListeners(ev); - } else if (ev === "error" && this[EMITTED_ERROR]) { - if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])); - else fn.call(this, this[EMITTED_ERROR]); + if (listeners.close) { + socket.once("close", listeners.close); } - return ret; + }; + if (socket.writable && !socket.connecting) { + onConnect(); + } else if (socket.connecting) { + socket.once("connect", onConnect); + } else if (socket.destroyed && listeners.close) { + const hadError = + "_hadError" in socket ? Boolean(socket._hadError) : false; + listeners.close(hadError); } + }; + /* harmony default export */ const defer_to_connect = deferToConnect; // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/timer.js - get emittedEnd() { - return this[EMITTED_END]; + const getInitialConnectionTimings = (socket) => + Reflect.get(socket, "__initial_connection_timings__"); + const setInitialConnectionTimings = (socket, timings) => { + Reflect.set(socket, "__initial_connection_timings__", timings); + }; + const timer = (request) => { + if (request.timings) { + return request.timings; } - - [MAYBE_EMIT_END]() { - if ( - !this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this[BUFFER].length === 0 && - this[EOF] - ) { - this[EMITTING_END] = true; - this.emit("end"); - this.emit("prefinish"); - this.emit("finish"); - if (this[CLOSED]) this.emit("close"); - this[EMITTING_END] = false; + const timings = { + start: Date.now(), + socket: undefined, + lookup: undefined, + connect: undefined, + secureConnect: undefined, + upload: undefined, + response: undefined, + end: undefined, + error: undefined, + abort: undefined, + phases: { + wait: undefined, + dns: undefined, + tcp: undefined, + tls: undefined, + request: undefined, + firstByte: undefined, + download: undefined, + total: undefined, + }, + }; + request.timings = timings; + const handleError = (origin) => { + origin.once(external_node_events_.errorMonitor, () => { + timings.error = Date.now(); + timings.phases.total = timings.error - timings.start; + }); + }; + handleError(request); + const onAbort = () => { + timings.abort = Date.now(); + timings.phases.total = timings.abort - timings.start; + }; + request.prependOnceListener("abort", onAbort); + const onSocket = (socket) => { + timings.socket = Date.now(); + timings.phases.wait = timings.socket - timings.start; + if (external_node_util_.types.isProxy(socket)) { + // HTTP/2: The socket is a proxy, so connection events won't fire. + // We can't measure connection timings, so leave them undefined. + // This prevents NaN in phases.request calculation. + return; } - } - - emit(ev, data, ...extra) { - // error and close are only events allowed after calling destroy() - if ( - ev !== "error" && - ev !== "close" && - ev !== DESTROYED && - this[DESTROYED] - ) + // Check if socket is already connected (reused from connection pool) + const socketAlreadyConnected = socket.writable && !socket.connecting; + if (socketAlreadyConnected) { + // Socket reuse detected: the socket was already connected from a previous request. + // For reused sockets, set all connection timestamps to socket time since no new + // connection was made for THIS request. But preserve phase durations from the + // original connection so they're not lost. + timings.lookup = timings.socket; + timings.connect = timings.socket; + const initialConnectionTimings = + getInitialConnectionTimings(socket); + if (initialConnectionTimings) { + // Restore the phase timings from the initial connection + timings.phases.dns = initialConnectionTimings.dnsPhase; + timings.phases.tcp = initialConnectionTimings.tcpPhase; + timings.phases.tls = initialConnectionTimings.tlsPhase; + // Set secureConnect timestamp if there was TLS + if (timings.phases.tls !== undefined) { + timings.secureConnect = timings.socket; + } + } else { + // Socket reused but no initial timings stored (e.g., from external code) + // Set phases to 0 + timings.phases.dns = 0; + timings.phases.tcp = 0; + } return; - else if (ev === "data") { - return !this[OBJECTMODE] && !data - ? false - : this[ASYNC] - ? defer(() => this[EMITDATA](data)) - : this[EMITDATA](data); - } else if (ev === "end") { - return this[EMITEND](); - } else if (ev === "close") { - this[CLOSED] = true; - // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) return; - const ret = super.emit("close"); - this.removeAllListeners("close"); - return ret; - } else if (ev === "error") { - this[EMITTED_ERROR] = data; - super.emit(ERROR, data); - const ret = - !this[SIGNAL] || this.listeners("error").length - ? super.emit("error", data) - : false; - this[MAYBE_EMIT_END](); - return ret; - } else if (ev === "resume") { - const ret = super.emit("resume"); - this[MAYBE_EMIT_END](); - return ret; - } else if (ev === "finish" || ev === "prefinish") { - const ret = super.emit(ev); - this.removeAllListeners(ev); - return ret; - } - - // Some other unknown event - const ret = super.emit(ev, data, ...extra); - this[MAYBE_EMIT_END](); - return ret; + } + const lookupListener = () => { + timings.lookup = Date.now(); + timings.phases.dns = timings.lookup - timings.socket; + }; + socket.prependOnceListener("lookup", lookupListener); + defer_to_connect(socket, { + connect() { + timings.connect = Date.now(); + if (timings.lookup === undefined) { + // No DNS lookup occurred (e.g., connecting to an IP address directly) + // Set lookup to socket time (no time elapsed for DNS) + socket.removeListener("lookup", lookupListener); + timings.lookup = timings.socket; + timings.phases.dns = 0; + } + timings.phases.tcp = timings.connect - timings.lookup; + // If lookup and connect happen at the EXACT same time (tcp = 0), + // DNS was served from cache and the dns value is just event loop overhead. + // Set dns to 0 to indicate no actual DNS resolution occurred. + // Fixes https://github.com/szmarczak/http-timer/issues/35 + if ( + timings.phases.tcp === 0 && + timings.phases.dns && + timings.phases.dns > 0 + ) { + timings.phases.dns = 0; + } + // Store connection phase timings on socket for potential reuse + if (!getInitialConnectionTimings(socket)) { + setInitialConnectionTimings(socket, { + dnsPhase: timings.phases.dns, + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- TypeScript can't prove this is defined due to callback structure + tcpPhase: timings.phases.tcp, + }); + } + }, + secureConnect() { + timings.secureConnect = Date.now(); + timings.phases.tls = timings.secureConnect - timings.connect; + // Update stored timings with TLS phase timing + const initialConnectionTimings = + getInitialConnectionTimings(socket); + if (initialConnectionTimings) { + initialConnectionTimings.tlsPhase = timings.phases.tls; + } + }, + }); + }; + if (request.socket) { + onSocket(request.socket); + } else { + request.prependOnceListener("socket", onSocket); } - - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) this.pause(); + const onUpload = () => { + timings.upload = Date.now(); + // Calculate request phase if we have connection timings + const secureOrConnect = timings.secureConnect ?? timings.connect; + if (secureOrConnect !== undefined) { + timings.phases.request = timings.upload - secureOrConnect; } - const ret = super.emit("data", data); - this[MAYBE_EMIT_END](); - return ret; - } - - [EMITEND]() { - if (this[EMITTED_END]) return; - - this[EMITTED_END] = true; - this.readable = false; - if (this[ASYNC]) defer(() => this[EMITEND2]()); - else this[EMITEND2](); + // If both are undefined (HTTP/2), phases.request stays undefined (not NaN) + }; + if (request.writableFinished) { + onUpload(); + } else { + request.prependOnceListener("finish", onUpload); } - - [EMITEND2]() { - if (this[DECODER]) { - const data = this[DECODER].end(); - if (data) { - for (const p of this[PIPES]) { - p.dest.write(data); - } - super.emit("data", data); + request.prependOnceListener("response", (response) => { + timings.response = Date.now(); + timings.phases.firstByte = timings.response - timings.upload; + response.timings = timings; + handleError(response); + response.prependOnceListener("end", () => { + request.off("abort", onAbort); + response.off("aborted", onAbort); + if (timings.phases.total !== undefined) { + // Aborted or errored + return; } - } + timings.end = Date.now(); + timings.phases.download = timings.end - timings.response; + timings.phases.total = timings.end - timings.start; + }); + response.prependOnceListener("aborted", onAbort); + }); + return timings; + }; + /* harmony default export */ const utils_timer = timer; // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/get-body-size.js - for (const p of this[PIPES]) { - p.end(); - } - const ret = super.emit("end"); - this.removeAllListeners("end"); - return ret; + function getBodySize(body, headers) { + if (headers && "content-length" in headers) { + return Number(headers["content-length"]); } - - // const all = await stream.collect() - collect() { - const buf = []; - if (!this[OBJECTMODE]) buf.dataLength = 0; - // set the promise first, in case an error is raised - // by triggering the flow here. - const p = this.promise(); - this.on("data", (c) => { - buf.push(c); - if (!this[OBJECTMODE]) buf.dataLength += c.length; - }); - return p.then(() => buf); - } - - // const data = await stream.concat() - concat() { - return this[OBJECTMODE] - ? Promise.reject(new Error("cannot concat in objectMode")) - : this.collect().then((buf) => - this[OBJECTMODE] - ? Promise.reject(new Error("cannot concat in objectMode")) - : this[ENCODING] - ? buf.join("") - : Buffer.concat(buf, buf.dataLength) - ); + if (!body) { + return 0; } - - // stream.promise().then(() => done, er => emitted error) - promise() { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error("stream destroyed"))); - this.on("error", (er) => reject(er)); - this.on("end", () => resolve()); - }); + if (distribution.string(body)) { + return stringToUint8Array(body).byteLength; } - - // for await (let chunk of stream) - [ASYNCITERATOR]() { - let stopped = false; - const stop = () => { - this.pause(); - stopped = true; - return Promise.resolve({ done: true }); - }; - const next = () => { - if (stopped) return stop(); - const res = this.read(); - if (res !== null) - return Promise.resolve({ done: false, value: res }); - - if (this[EOF]) return stop(); - - let resolve = null; - let reject = null; - const onerr = (er) => { - this.removeListener("data", ondata); - this.removeListener("end", onend); - this.removeListener(DESTROYED, ondestroy); - stop(); - reject(er); - }; - const ondata = (value) => { - this.removeListener("error", onerr); - this.removeListener("end", onend); - this.removeListener(DESTROYED, ondestroy); - this.pause(); - resolve({ value: value, done: !!this[EOF] }); - }; - const onend = () => { - this.removeListener("error", onerr); - this.removeListener("data", ondata); - this.removeListener(DESTROYED, ondestroy); - stop(); - resolve({ done: true }); - }; - const ondestroy = () => onerr(new Error("stream destroyed")); - return new Promise((res, rej) => { - reject = rej; - resolve = res; - this.once(DESTROYED, ondestroy); - this.once("error", onerr); - this.once("end", onend); - this.once("data", ondata); - }); - }; - - return { - next, - throw: stop, - return: stop, - [ASYNCITERATOR]() { - return this; - }, - }; + if (distribution.buffer(body)) { + return body.length; } + if (distribution.typedArray(body)) { + return body.byteLength; + } + return undefined; + } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/proxy-events.js - // for (let chunk of stream) - [ITERATOR]() { - let stopped = false; - const stop = () => { - this.pause(); - this.removeListener(ERROR, stop); - this.removeListener(DESTROYED, stop); - this.removeListener("end", stop); - stopped = true; - return { done: true }; - }; - - const next = () => { - if (stopped) return stop(); - const value = this.read(); - return value === null ? stop() : { value }; - }; - this.once("end", stop); - this.once(ERROR, stop); - this.once(DESTROYED, stop); - - return { - next, - throw: stop, - return: stop, - [ITERATOR]() { - return this; - }, + function proxyEvents(from, to, events) { + const eventFunctions = new Map(); + for (const event of events) { + const eventFunction = (...arguments_) => { + to.emit(event, ...arguments_); }; + eventFunctions.set(event, eventFunction); + from.on(event, eventFunction); } - - destroy(er) { - if (this[DESTROYED]) { - if (er) this.emit("error", er); - else this.emit(DESTROYED); - return this; + return () => { + for (const [event, eventFunction] of eventFunctions) { + from.off(event, eventFunction); } - - this[DESTROYED] = true; - - // throw away all buffered data, it's never coming out - this[BUFFER].length = 0; - this[BUFFERLENGTH] = 0; - - if (typeof this.close === "function" && !this[CLOSED]) this.close(); - - if (er) this.emit("error", er); - // if no error to emit, still reject pending promises - else this.emit(DESTROYED); - - return this; - } - - static isStream(s) { - return ( - !!s && - (s instanceof Minipass || - s instanceof Stream || - (s instanceof EE && - // readable - (typeof s.pipe === "function" || - // writable - (typeof s.write === "function" && - typeof s.end === "function")))) - ); - } + }; } - module.exports = Minipass; - - /***/ - }, - - /***/ 7952: /***/ (module) => { - "use strict"; - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs - const DATA_URL_DEFAULT_MIME_TYPE = "text/plain"; - const DATA_URL_DEFAULT_CHARSET = "us-ascii"; - - const testParameter = (name, filters) => { - return filters.some((filter) => - filter instanceof RegExp ? filter.test(name) : filter === name - ); - }; - - const normalizeDataURL = (urlString, { stripHash }) => { - const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec( - urlString - ); - - if (!match) { - throw new Error(`Invalid URL: ${urlString}`); - } - - let { type, data, hash } = match.groups; - const mediaType = type.split(";"); - hash = stripHash ? "" : hash; - - let isBase64 = false; - if (mediaType[mediaType.length - 1] === "base64") { - mediaType.pop(); - isBase64 = true; - } - - // Lowercase MIME type - const mimeType = (mediaType.shift() || "").toLowerCase(); - const attributes = mediaType - .map((attribute) => { - let [key, value = ""] = attribute - .split("=") - .map((string) => string.trim()); - - // Lowercase `charset` - if (key === "charset") { - value = value.toLowerCase(); - - if (value === DATA_URL_DEFAULT_CHARSET) { - return ""; - } + // EXTERNAL MODULE: external "node:net" + var external_node_net_ = __nccwpck_require__(7030); // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/unhandle.js + // When attaching listeners, it's very easy to forget about them. + // Especially if you do error handling and set timeouts. + // So instead of checking if it's proper to throw an error on every timeout ever, + // use this simple tool which will remove all listeners you have attached. + function unhandle() { + const handlers = []; + return { + once(origin, event, function_) { + origin.once(event, function_); + handlers.push({ origin, event, fn: function_ }); + }, + unhandleAll() { + for (const { origin, event, fn } of handlers) { + origin.removeListener(event, fn); } - - return `${key}${value ? `=${value}` : ""}`; - }) - .filter(Boolean); - - const normalizedMediaType = [...attributes]; - - if (isBase64) { - normalizedMediaType.push("base64"); - } - - if ( - normalizedMediaType.length !== 0 || - (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE) - ) { - normalizedMediaType.unshift(mimeType); - } - - return `data:${normalizedMediaType.join(";")},${ - isBase64 ? data.trim() : data - }${hash ? `#${hash}` : ""}`; - }; - - const normalizeUrl = (urlString, options) => { - options = { - defaultProtocol: "http:", - normalizeProtocol: true, - forceHttp: false, - forceHttps: false, - stripAuthentication: true, - stripHash: false, - stripTextFragment: true, - stripWWW: true, - removeQueryParameters: [/^utm_\w+/i], - removeTrailingSlash: true, - removeSingleSlash: true, - removeDirectoryIndex: false, - sortQueryParameters: true, - ...options, + handlers.length = 0; + }, }; + } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/timed-out.js - urlString = urlString.trim(); - - // Data URL - if (/^data:/i.test(urlString)) { - return normalizeDataURL(urlString, options); - } - - if (/^view-source:/i.test(urlString)) { - throw new Error( - "`view-source:` is not supported as it is a non-standard protocol" - ); + const reentry = Symbol("reentry"); + const timed_out_noop = () => {}; + class timed_out_TimeoutError extends Error { + name = "TimeoutError"; + code = "ETIMEDOUT"; + event; + constructor(threshold, event) { + super(`Timeout awaiting '${event}' for ${threshold}ms`); + this.event = event; } - - const hasRelativeProtocol = urlString.startsWith("//"); - const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); - - // Prepend protocol - if (!isRelativeUrl) { - urlString = urlString.replace( - /^(?!(?:\w+:)?\/\/)|^\/\//, - options.defaultProtocol - ); + } + function timedOut(request, delays, options) { + if (reentry in request) { + return timed_out_noop; } - - const urlObj = new URL(urlString); - - if (options.forceHttp && options.forceHttps) { - throw new Error( - "The `forceHttp` and `forceHttps` options cannot be used together" + request[reentry] = true; + const cancelers = []; + const { once, unhandleAll } = unhandle(); + const handled = new Set(); + const addTimeout = (delay, callback, event) => { + const timeout = setTimeout(callback, delay, delay, event); + timeout.unref?.(); + const cancel = () => { + handled.add(event); + clearTimeout(timeout); + }; + cancelers.push(cancel); + return cancel; + }; + const { host, hostname } = options; + const timeoutHandler = (delay, event) => { + // Use setTimeout to allow for any cancelled events to be handled first, + // to prevent firing any TimeoutError unneeded when the event loop is busy or blocked + setTimeout(() => { + if (!handled.has(event)) { + request.destroy(new timed_out_TimeoutError(delay, event)); + } + }, 0); + }; + const cancelTimeouts = () => { + for (const cancel of cancelers) { + cancel(); + } + unhandleAll(); + }; + request.once("error", (error) => { + cancelTimeouts(); + // Save original behavior + /* istanbul ignore next */ + if (request.listenerCount("error") === 0) { + throw error; + } + }); + if (delays.request !== undefined) { + const cancelTimeout = addTimeout( + delays.request, + timeoutHandler, + "request", ); + once(request, "response", (response) => { + once(response, "end", cancelTimeout); + }); } - - if (options.forceHttp && urlObj.protocol === "https:") { - urlObj.protocol = "http:"; - } - - if (options.forceHttps && urlObj.protocol === "http:") { - urlObj.protocol = "https:"; - } - - // Remove auth - if (options.stripAuthentication) { - urlObj.username = ""; - urlObj.password = ""; - } - - // Remove hash - if (options.stripHash) { - urlObj.hash = ""; - } else if (options.stripTextFragment) { - urlObj.hash = urlObj.hash.replace(/#?:~:text.*?$/i, ""); + if (delays.socket !== undefined) { + const { socket } = delays; + const socketTimeoutHandler = () => { + timeoutHandler(socket, "socket"); + }; + request.setTimeout(socket, socketTimeoutHandler); + // `request.setTimeout(0)` causes a memory leak. + // We can just remove the listener and forget about the timer - it's unreffed. + // See https://github.com/sindresorhus/got/issues/690 + cancelers.push(() => { + request.removeListener("timeout", socketTimeoutHandler); + }); } - - // Remove duplicate slashes if not preceded by a protocol - if (urlObj.pathname) { - urlObj.pathname = urlObj.pathname.replace( - /(? { + const { socketPath } = request; + /* istanbul ignore next: hard to test */ + if (socket.connecting) { + const hasPath = Boolean( + socketPath ?? + external_node_net_.isIP(hostname ?? host ?? "") !== 0, + ); + if ( + hasLookup && + !hasPath && + socket.address().address === undefined + ) { + const cancelTimeout = addTimeout( + delays.lookup, + timeoutHandler, + "lookup", + ); + once(socket, "lookup", cancelTimeout); + } + if (hasConnect) { + const timeConnect = () => + addTimeout(delays.connect, timeoutHandler, "connect"); + if (hasPath) { + once(socket, "connect", timeConnect()); + } else { + once(socket, "lookup", (error) => { + if (error === null) { + once(socket, "connect", timeConnect()); + } + }); + } + } + if (hasSecureConnect && options.protocol === "https:") { + once(socket, "connect", () => { + const cancelTimeout = addTimeout( + delays.secureConnect, + timeoutHandler, + "secureConnect", + ); + once(socket, "secureConnect", cancelTimeout); + }); + } + } + if (hasSend) { + const timeRequest = () => + addTimeout(delays.send, timeoutHandler, "send"); + /* istanbul ignore next: hard to test */ + if (socket.connecting) { + once(socket, "connect", () => { + once(request, "upload-complete", timeRequest()); + }); + } else { + once(request, "upload-complete", timeRequest()); + } + } + }); } - - // Decode URI octets - if (urlObj.pathname) { - try { - urlObj.pathname = decodeURI(urlObj.pathname); - } catch (_) {} + if (delays.response !== undefined) { + once(request, "upload-complete", () => { + const cancelTimeout = addTimeout( + delays.response, + timeoutHandler, + "response", + ); + once(request, "response", cancelTimeout); + }); } - - // Remove directory index - if (options.removeDirectoryIndex === true) { - options.removeDirectoryIndex = [/^index\.[a-z]+$/]; + if (delays.read !== undefined) { + once(request, "response", (response) => { + const cancelTimeout = addTimeout( + delays.read, + timeoutHandler, + "read", + ); + once(response, "end", cancelTimeout); + }); } + return cancelTimeouts; + } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/weakable-map.js - if ( - Array.isArray(options.removeDirectoryIndex) && - options.removeDirectoryIndex.length > 0 - ) { - let pathComponents = urlObj.pathname.split("/"); - const lastComponent = pathComponents[pathComponents.length - 1]; - - if (testParameter(lastComponent, options.removeDirectoryIndex)) { - pathComponents = pathComponents.slice(0, pathComponents.length - 1); - urlObj.pathname = pathComponents.slice(1).join("/") + "/"; + class WeakableMap { + weakMap = new WeakMap(); + map = new Map(); + set(key, value) { + if (typeof key === "object") { + this.weakMap.set(key, value); + } else { + this.map.set(key, value); } } - - if (urlObj.hostname) { - // Remove trailing dot - urlObj.hostname = urlObj.hostname.replace(/\.$/, ""); - - // Remove `www.` - if ( - options.stripWWW && - /^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test( - urlObj.hostname - ) - ) { - // Each label should be max 63 at length (min: 1). - // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names - // Each TLD should be up to 63 characters long (min: 2). - // It is technically possible to have a single character TLD, but none currently exist. - urlObj.hostname = urlObj.hostname.replace(/^www\./, ""); + get(key) { + if (typeof key === "object") { + return this.weakMap.get(key); } + return this.map.get(key); } - - // Remove query unwanted parameters - if (Array.isArray(options.removeQueryParameters)) { - for (const key of [...urlObj.searchParams.keys()]) { - if (testParameter(key, options.removeQueryParameters)) { - urlObj.searchParams.delete(key); - } + has(key) { + if (typeof key === "object") { + return this.weakMap.has(key); } + return this.map.has(key); } + } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/calculate-retry-delay.js - if (options.removeQueryParameters === true) { - urlObj.search = ""; - } - - // Sort query parameters - if (options.sortQueryParameters) { - urlObj.searchParams.sort(); - } - - if (options.removeTrailingSlash) { - urlObj.pathname = urlObj.pathname.replace(/\/$/, ""); - } - - const oldUrlString = urlString; - - // Take advantage of many of the Node `url` normalizations - urlString = urlObj.toString(); - - if ( - !options.removeSingleSlash && - urlObj.pathname === "/" && - !oldUrlString.endsWith("/") && - urlObj.hash === "" - ) { - urlString = urlString.replace(/\/$/, ""); + const calculateRetryDelay = ({ + attemptCount, + retryOptions, + error, + retryAfter, + computedValue, + }) => { + if (error.name === "RetryError") { + return 1; } - - // Remove ending `/` unless removeSingleSlash is false - if ( - (options.removeTrailingSlash || urlObj.pathname === "/") && - urlObj.hash === "" && - options.removeSingleSlash - ) { - urlString = urlString.replace(/\/$/, ""); + if (attemptCount > retryOptions.limit) { + return 0; } - - // Restore relative protocol, if applicable - if (hasRelativeProtocol && !options.normalizeProtocol) { - urlString = urlString.replace(/^http:\/\//, "//"); + const hasMethod = retryOptions.methods.includes(error.options.method); + const hasErrorCode = retryOptions.errorCodes.includes(error.code); + const hasStatusCode = + error.response && + retryOptions.statusCodes.includes(error.response.statusCode); + if (!hasMethod || (!hasErrorCode && !hasStatusCode)) { + return 0; } - - // Remove http/https - if (options.stripProtocol) { - urlString = urlString.replace(/^(?:https?:)?\/\//, ""); + if (error.response) { + if (retryAfter) { + // In this case `computedValue` is `options.request.timeout` + return retryAfter > computedValue ? 0 : retryAfter; + } + if (error.response.statusCode === 413) { + return 0; + } } - - return urlString; + const noise = Math.random() * retryOptions.noise; + return ( + Math.min(2 ** (attemptCount - 1) * 1000, retryOptions.backoffLimit) + + noise + ); }; + /* harmony default export */ const calculate_retry_delay = + calculateRetryDelay; + + // EXTERNAL MODULE: external "node:tls" + var external_node_tls_ = __nccwpck_require__(1692); // CONCATENATED MODULE: external "node:https" + const external_node_https_namespaceObject = require("node:https"); // CONCATENATED MODULE: ./node_modules/got/node_modules/lowercase-keys/index.js + function lowercase_keys_lowercaseKeys(object, { onConflict } = {}) { + if (typeof object !== "object" || object === null) { + throw new TypeError( + `Expected an object, got ${object === null ? "null" : typeof object}`, + ); + } - module.exports = normalizeUrl; + const result = {}; - /***/ - }, + for (const [key, value] of Object.entries(object)) { + const lowercasedKey = key.toLowerCase(); + const hasExistingKey = Object.hasOwn(result, lowercasedKey); + const existingValue = hasExistingKey + ? result[lowercasedKey] + : undefined; - /***/ 1223: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var wrappy = __nccwpck_require__(2940); - module.exports = wrappy(once); - module.exports.strict = wrappy(onceStrict); - - once.proto = once(function () { - Object.defineProperty(Function.prototype, "once", { - value: function () { - return once(this); - }, - configurable: true, - }); + const resolvedValue = + onConflict && hasExistingKey + ? onConflict({ + key: lowercasedKey, + newValue: value, + existingValue, + }) + : value; - Object.defineProperty(Function.prototype, "onceStrict", { - value: function () { - return onceStrict(this); - }, - configurable: true, - }); - }); + Object.defineProperty(result, lowercasedKey, { + value: resolvedValue, + writable: true, + enumerable: true, + configurable: true, + }); + } - function once(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; + return result; } - 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; - } + // EXTERNAL MODULE: external "node:dns" + var external_node_dns_ = __nccwpck_require__(610); // CONCATENATED MODULE: external "node:os" + const external_node_os_namespaceObject = require("node:os"); // CONCATENATED MODULE: ./node_modules/cacheable-lookup/source/index.js + const { Resolver: AsyncResolver } = external_node_dns_.promises; - /***/ - }, + const kCacheableLookupCreateConnection = Symbol( + "cacheableLookupCreateConnection", + ); + const kCacheableLookupInstance = Symbol("cacheableLookupInstance"); + const kExpires = Symbol("expires"); - /***/ 9072: /***/ (module) => { - "use strict"; + const supportsALL = typeof external_node_dns_.ALL === "number"; - class CancelError extends Error { - constructor(reason) { - super(reason || "Promise was canceled"); - this.name = "CancelError"; + const verifyAgent = (agent) => { + if (!(agent && typeof agent.createConnection === "function")) { + throw new Error("Expected an Agent instance as the first argument"); } + }; - get isCanceled() { - return true; - } - } + const map4to6 = (entries) => { + for (const entry of entries) { + if (entry.family === 6) { + continue; + } - class PCancelable { - static fn(userFn) { - return (...arguments_) => { - return new PCancelable((resolve, reject, onCancel) => { - arguments_.push(onCancel); - // eslint-disable-next-line promise/prefer-await-to-then - userFn(...arguments_).then(resolve, reject); - }); - }; + entry.address = `::ffff:${entry.address}`; + entry.family = 6; } + }; - constructor(executor) { - this._cancelHandlers = []; - this._isPending = true; - this._isCanceled = false; - this._rejectOnCancel = true; - - this._promise = new Promise((resolve, reject) => { - this._reject = reject; - - const onResolve = (value) => { - if (!this._isCanceled || !onCancel.shouldReject) { - this._isPending = false; - resolve(value); - } - }; - - const onReject = (error) => { - this._isPending = false; - reject(error); - }; - - const onCancel = (handler) => { - if (!this._isPending) { - throw new Error( - "The `onCancel` handler was attached after the promise settled." - ); - } - - this._cancelHandlers.push(handler); - }; + const getIfaceInfo = () => { + let has4 = false; + let has6 = false; - Object.defineProperties(onCancel, { - shouldReject: { - get: () => this._rejectOnCancel, - set: (boolean) => { - this._rejectOnCancel = boolean; - }, - }, - }); + for (const device of Object.values( + external_node_os_namespaceObject.networkInterfaces(), + )) { + for (const iface of device) { + if (iface.internal) { + continue; + } - return executor(onResolve, onReject, onCancel); - }); - } + if (iface.family === "IPv6") { + has6 = true; + } else { + has4 = true; + } - then(onFulfilled, onRejected) { - // eslint-disable-next-line promise/prefer-await-to-then - return this._promise.then(onFulfilled, onRejected); + if (has4 && has6) { + return { has4, has6 }; + } + } } - catch(onRejected) { - return this._promise.catch(onRejected); - } + return { has4, has6 }; + }; - finally(onFinally) { - return this._promise.finally(onFinally); - } + const source_isIterable = (map) => { + return Symbol.iterator in map; + }; - cancel(reason) { - if (!this._isPending || this._isCanceled) { - return; + const ignoreNoResultErrors = (dnsPromise) => { + return dnsPromise.catch((error) => { + if ( + error.code === "ENODATA" || + error.code === "ENOTFOUND" || + error.code === "ENOENT" // Windows: name exists, but not this record type + ) { + return []; } - this._isCanceled = true; - - if (this._cancelHandlers.length > 0) { - try { - for (const handler of this._cancelHandlers) { - handler(); - } - } catch (error) { - this._reject(error); - return; - } - } + throw error; + }); + }; - if (this._rejectOnCancel) { - this._reject(new CancelError(reason)); - } - } + const ttl = { ttl: true }; + const source_all = { all: true }; + const all4 = { all: true, family: 4 }; + const all6 = { all: true, family: 6 }; - get isCanceled() { - return this._isCanceled; - } - } + class CacheableLookup { + constructor({ + cache = new Map(), + maxTtl = Infinity, + fallbackDuration = 3600, + errorTtl = 0.15, + resolver = new AsyncResolver(), + lookup = external_node_dns_.lookup, + } = {}) { + this.maxTtl = maxTtl; + this.errorTtl = errorTtl; - Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); + this._cache = cache; + this._resolver = resolver; + this._dnsLookup = + lookup && (0, external_node_util_.promisify)(lookup); + this.stats = { + cache: 0, + query: 0, + }; - module.exports = PCancelable; - module.exports.CancelError = CancelError; + if (this._resolver instanceof AsyncResolver) { + this._resolve4 = this._resolver.resolve4.bind(this._resolver); + this._resolve6 = this._resolver.resolve6.bind(this._resolver); + } else { + this._resolve4 = (0, external_node_util_.promisify)( + this._resolver.resolve4.bind(this._resolver), + ); + this._resolve6 = (0, external_node_util_.promisify)( + this._resolver.resolve6.bind(this._resolver), + ); + } - /***/ - }, + this._iface = getIfaceInfo(); - /***/ 8341: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var once = __nccwpck_require__(1223); - var eos = __nccwpck_require__(1205); - var fs = __nccwpck_require__(7147); // we only need fs to get the ReadStream and WriteStream prototypes + this._pending = {}; + this._nextRemovalTime = false; + this._hostnamesToFallback = new Set(); - var noop = function () {}; - var ancient = /^v?\.0/.test(process.version); + this.fallbackDuration = fallbackDuration; - var isFn = function (fn) { - return typeof fn === "function"; - }; + if (fallbackDuration > 0) { + const interval = setInterval(() => { + this._hostnamesToFallback.clear(); + }, fallbackDuration * 1000); - var isFS = function (stream) { - if (!ancient) return false; // newer node version do not need to care about fs is a special way - if (!fs) return false; // browser - return ( - (stream instanceof (fs.ReadStream || noop) || - stream instanceof (fs.WriteStream || noop)) && - isFn(stream.close) - ); - }; + /* istanbul ignore next: There is no `interval.unref()` when running inside an Electron renderer */ + if (interval.unref) { + interval.unref(); + } - var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort); - }; + this._fallbackInterval = interval; + } - var destroyer = function (stream, reading, writing, callback) { - callback = once(callback); + this.lookup = this.lookup.bind(this); + this.lookupAsync = this.lookupAsync.bind(this); + } - var closed = false; - stream.on("close", function () { - closed = true; - }); + set servers(servers) { + this.clear(); - eos(stream, { readable: reading, writable: writing }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); + this._resolver.setServers(servers); + } - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; + get servers() { + return this._resolver.getServers(); + } - if (isFS(stream)) return stream.close(noop); // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort(); // request.destroy just do .end - .abort is what we want + lookup(hostname, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else if (typeof options === "number") { + options = { + family: options, + }; + } - if (isFn(stream.destroy)) return stream.destroy(); + if (!callback) { + throw new Error("Callback must be a function."); + } - callback(err || new Error("stream was destroyed")); - }; - }; + // eslint-disable-next-line promise/prefer-await-to-then + this.lookupAsync(hostname, options).then((result) => { + if (options.all) { + callback(null, result); + } else { + callback( + null, + result.address, + result.family, + result.expires, + result.ttl, + result.source, + ); + } + }, callback); + } - var call = function (fn) { - fn(); - }; + async lookupAsync(hostname, options = {}) { + if (typeof options === "number") { + options = { + family: options, + }; + } - var pipe = function (from, to) { - return from.pipe(to); - }; + let cached = await this.query(hostname); - var pump = function () { - var streams = Array.prototype.slice.call(arguments); - var callback = - (isFn(streams[streams.length - 1] || noop) && streams.pop()) || noop; - - if (Array.isArray(streams[0])) streams = streams[0]; - if (streams.length < 2) - throw new Error("pump requires two streams per minimum"); - - 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); - }); - }); + if (options.family === 6) { + const filtered = cached.filter((entry) => entry.family === 6); - return streams.reduce(pipe); - }; + if (options.hints & external_node_dns_.V4MAPPED) { + if ( + (supportsALL && options.hints & external_node_dns_.ALL) || + filtered.length === 0 + ) { + map4to6(cached); + } else { + cached = filtered; + } + } else { + cached = filtered; + } + } else if (options.family === 4) { + cached = cached.filter((entry) => entry.family === 4); + } - module.exports = pump; + if (options.hints & external_node_dns_.ADDRCONFIG) { + const { _iface } = this; + cached = cached.filter((entry) => + entry.family === 6 ? _iface.has6 : _iface.has4, + ); + } - /***/ - }, + if (cached.length === 0) { + const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`); + error.code = "ENOTFOUND"; + error.hostname = hostname; - /***/ 9273: /***/ (module) => { - "use strict"; + throw error; + } - class QuickLRU { - constructor(options = {}) { - if (!(options.maxSize && options.maxSize > 0)) { - throw new TypeError("`maxSize` must be a number greater than 0"); + if (options.all) { + return cached; } - this.maxSize = options.maxSize; - this.onEviction = options.onEviction; - this.cache = new Map(); - this.oldCache = new Map(); - this._size = 0; + return cached[0]; } - _set(key, value) { - this.cache.set(key, value); - this._size++; + async query(hostname) { + let source = "cache"; + let cached = await this._cache.get(hostname); - if (this._size >= this.maxSize) { - this._size = 0; + if (cached) { + this.stats.cache++; + } - if (typeof this.onEviction === "function") { - for (const [key, value] of this.oldCache.entries()) { - this.onEviction(key, value); + if (!cached) { + const pending = this._pending[hostname]; + if (pending) { + this.stats.cache++; + cached = await pending; + } else { + source = "query"; + const newPromise = this.queryAndCache(hostname); + this._pending[hostname] = newPromise; + this.stats.query++; + try { + cached = await newPromise; + } finally { + delete this._pending[hostname]; } } - - this.oldCache = this.cache; - this.cache = new Map(); } - } - get(key) { - if (this.cache.has(key)) { - return this.cache.get(key); - } + cached = cached.map((entry) => { + return { ...entry, source }; + }); - if (this.oldCache.has(key)) { - const value = this.oldCache.get(key); - this.oldCache.delete(key); - this._set(key, value); - return value; - } + return cached; } - set(key, value) { - if (this.cache.has(key)) { - this.cache.set(key, value); - } else { - this._set(key, value); - } + async _resolve(hostname) { + // ANY is unsafe as it doesn't trigger new queries in the underlying server. + const [A, AAAA] = await Promise.all([ + ignoreNoResultErrors(this._resolve4(hostname, ttl)), + ignoreNoResultErrors(this._resolve6(hostname, ttl)), + ]); - return this; - } + let aTtl = 0; + let aaaaTtl = 0; + let cacheTtl = 0; - has(key) { - return this.cache.has(key) || this.oldCache.has(key); - } + const now = Date.now(); - peek(key) { - if (this.cache.has(key)) { - return this.cache.get(key); + for (const entry of A) { + entry.family = 4; + entry.expires = now + entry.ttl * 1000; + + aTtl = Math.max(aTtl, entry.ttl); } - if (this.oldCache.has(key)) { - return this.oldCache.get(key); + for (const entry of AAAA) { + entry.family = 6; + entry.expires = now + entry.ttl * 1000; + + aaaaTtl = Math.max(aaaaTtl, entry.ttl); } - } - delete(key) { - const deleted = this.cache.delete(key); - if (deleted) { - this._size--; + if (A.length > 0) { + if (AAAA.length > 0) { + cacheTtl = Math.min(aTtl, aaaaTtl); + } else { + cacheTtl = aTtl; + } + } else { + cacheTtl = aaaaTtl; } - return this.oldCache.delete(key) || deleted; + return { + entries: [...A, ...AAAA], + cacheTtl, + }; } - clear() { - this.cache.clear(); - this.oldCache.clear(); - this._size = 0; - } + async _lookup(hostname) { + try { + const [A, AAAA] = await Promise.all([ + // Passing {all: true} doesn't return all IPv4 and IPv6 entries. + // See https://github.com/szmarczak/cacheable-lookup/issues/42 + ignoreNoResultErrors(this._dnsLookup(hostname, all4)), + ignoreNoResultErrors(this._dnsLookup(hostname, all6)), + ]); - *keys() { - for (const [key] of this) { - yield key; + return { + entries: [...A, ...AAAA], + cacheTtl: 0, + }; + } catch { + return { + entries: [], + cacheTtl: 0, + }; } } - *values() { - for (const [, value] of this) { - yield value; + async _set(hostname, data, cacheTtl) { + if (this.maxTtl > 0 && cacheTtl > 0) { + cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000; + data[kExpires] = Date.now() + cacheTtl; + + try { + await this._cache.set(hostname, data, cacheTtl); + } catch (error) { + this.lookupAsync = async () => { + const cacheError = new Error( + "Cache Error. Please recreate the CacheableLookup instance.", + ); + cacheError.cause = error; + + throw cacheError; + }; + } + + if (source_isIterable(this._cache)) { + this._tick(cacheTtl); + } } } - *[Symbol.iterator]() { - for (const item of this.cache) { - yield item; + async queryAndCache(hostname) { + if (this._hostnamesToFallback.has(hostname)) { + return this._dnsLookup(hostname, source_all); } - for (const item of this.oldCache) { - const [key] = item; - if (!this.cache.has(key)) { - yield item; - } - } - } + let query = await this._resolve(hostname); - get size() { - let oldCacheSize = 0; - for (const key of this.oldCache.keys()) { - if (!this.cache.has(key)) { - oldCacheSize++; + if (query.entries.length === 0 && this._dnsLookup) { + query = await this._lookup(hostname); + + if (query.entries.length !== 0 && this.fallbackDuration > 0) { + // Use `dns.lookup(...)` for that particular hostname + this._hostnamesToFallback.add(hostname); } } - return Math.min(this._size + oldCacheSize, this.maxSize); - } - } - - module.exports = QuickLRU; + const cacheTtl = + query.entries.length === 0 ? this.errorTtl : query.cacheTtl; + await this._set(hostname, query.entries, cacheTtl); - /***/ - }, + return query.entries; + } - /***/ 6624: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + _tick(ms) { + const nextRemovalTime = this._nextRemovalTime; - const tls = __nccwpck_require__(4404); + if (!nextRemovalTime || ms < nextRemovalTime) { + clearTimeout(this._removalTimeout); - module.exports = (options = {}, connect = tls.connect) => - new Promise((resolve, reject) => { - let timeout = false; + this._nextRemovalTime = ms; - let socket; + this._removalTimeout = setTimeout(() => { + this._nextRemovalTime = false; - const callback = async () => { - await socketPromise; + let nextExpiry = Infinity; - socket.off("timeout", onTimeout); - socket.off("error", reject); + const now = Date.now(); - if (options.resolveSocket) { - resolve({ alpnProtocol: socket.alpnProtocol, socket, timeout }); + for (const [hostname, entries] of this._cache) { + const expires = entries[kExpires]; - if (timeout) { - await Promise.resolve(); - socket.emit("timeout"); + if (now >= expires) { + this._cache.delete(hostname); + } else if (expires < nextExpiry) { + nextExpiry = expires; + } } - } else { - socket.destroy(); - resolve({ alpnProtocol: socket.alpnProtocol, timeout }); - } - }; - - const onTimeout = async () => { - timeout = true; - callback(); - }; - const socketPromise = (async () => { - try { - socket = await connect(options, callback); + if (nextExpiry !== Infinity) { + this._tick(nextExpiry - now); + } + }, ms); - socket.on("error", reject); - socket.once("timeout", onTimeout); - } catch (error) { - reject(error); + /* istanbul ignore next: There is no `timeout.unref()` when running inside an Electron renderer */ + if (this._removalTimeout.unref) { + this._removalTimeout.unref(); } - })(); - }); - - /***/ - }, - - /***/ 9004: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + } + } - const Readable = __nccwpck_require__(2781).Readable; - const lowercaseKeys = __nccwpck_require__(9662); + install(agent) { + verifyAgent(agent); - class Response extends Readable { - constructor(statusCode, headers, body, url) { - if (typeof statusCode !== "number") { - throw new TypeError("Argument `statusCode` should be a number"); - } - if (typeof headers !== "object") { - throw new TypeError("Argument `headers` should be an object"); - } - if (!(body instanceof Buffer)) { - throw new TypeError("Argument `body` should be a buffer"); - } - if (typeof url !== "string") { - throw new TypeError("Argument `url` should be a string"); + if (kCacheableLookupCreateConnection in agent) { + throw new Error("CacheableLookup has been already installed"); } - super(); - this.statusCode = statusCode; - this.headers = lowercaseKeys(headers); - this.body = body; - this.url = url; - } - - _read() { - this.push(this.body); - this.push(null); - } - } + agent[kCacheableLookupCreateConnection] = agent.createConnection; + agent[kCacheableLookupInstance] = this; - module.exports = Response; + agent.createConnection = (options, callback) => { + if (!("lookup" in options)) { + options.lookup = this.lookup; + } - /***/ - }, + return agent[kCacheableLookupCreateConnection](options, callback); + }; + } - /***/ 4294: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = __nccwpck_require__(4219); + uninstall(agent) { + verifyAgent(agent); - /***/ - }, + if (agent[kCacheableLookupCreateConnection]) { + if (agent[kCacheableLookupInstance] !== this) { + throw new Error( + "The agent is not owned by this CacheableLookup instance", + ); + } - /***/ 4219: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + agent.createConnection = agent[kCacheableLookupCreateConnection]; - var net = __nccwpck_require__(1808); - var tls = __nccwpck_require__(4404); - var http = __nccwpck_require__(3685); - var https = __nccwpck_require__(5687); - var events = __nccwpck_require__(2361); - var assert = __nccwpck_require__(9491); - var util = __nccwpck_require__(3837); + delete agent[kCacheableLookupCreateConnection]; + delete agent[kCacheableLookupInstance]; + } + } - exports.httpOverHttp = httpOverHttp; - exports.httpsOverHttp = httpsOverHttp; - exports.httpOverHttps = httpOverHttps; - exports.httpsOverHttps = httpsOverHttps; + updateInterfaceInfo() { + const { _iface } = this; - function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; - } + this._iface = getIfaceInfo(); - function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; - } + if ( + (_iface.has4 && !this._iface.has4) || + (_iface.has6 && !this._iface.has6) + ) { + this._cache.clear(); + } + } - function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; - } + clear(hostname) { + if (hostname) { + this._cache.delete(hostname); + return; + } - function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; + this._cache.clear(); + } } - 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; - } + // EXTERNAL MODULE: ./node_modules/http2-wrapper/source/index.js + var source = __nccwpck_require__(4956); // CONCATENATED MODULE: ./node_modules/got/dist/source/core/parse-link-header.js + const splitHeaderValue = (value, separator) => { + const values = []; + let current = ""; + let inQuotes = false; + let inReference = false; + let isEscaped = false; + for (const character of value) { + if (inQuotes && isEscaped) { + current += character; + isEscaped = false; + continue; } - socket.destroy(); - self.removeSocket(socket); - }); + if (inQuotes && character === "\\") { + current += character; + isEscaped = true; + continue; + } + if (character === '"') { + inQuotes = !inQuotes; + current += character; + continue; + } + if (!inQuotes && character === "<") { + inReference = true; + current += character; + continue; + } + if (!inQuotes && character === ">") { + inReference = false; + current += character; + continue; + } + // Link headers use both quoted strings and values, so raw + // splitting on `,` / `;` would break valid values containing those characters. + if (!inQuotes && !inReference && character === separator) { + values.push(current); + current = ""; + continue; + } + current += character; + } + if (inQuotes || isEscaped) { + throw new Error(`Failed to parse Link header: ${value}`); + } + values.push(current); + return values; + }; + function parseLinkHeader(link) { + const parsed = []; + const items = splitHeaderValue(link, ","); + for (const item of items) { + // https://tools.ietf.org/html/rfc5988#section-5 + const [rawUriReference, ...rawLinkParameters] = splitHeaderValue( + item, + ";", + ); + const trimmedUriReference = rawUriReference.trim(); + // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with + if ( + trimmedUriReference[0] !== "<" || + trimmedUriReference.at(-1) !== ">" + ) { + throw new Error( + `Invalid format of the Link header reference: ${trimmedUriReference}`, + ); + } + const reference = trimmedUriReference.slice(1, -1); + const parameters = {}; + if (reference.includes("<") || reference.includes(">")) { + throw new Error( + `Invalid format of the Link header reference: ${trimmedUriReference}`, + ); + } + if (rawLinkParameters.length === 0) { + throw new Error( + `Unexpected end of Link header parameters: ${rawLinkParameters.join(";")}`, + ); + } + for (const rawParameter of rawLinkParameters) { + const trimmedRawParameter = rawParameter.trim(); + const center = trimmedRawParameter.indexOf("="); + if (center === -1) { + throw new Error(`Failed to parse Link header: ${link}`); + } + const name = trimmedRawParameter.slice(0, center).trim(); + const value = trimmedRawParameter.slice(center + 1).trim(); + parameters[name] = value; + } + parsed.push({ + reference, + parameters, + }); + } + return parsed; + } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/is-unix-socket-url.js + + function isUnixSocketUrl(url) { + return url.protocol === "unix:" || url.hostname === "unix"; } - util.inherits(TunnelingAgent, events.EventEmitter); + /** +Extract the socket path from a UNIX socket URL. - TunnelingAgent.prototype.addRequest = function addRequest( - req, - host, - port, - localAddress - ) { - var self = this; - var options = mergeOptions( - { request: req }, - self.options, - toOptions(host, port, localAddress) - ); +@example +``` +getUnixSocketPath(new URL('http://unix/foo:/path')); +//=> '/foo' - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } +getUnixSocketPath(new URL('unix:/foo:/path')); +//=> '/foo' - // 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); +getUnixSocketPath(new URL('http://example.com')); +//=> undefined +``` +*/ + function getUnixSocketPath(url) { + if (!isUnixSocketUrl(url)) { + return undefined; + } + return /^(?[^:]+):/v.exec(`${url.pathname}${url.search}`) + ?.groups?.socketPath; + } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/options.js - function onFree() { - self.emit("free", socket, options); - } + // DO NOT use destructuring for `https.request` and `http.request` as it's not compatible with `nock`. - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener("free", onFree); - socket.removeListener("close", onCloseOrRemove); - socket.removeListener("agentRemove", onCloseOrRemove); + const [major, minor] = external_node_process_namespaceObject.versions.node + .split(".") + .map(Number); + /** +Generic helper that wraps any assertion function to add context to error messages. +*/ + function wrapAssertionWithContext(optionName, assertionFn) { + try { + assertionFn(); + } catch (error) { + if (error instanceof Error) { + error.message = `Option '${optionName}': ${error.message}`; } + throw error; + } + } + /** +Helper function that wraps assert.any() to provide better error messages. +When assertion fails, it includes the option name in the error message. +*/ + function options_assertAny(optionName, validators, value) { + wrapAssertionWithContext(optionName, () => { + assert.any(validators, value); }); - }; - - 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, - }, + } + /** +Helper function that wraps assert.plainObject() to provide better error messages. +When assertion fails, it includes the option name in the error message. +*/ + function options_assertPlainObject(optionName, value) { + wrapAssertionWithContext(optionName, () => { + assert.plainObject(value); }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; + } + function isSameOrigin(previousUrl, nextUrl) { + return ( + previousUrl.origin === nextUrl.origin && + getUnixSocketPath(previousUrl) === getUnixSocketPath(nextUrl) + ); + } + const crossOriginStripHeaders = [ + "host", + "cookie", + "cookie2", + "authorization", + "proxy-authorization", + ]; + const bodyHeaderNames = [ + "content-length", + "content-encoding", + "content-language", + "content-location", + "content-type", + "transfer-encoding", + ]; + function usesUnixSocket(url) { + return url.protocol === "unix:" || getUnixSocketPath(url) !== undefined; + } + function hasCredentialInUrl(url, credential) { + if (url instanceof URL) { + return url[credential] !== ""; } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers["Proxy-Authorization"] = - "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + if (!distribution.string(url)) { + return false; } - - 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; + try { + return new URL(url)[credential] !== ""; + } catch { + return false; } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function () { - onConnect(res, socket, head); - }); + } + const hasExplicitCredentialInUrlChange = ( + changedState, + url, + credential, + ) => + changedState.has(credential) || + (changedState.has("url") && url?.[credential] !== ""); + const hasProtocolSlashes = (value) => + /^[a-z][\d+\-.a-z]*:\/\//iv.test(value); + const hasHttpProtocolWithoutSlashes = (value) => + /^https?:(?!\/\/)/iv.test(value); + function applyUrlOverride(options, url, { username, password } = {}) { + if (distribution.string(url) && options.url) { + url = new URL(url, options.url).toString(); + } + options.prefixUrl = ""; + options.url = url; + if (username !== undefined) { + options.username = username; + } + if (password !== undefined) { + options.password = password; + } + return options.url; + } + function assertValidHeaderName(name) { + if (name.startsWith(":")) { + throw new TypeError( + `HTTP/2 pseudo-headers are not supported in \`options.headers\`: ${name}`, + ); } - - 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 + } + /** +Safely assign own properties from source to target, skipping `__proto__` to prevent prototype pollution from JSON.parse'd input. +*/ + function safeObjectAssign(target, source) { + for (const [key, value] of Object.entries(source)) { + if (key === "__proto__") { + continue; + } + Reflect.set(target, key, value); + } + } + const isToughCookieJar = (cookieJar) => + cookieJar.setCookie.length === 4 && + cookieJar.getCookieString.length === 0; + function validateSearchParameters(searchParameters) { + for (const key of Object.keys(searchParameters)) { + if (key === "__proto__") { + continue; + } + const value = searchParameters[key]; + options_assertAny( + `searchParams.${key}`, + [ + distribution.string, + distribution.number, + distribution.boolean, + distribution.null, + distribution.undefined, + ], + value, + ); + } + } + const globalCache = new Map(); + let globalDnsCache; + const getGlobalDnsCache = () => { + if (globalDnsCache) { + return globalDnsCache; + } + globalDnsCache = new CacheableLookup(); + return globalDnsCache; + }; + // Detects and wraps QuickLRU v7+ instances to make them compatible with the StorageAdapter interface + const wrapQuickLruIfNeeded = (value) => { + // Check if this is QuickLRU v7+ using Symbol.toStringTag and the evict method (added in v7) + if ( + value?.[Symbol.toStringTag] === "QuickLRU" && + typeof value.evict === "function" + ) { + // QuickLRU v7+ uses set(key, value, {maxAge: number}) but StorageAdapter expects set(key, value, ttl) + // Wrap it to translate the interface + return { + get(key) { + return value.get(key); + }, + set(key, cacheValue, ttl) { + if (ttl === undefined) { + value.set(key, cacheValue); + } else { + value.set(key, cacheValue, { maxAge: ttl }); + } + return true; + }, + delete(key) { + return value.delete(key); + }, + clear() { + return value.clear(); + }, + has(key) { + return value.has(key); + }, + }; + } + // QuickLRU v5 and other caches work as-is + return value; + }; + const defaultInternals = { + request: undefined, + agent: { + http: undefined, + https: undefined, + http2: undefined, + }, + h2session: undefined, + decompress: true, + timeout: { + connect: undefined, + lookup: undefined, + read: undefined, + request: undefined, + response: undefined, + secureConnect: undefined, + send: undefined, + socket: undefined, + }, + prefixUrl: "", + body: undefined, + form: undefined, + json: undefined, + cookieJar: undefined, + ignoreInvalidCookies: false, + searchParams: undefined, + dnsLookup: undefined, + dnsCache: undefined, + context: {}, + hooks: { + init: [], + beforeRequest: [], + beforeError: [], + beforeRedirect: [], + beforeRetry: [], + beforeCache: [], + afterResponse: [], + }, + followRedirect: true, + maxRedirects: 10, + cache: undefined, + throwHttpErrors: true, + username: "", + password: "", + http2: false, + allowGetBody: false, + copyPipedHeaders: false, + headers: { + "user-agent": "got (https://github.com/sindresorhus/got)", + }, + methodRewriting: false, + dnsLookupIpVersion: undefined, + parseJson: JSON.parse, + stringifyJson: JSON.stringify, + retry: { + limit: 2, + methods: ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE"], + statusCodes: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], + errorCodes: [ + "ETIMEDOUT", + "ECONNRESET", + "EADDRINUSE", + "ECONNREFUSED", + "EPIPE", + "ENOTFOUND", + "ENETUNREACH", + "EAI_AGAIN", + ], + maxRetryAfter: undefined, + calculateDelay: ({ computedValue }) => computedValue, + backoffLimit: Number.POSITIVE_INFINITY, + noise: 100, + enforceRetryRules: true, + }, + localAddress: undefined, + method: "GET", + createConnection: undefined, + cacheOptions: { + shared: undefined, + cacheHeuristic: undefined, + immutableMinTimeToLive: undefined, + ignoreCargoCult: undefined, + }, + https: { + alpnProtocols: undefined, + rejectUnauthorized: undefined, + checkServerIdentity: undefined, + serverName: undefined, + certificateAuthority: undefined, + key: undefined, + certificate: undefined, + passphrase: undefined, + pfx: undefined, + ciphers: undefined, + honorCipherOrder: undefined, + minVersion: undefined, + maxVersion: undefined, + signatureAlgorithms: undefined, + tlsSessionLifetime: undefined, + dhparam: undefined, + ecdhCurve: undefined, + certificateRevocationLists: undefined, + secureOptions: undefined, + }, + encoding: undefined, + resolveBodyOnly: false, + isStream: false, + responseType: "text", + url: undefined, + pagination: { + transform(response) { + if (response.request.options.responseType === "json") { + return response.body; + } + return JSON.parse(response.body); + }, + paginate({ response }) { + const rawLinkHeader = response.headers.link; + if ( + typeof rawLinkHeader !== "string" || + rawLinkHeader.trim() === "" + ) { + return false; + } + const parsed = parseLinkHeader(rawLinkHeader); + const next = parsed.find( + (entry) => + entry.parameters.rel === "next" || + entry.parameters.rel === '"next"', ); - error.code = "ECONNRESET"; - options.request.emit("error", error); - self.removeSocket(placeholder); - return; + if (next) { + const baseUrl = response.request.options.url ?? response.url; + return { + url: new URL(next.reference, baseUrl), + }; + } + return false; + }, + filter: () => true, + shouldContinue: () => true, + countLimit: Number.POSITIVE_INFINITY, + backoff: 0, + requestLimit: 10_000, + stackAllItems: false, + }, + setHost: true, + maxHeaderSize: undefined, + signal: undefined, + enableUnixSockets: false, + strictContentLength: true, + }; + const cloneInternals = (internals) => { + const { hooks, retry } = internals; + const result = { + ...internals, + context: { ...internals.context }, + cacheOptions: { ...internals.cacheOptions }, + https: { ...internals.https }, + agent: { ...internals.agent }, + headers: { ...internals.headers }, + retry: { + ...retry, + errorCodes: [...retry.errorCodes], + methods: [...retry.methods], + statusCodes: [...retry.statusCodes], + }, + timeout: { ...internals.timeout }, + hooks: { + init: [...hooks.init], + beforeRequest: [...hooks.beforeRequest], + beforeError: [...hooks.beforeError], + beforeRedirect: [...hooks.beforeRedirect], + beforeRetry: [...hooks.beforeRetry], + beforeCache: [...hooks.beforeCache], + afterResponse: [...hooks.afterResponse], + }, + searchParams: internals.searchParams + ? new URLSearchParams(internals.searchParams) + : undefined, + pagination: { ...internals.pagination }, + }; + return result; + }; + const cloneRaw = (raw) => { + const result = { ...raw }; + if (Object.hasOwn(raw, "context") && distribution.object(raw.context)) { + result.context = { ...raw.context }; + } + if ( + Object.hasOwn(raw, "cacheOptions") && + distribution.object(raw.cacheOptions) + ) { + result.cacheOptions = { ...raw.cacheOptions }; + } + if (Object.hasOwn(raw, "https") && distribution.object(raw.https)) { + result.https = { ...raw.https }; + } + if (Object.hasOwn(raw, "agent") && distribution.object(raw.agent)) { + result.agent = { ...raw.agent }; + } + if (Object.hasOwn(raw, "headers") && distribution.object(raw.headers)) { + result.headers = { ...raw.headers }; + } + if (Object.hasOwn(raw, "retry") && distribution.object(raw.retry)) { + const { retry } = raw; + result.retry = { ...retry }; + if (distribution.array(retry.errorCodes)) { + result.retry.errorCodes = [...retry.errorCodes]; } - 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; + if (distribution.array(retry.methods)) { + result.retry.methods = [...retry.methods]; + } + if (distribution.array(retry.statusCodes)) { + result.retry.statusCodes = [...retry.statusCodes]; } - 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); + if (Object.hasOwn(raw, "timeout") && distribution.object(raw.timeout)) { + result.timeout = { ...raw.timeout }; + } + if (Object.hasOwn(raw, "hooks") && distribution.object(raw.hooks)) { + const { hooks } = raw; + result.hooks = { + ...hooks, + }; + if (distribution.array(hooks.init)) { + result.hooks.init = [...hooks.init]; + } + if (distribution.array(hooks.beforeRequest)) { + result.hooks.beforeRequest = [...hooks.beforeRequest]; + } + if (distribution.array(hooks.beforeError)) { + result.hooks.beforeError = [...hooks.beforeError]; + } + if (distribution.array(hooks.beforeRedirect)) { + result.hooks.beforeRedirect = [...hooks.beforeRedirect]; + } + if (distribution.array(hooks.beforeRetry)) { + result.hooks.beforeRetry = [...hooks.beforeRetry]; + } + if (distribution.array(hooks.beforeCache)) { + result.hooks.beforeCache = [...hooks.beforeCache]; + } + if (distribution.array(hooks.afterResponse)) { + result.hooks.afterResponse = [...hooks.afterResponse]; + } } + if (Object.hasOwn(raw, "searchParams") && raw.searchParams) { + if (distribution.string(raw.searchParams)) { + result.searchParams = raw.searchParams; + } else if (raw.searchParams instanceof URLSearchParams) { + result.searchParams = new URLSearchParams(raw.searchParams); + } else if (distribution.object(raw.searchParams)) { + result.searchParams = { ...raw.searchParams }; + } + } + if ( + Object.hasOwn(raw, "pagination") && + distribution.object(raw.pagination) + ) { + result.pagination = { ...raw.pagination }; + } + return result; }; - - TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket); - if (pos === -1) { + const getHttp2TimeoutOption = (internals) => { + const delays = [ + internals.timeout.socket, + internals.timeout.connect, + internals.timeout.lookup, + internals.timeout.request, + internals.timeout.secureConnect, + ].filter((delay) => typeof delay === "number"); + return delays.length > 0 ? Math.min(...delays) : undefined; + }; + const trackStateMutation = (trackedStateMutations, name) => { + trackedStateMutations?.add(name); + }; + const addExplicitHeader = (explicitHeaders, name) => { + explicitHeaders.add(name); + }; + const markHeaderAsExplicit = ( + explicitHeaders, + trackedStateMutations, + name, + ) => { + addExplicitHeader(explicitHeaders, name); + trackStateMutation(trackedStateMutations, name); + }; + const trackReplacedHeaderMutations = ( + trackedStateMutations, + previousHeaders, + nextHeaders, + ) => { + if (!trackedStateMutations) { 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); - }); - } + for (const header of new Set([ + ...Object.keys(previousHeaders), + ...Object.keys(nextHeaders), + ])) { + if (previousHeaders[header] !== nextHeaders[header]) { + trackStateMutation(trackedStateMutations, header); + } + } }; - - 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, - }; + const init = (options, withOptions, self) => { + const initHooks = options.hooks?.init; + if (initHooks) { + for (const hook of initHooks) { + hook(withOptions, self); + } } - 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]; + }; + // Keys never merged: got.extend() internals, url (passed as first arg), control flags, security + const nonMergeableKeys = new Set([ + "mutableDefaults", + "handlers", + "url", + "preserveHooks", + "isStream", + "__proto__", + ]); + class Options { + #internals; + #headersProxy; + #merging = false; + #init; + #explicitHeaders; + #trackedStateMutations; + constructor(input, options, defaults) { + options_assertAny( + "input", + [ + distribution.string, + distribution.urlInstance, + distribution.object, + distribution.undefined, + ], + input, + ); + options_assertAny( + "options", + [distribution.object, distribution.undefined], + options, + ); + options_assertAny( + "defaults", + [distribution.object, distribution.undefined], + defaults, + ); + if (input instanceof Options || options instanceof Options) { + throw new TypeError( + "The defaults must be passed as the third argument", + ); + } + if (defaults) { + this.#internals = cloneInternals(defaults.#internals); + this.#init = [...defaults.#init]; + this.#explicitHeaders = new Set(defaults.#explicitHeaders); + } else { + this.#internals = cloneInternals(defaultInternals); + this.#init = []; + this.#explicitHeaders = new Set(); + } + this.#headersProxy = this.#createHeadersProxy(); + // This rule allows `finally` to be considered more important. + // Meaning no matter the error thrown in the `try` block, + // if `finally` throws then the `finally` error will be thrown. + // + // Yes, we want this. If we set `url` first, then the `url.searchParams` + // would get merged. Instead we set the `searchParams` first, then + // `url.searchParams` is overwritten as expected. + // + /* eslint-disable no-unsafe-finally -- `finally` is used intentionally here to ensure `url` is always set last, overwriting any merged searchParams */ + try { + if (distribution.plainObject(input)) { + try { + this.merge(input); + this.merge(options); + } finally { + this.url = input.url; + } + } else { + try { + this.merge(options); + } finally { + if (options?.url !== undefined) { + if (input === undefined) { + this.url = options.url; + } else { + throw new TypeError( + "The `url` option is mutually exclusive with the `input` argument", + ); + } + } else if (input !== undefined) { + this.url = input; + } } } + } catch (error) { + error.options = this; + throw error; } + /* eslint-enable no-unsafe-finally */ } - 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:"); + merge(options) { + if (!options) { + return; } - console.error.apply(console, args); - }; - } else { - debug = function () {}; - } - exports.debug = debug; // for test - - /***/ - }, - - /***/ 2940: /***/ (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]; + if (options instanceof Options) { + // Create a copy of the #init array to avoid infinite loop + // when merging an Options instance with itself + const initArray = [...options.#init]; + for (const init of initArray) { + this.merge(init); + } + return; } - 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]; - }); + options = cloneRaw(options); + init(this, options, this); + init(options, options, this); + this.#merging = true; + try { + let push = false; + for (const key of Object.keys(options)) { + if (nonMergeableKeys.has(key)) { + continue; + } + if (!(key in this)) { + throw new Error(`Unexpected option: ${key}`); + } + // @ts-expect-error Type 'unknown' is not assignable to type 'never'. + const value = options[key]; + if (value === undefined) { + continue; + } + // @ts-expect-error Type 'unknown' is not assignable to type 'never'. + this[key] = value; + push = true; + } + if (push) { + this.#init.push(options); + } + } finally { + this.#merging = false; } - return ret; } - } - - /***/ - }, - - /***/ 9491: /***/ (module) => { - "use strict"; - module.exports = require("assert"); - - /***/ - }, - - /***/ 4300: /***/ (module) => { - "use strict"; - module.exports = require("buffer"); - - /***/ - }, - - /***/ 6113: /***/ (module) => { - "use strict"; - module.exports = require("crypto"); - - /***/ - }, - - /***/ 9523: /***/ (module) => { - "use strict"; - module.exports = require("dns"); - - /***/ - }, - - /***/ 2361: /***/ (module) => { - "use strict"; - module.exports = require("events"); - - /***/ - }, - - /***/ 7147: /***/ (module) => { - "use strict"; - module.exports = require("fs"); - - /***/ - }, - - /***/ 3292: /***/ (module) => { - "use strict"; - module.exports = require("fs/promises"); - - /***/ - }, - - /***/ 3685: /***/ (module) => { - "use strict"; - module.exports = require("http"); - - /***/ - }, - - /***/ 5158: /***/ (module) => { - "use strict"; - module.exports = require("http2"); - - /***/ - }, - - /***/ 5687: /***/ (module) => { - "use strict"; - module.exports = require("https"); - - /***/ - }, - - /***/ 1808: /***/ (module) => { - "use strict"; - module.exports = require("net"); - - /***/ - }, - - /***/ 2037: /***/ (module) => { - "use strict"; - module.exports = require("os"); - - /***/ - }, - - /***/ 1017: /***/ (module) => { - "use strict"; - module.exports = require("path"); - - /***/ - }, - - /***/ 2781: /***/ (module) => { - "use strict"; - module.exports = require("stream"); - - /***/ - }, - - /***/ 1576: /***/ (module) => { - "use strict"; - module.exports = require("string_decoder"); - - /***/ - }, - - /***/ 4404: /***/ (module) => { - "use strict"; - module.exports = require("tls"); - - /***/ - }, - - /***/ 7310: /***/ (module) => { - "use strict"; - module.exports = require("url"); - - /***/ - }, - - /***/ 3837: /***/ (module) => { - "use strict"; - module.exports = require("util"); + /** + Custom request function. + The main purpose of this is to [support HTTP2 using a wrapper](https://github.com/szmarczak/http2-wrapper). - /***/ - }, + @default http.request | https.request + */ + get request() { + return this.#internals.request; + } + set request(value) { + options_assertAny( + "request", + [distribution.function, distribution.undefined], + value, + ); + this.#internals.request = value; + } + /** + An object representing `http`, `https` and `http2` keys for [`http.Agent`](https://nodejs.org/api/http.html#http_class_http_agent), [`https.Agent`](https://nodejs.org/api/https.html#https_class_https_agent) and [`http2wrapper.Agent`](https://github.com/szmarczak/http2-wrapper#new-http2agentoptions) instance. + This is necessary because a request to one protocol might redirect to another. + In such a scenario, Got will switch over to the right protocol agent for you. - /***/ 9796: /***/ (module) => { - "use strict"; - module.exports = require("zlib"); + If a key is not present, it will default to a global agent. - /***/ - }, + @example + ``` + import got from 'got'; + import HttpAgent from 'agentkeepalive'; - /***/ 3707: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + const {HttpsAgent} = HttpAgent; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Glob = void 0; - const minimatch_1 = __nccwpck_require__(3355); - const path_scurry_1 = __nccwpck_require__(9569); - const url_1 = __nccwpck_require__(7310); - const pattern_js_1 = __nccwpck_require__(530); - const walker_js_1 = __nccwpck_require__(8757); - // if no process global, just call it linux. - // so we default to case-sensitive, / separators - const defaultPlatform = - typeof process === "object" && - process && - typeof process.platform === "string" - ? process.platform - : "linux"; - /** - * An object that can perform glob pattern traversals. - */ - class Glob { - absolute; - cwd; - root; - dot; - dotRelative; - follow; - ignore; - magicalBraces; - mark; - matchBase; - maxDepth; - nobrace; - nocase; - nodir; - noext; - noglobstar; - pattern; - platform; - realpath; - scurry; - stat; - signal; - windowsPathsNoEscape; - withFileTypes; - /** - * The options provided to the constructor. - */ - opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern, opts) { - this.withFileTypes = !!opts.withFileTypes; - this.signal = opts.signal; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.dotRelative = !!opts.dotRelative; - this.nodir = !!opts.nodir; - this.mark = !!opts.mark; - if (!opts.cwd) { - this.cwd = ""; - } else if ( - opts.cwd instanceof URL || - opts.cwd.startsWith("file://") - ) { - opts.cwd = (0, url_1.fileURLToPath)(opts.cwd); - } - this.cwd = opts.cwd || ""; - this.root = opts.root; - this.magicalBraces = !!opts.magicalBraces; - this.nobrace = !!opts.nobrace; - this.noext = !!opts.noext; - this.realpath = !!opts.realpath; - this.absolute = opts.absolute; - this.noglobstar = !!opts.noglobstar; - this.matchBase = !!opts.matchBase; - this.maxDepth = - typeof opts.maxDepth === "number" ? opts.maxDepth : Infinity; - this.stat = !!opts.stat; - this.ignore = opts.ignore; - if (this.withFileTypes && this.absolute !== undefined) { - throw new Error("cannot set absolute and withFileTypes:true"); - } - if (typeof pattern === "string") { - pattern = [pattern]; - } - this.windowsPathsNoEscape = - !!opts.windowsPathsNoEscape || opts.allowWindowsEscape === false; - if (this.windowsPathsNoEscape) { - pattern = pattern.map((p) => p.replace(/\\/g, "/")); - } - if (this.matchBase) { - if (opts.noglobstar) { - throw new TypeError("base matching requires globstar"); - } - pattern = pattern.map((p) => (p.includes("/") ? p : `./**/${p}`)); - } - this.pattern = pattern; - this.platform = opts.platform || defaultPlatform; - this.opts = { ...opts, platform: this.platform }; - if (opts.scurry) { - this.scurry = opts.scurry; - if ( - opts.nocase !== undefined && - opts.nocase !== opts.scurry.nocase - ) { - throw new Error( - "nocase option contradicts provided scurry option" - ); - } - } else { - const Scurry = - opts.platform === "win32" - ? path_scurry_1.PathScurryWin32 - : opts.platform === "darwin" - ? path_scurry_1.PathScurryDarwin - : opts.platform - ? path_scurry_1.PathScurryPosix - : path_scurry_1.PathScurry; - this.scurry = new Scurry(this.cwd, { - nocase: opts.nocase, - fs: opts.fs, - }); - } - this.nocase = this.scurry.nocase; - const mmo = { - // default nocase based on platform - ...opts, - dot: this.dot, - matchBase: this.matchBase, - nobrace: this.nobrace, - nocase: this.nocase, - nocaseMagicOnly: true, - nocomment: true, - noext: this.noext, - nonegate: true, - optimizationLevel: 2, - platform: this.platform, - windowsPathsNoEscape: this.windowsPathsNoEscape, - }; - const mms = this.pattern.map( - (p) => new minimatch_1.Minimatch(p, mmo) - ); - const [matchSet, globParts] = mms.reduce( - (set, m) => { - set[0].push(...m.set); - set[1].push(...m.globParts); - return set; - }, - [[], []] - ); - this.patterns = matchSet.map((set, i) => { - return new pattern_js_1.Pattern( - set, - globParts[i], - 0, - this.platform - ); - }); + await got('https://sindresorhus.com', { + agent: { + http: new HttpAgent(), + https: new HttpsAgent() } - async walk() { - // Walkers always return array of Path objects, so we just have to - // coerce them into the right shape. It will have already called - // realpath() if the option was set to do so, so we know that's cached. - // start out knowing the cwd, at least - return [ - ...(await new walker_js_1.GlobWalker( - this.patterns, - this.scurry.cwd, - { - ...this.opts, - maxDepth: - this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - } - ).walk()), - ]; + }); + ``` + */ + get agent() { + return this.#internals.agent; + } + set agent(value) { + options_assertPlainObject("agent", value); + for (const key of Object.keys(value)) { + if (key === "__proto__") { + continue; + } + if (!(key in this.#internals.agent)) { + throw new TypeError(`Unexpected agent option: ${key}`); + } + // @ts-expect-error - No idea why `value[key]` doesn't work here. + options_assertAny( + `agent.${key}`, + [distribution.object, distribution.undefined, (v) => v === false], + value[key], + ); + } + if (this.#merging) { + safeObjectAssign(this.#internals.agent, value); + } else { + this.#internals.agent = { ...value }; + } } - walkSync() { - return [ - ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: - this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).walkSync(), - ]; + get h2session() { + return this.#internals.h2session; } - stream() { - return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: - this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).stream(); - } - streamSync() { - return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: - this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).streamSync(); + set h2session(value) { + this.#internals.h2session = value; } /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync() { - return this.streamSync()[Symbol.iterator](); + Decompress the response automatically. + + This will set the `accept-encoding` header to `gzip, deflate, br` unless you set it yourself. + + If this is disabled, a compressed response is returned as a `Uint8Array`. + This may be useful if you want to handle decompression yourself or stream the raw compressed data. + + @default true + */ + get decompress() { + return this.#internals.decompress; } - [Symbol.iterator]() { - return this.iterateSync(); + set decompress(value) { + assert.boolean(value); + this.#internals.decompress = value; } /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate() { - return this.stream()[Symbol.asyncIterator](); - } - [Symbol.asyncIterator]() { - return this.iterate(); + Milliseconds to wait for the server to end the response before aborting the request with `got.TimeoutError` error (a.k.a. `request` property). + By default, there's no timeout. + + This also accepts an `object` with the following fields to constrain the duration of each phase of the request lifecycle: + + - `lookup` starts when a socket is assigned and ends when the hostname has been resolved. + Does not apply when using a Unix domain socket. + - `connect` starts when `lookup` completes (or when the socket is assigned if lookup does not apply to the request) and ends when the socket is connected. + - `secureConnect` starts when `connect` completes and ends when the handshaking process completes (HTTPS only). + - `socket` starts when the socket is connected. See [request.setTimeout](https://nodejs.org/api/http.html#http_request_settimeout_timeout_callback). + - `response` starts when the request has been written to the socket and ends when the response headers are received. + - `send` starts when the socket is connected and ends with the request has been written to the socket. + - `request` starts when the request is initiated and ends when the response's end event fires. + */ + get timeout() { + // We always return `Delays` here. + // It has to be `Delays | number`, otherwise TypeScript will error because the getter and the setter have incompatible types. + return this.#internals.timeout; + } + set timeout(value) { + options_assertPlainObject("timeout", value); + for (const key of Object.keys(value)) { + if (key === "__proto__") { + continue; + } + if (!(key in this.#internals.timeout)) { + throw new Error(`Unexpected timeout option: ${key}`); + } + // @ts-expect-error - No idea why `value[key]` doesn't work here. + options_assertAny( + `timeout.${key}`, + [distribution.number, distribution.undefined], + value[key], + ); + } + if (this.#merging) { + safeObjectAssign(this.#internals.timeout, value); + } else { + this.#internals.timeout = { ...value }; + } } - } - exports.Glob = Glob; - //# sourceMappingURL=glob.js.map + /** + When specified, `prefixUrl` will be prepended to `url`. + The prefix can be any valid URL, either relative or absolute. + A trailing slash `/` is optional - one will be added automatically. - /***/ - }, + __Note__: `prefixUrl` will be ignored if the `url` argument is a URL instance. - /***/ 1945: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + __Note__: Leading slashes in `input` are disallowed when using this option to enforce consistency and avoid confusion. + For example, when the prefix URL is `https://example.com/foo` and the input is `/bar`, there's ambiguity whether the resulting URL would become `https://example.com/foo/bar` or `https://example.com/bar`. + The latter is used by browsers. - Object.defineProperty(exports, "__esModule", { value: true }); - exports.hasMagic = void 0; - const minimatch_1 = __nccwpck_require__(3355); - /** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ - const hasMagic = (pattern, options = {}) => { - if (!Array.isArray(pattern)) { - pattern = [pattern]; - } - for (const p of pattern) { - if (new minimatch_1.Minimatch(p, options).hasMagic()) return true; - } - return false; - }; - exports.hasMagic = hasMagic; - //# sourceMappingURL=has-magic.js.map + __Tip__: Useful when used with `got.extend()` to create niche-specific Got instances. - /***/ - }, + __Tip__: You can change `prefixUrl` using hooks as long as the URL still includes the `prefixUrl`. + If the URL doesn't include it anymore, it will throw. - /***/ 7056: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + @example + ``` + import got from 'got'; - // give it a pattern, and it'll be able to tell you if - // a given path should be ignored. - // Ignoring a path ignores its children if the pattern ends in /** - // Ignores are always parsed in dot:true mode - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Ignore = void 0; - const minimatch_1 = __nccwpck_require__(3355); - const pattern_js_1 = __nccwpck_require__(530); - const defaultPlatform = - typeof process === "object" && - process && - typeof process.platform === "string" - ? process.platform - : "linux"; - /** - * Class used to process ignored patterns - */ - class Ignore { - relative; - relativeChildren; - absolute; - absoluteChildren; - constructor( - ignored, - { nobrace, nocase, noext, noglobstar, platform = defaultPlatform } - ) { - this.relative = []; - this.absolute = []; - this.relativeChildren = []; - this.absoluteChildren = []; - const mmopts = { - dot: true, - nobrace, - nocase, - noext, - noglobstar, - optimizationLevel: 2, - platform, - nocomment: true, - nonegate: true, - }; - // this is a little weird, but it gives us a clean set of optimized - // minimatch matchers, without getting tripped up if one of them - // ends in /** inside a brace section, and it's only inefficient at - // the start of the walk, not along it. - // It'd be nice if the Pattern class just had a .test() method, but - // handling globstars is a bit of a pita, and that code already lives - // in minimatch anyway. - // Another way would be if maybe Minimatch could take its set/globParts - // as an option, and then we could at least just use Pattern to test - // for absolute-ness. - // Yet another way, Minimatch could take an array of glob strings, and - // a cwd option, and do the right thing. - for (const ign of ignored) { - const mm = new minimatch_1.Minimatch(ign, mmopts); - for (let i = 0; i < mm.set.length; i++) { - const parsed = mm.set[i]; - const globParts = mm.globParts[i]; - const p = new pattern_js_1.Pattern( - parsed, - globParts, - 0, - platform - ); - const m = new minimatch_1.Minimatch(p.globString(), mmopts); - const children = globParts[globParts.length - 1] === "**"; - const absolute = p.isAbsolute(); - if (absolute) this.absolute.push(m); - else this.relative.push(m); - if (children) { - if (absolute) this.absoluteChildren.push(m); - else this.relativeChildren.push(m); - } - } - } + await got('unicorn', {prefixUrl: 'https://cats.com'}); + //=> 'https://cats.com/unicorn' + + const instance = got.extend({ + prefixUrl: 'https://google.com' + }); + + await instance('unicorn', { + hooks: { + beforeRequest: [ + options => { + options.prefixUrl = 'https://cats.com'; + } + ] } - ignored(p) { - const fullpath = p.fullpath(); - const fullpaths = `${fullpath}/`; - const relative = p.relative() || "."; - const relatives = `${relative}/`; - for (const m of this.relative) { - if (m.match(relative) || m.match(relatives)) return true; - } - for (const m of this.absolute) { - if (m.match(fullpath) || m.match(fullpaths)) return true; + }); + //=> 'https://cats.com/unicorn' + ``` + */ + get prefixUrl() { + // We always return `string` here. + // It has to be `string | URL`, otherwise TypeScript will error because the getter and the setter have incompatible types. + return this.#internals.prefixUrl; + } + set prefixUrl(value) { + options_assertAny( + "prefixUrl", + [distribution.string, distribution.urlInstance], + value, + ); + if (value === "") { + this.#internals.prefixUrl = ""; + return; } - return false; - } - childrenIgnored(p) { - const fullpath = p.fullpath() + "/"; - const relative = (p.relative() || ".") + "/"; - for (const m of this.relativeChildren) { - if (m.match(relative)) return true; + value = value.toString(); + if (!value.endsWith("/")) { + value += "/"; } - for (const m of this.absoluteChildren) { - if (m.match(fullpath)) true; + if (this.#internals.prefixUrl && this.#internals.url) { + const { href } = this.#internals.url; + this.#internals.url.href = + value + href.slice(this.#internals.prefixUrl.length); } - return false; + this.#internals.prefixUrl = value; } - } - exports.Ignore = Ignore; - //# sourceMappingURL=ignore.js.map + /** + __Note #1__: The `body` option cannot be used with the `json` or `form` option. - /***/ - }, + __Note #2__: If you provide this option, `got.stream()` will be read-only. - /***/ 5029: /***/ function ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) { - "use strict"; + __Note #3__: If you provide a payload with the `GET` or `HEAD` method, it will throw a `TypeError` unless the method is `GET` and the `allowGetBody` option is set to `true`. - var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - const index_js_1 = __importDefault(__nccwpck_require__(9354)); - module.exports = Object.assign(index_js_1.default, { - default: index_js_1.default, - glob: index_js_1.default, - }); - //# sourceMappingURL=index-cjs.js.map + __Note #4__: This option is not enumerable and will not be merged with the instance defaults. - /***/ - }, + The `content-length` header will be automatically set if `body` is a `string` / `Uint8Array` / typed array, and `content-length` and `transfer-encoding` are not manually set in `options.headers`. - /***/ 9354: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + Since Got 12, the `content-length` is not automatically set when `body` is a `fs.createReadStream`. - Object.defineProperty(exports, "__esModule", { value: true }); - exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.glob = exports.globSync = exports.globStream = exports.globStreamSync = void 0; - const minimatch_1 = __nccwpck_require__(3355); - const glob_js_1 = __nccwpck_require__(3707); - const has_magic_js_1 = __nccwpck_require__(1945); - function globStreamSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).streamSync(); - } - exports.globStreamSync = globStreamSync; - function globStream(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).stream(); - } - exports.globStream = globStream; - function globSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).walkSync(); - } - exports.globSync = globSync; - async function glob(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).walk(); - } - exports.glob = glob; - function globIterateSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).iterateSync(); - } - exports.globIterateSync = globIterateSync; - function globIterate(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).iterate(); - } - exports.globIterate = globIterate; - // aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc - exports.streamSync = globStreamSync; - exports.stream = Object.assign(globStream, { sync: globStreamSync }); - exports.iterateSync = globIterateSync; - exports.iterate = Object.assign(globIterate, { - sync: globIterateSync, - }); - exports.sync = Object.assign(globSync, { - stream: globStreamSync, - iterate: globIterateSync, - }); - /* c8 ignore start */ - var minimatch_2 = __nccwpck_require__(3355); - Object.defineProperty(exports, "escape", { - enumerable: true, - get: function () { - return minimatch_2.escape; - }, - }); - Object.defineProperty(exports, "unescape", { - enumerable: true, - get: function () { - return minimatch_2.unescape; - }, - }); - var glob_js_2 = __nccwpck_require__(3707); - Object.defineProperty(exports, "Glob", { - enumerable: true, - get: function () { - return glob_js_2.Glob; - }, - }); - var has_magic_js_2 = __nccwpck_require__(1945); - Object.defineProperty(exports, "hasMagic", { - enumerable: true, - get: function () { - return has_magic_js_2.hasMagic; - }, - }); - /* c8 ignore stop */ - exports["default"] = Object.assign(glob, { - glob, - globSync, - sync: exports.sync, - globStream, - stream: exports.stream, - globStreamSync, - streamSync: exports.streamSync, - globIterate, - iterate: exports.iterate, - globIterateSync, - iterateSync: exports.iterateSync, - Glob: glob_js_1.Glob, - hasMagic: has_magic_js_1.hasMagic, - escape: minimatch_1.escape, - unescape: minimatch_1.unescape, - }); - //# sourceMappingURL=index.js.map + You can use `Iterable` and `AsyncIterable` objects as request body, including Web [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream): - /***/ - }, + @example + ``` + import got from 'got'; - /***/ 530: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + // Using an async generator + async function* generateData() { + yield 'Hello, '; + yield 'world!'; + } - // this is just a very light wrapper around 2 arrays with an offset index - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Pattern = void 0; - const minimatch_1 = __nccwpck_require__(3355); - const isPatternList = (pl) => pl.length >= 1; - const isGlobList = (gl) => gl.length >= 1; - /** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ - class Pattern { - #patternList; - #globList; - #index; - length; - #platform; - #rest; - #globString; - #isDrive; - #isUNC; - #isAbsolute; - #followGlobstar = true; - constructor(patternList, globList, index, platform) { - if (!isPatternList(patternList)) { - throw new TypeError("empty pattern list"); - } - if (!isGlobList(globList)) { - throw new TypeError("empty glob list"); - } - if (globList.length !== patternList.length) { - throw new TypeError( - "mismatched pattern list and glob list lengths" - ); + await got.post('https://httpbin.org/anything', { + body: generateData() + }); + ``` + */ + get body() { + return this.#internals.body; + } + set body(value) { + options_assertAny( + "body", + [ + distribution.string, + distribution.buffer, + distribution.nodeStream, + distribution.generator, + distribution.asyncGenerator, + distribution.iterable, + distribution.asyncIterable, + distribution.typedArray, + distribution.undefined, + ], + value, + ); + if (distribution.nodeStream(value)) { + assert.truthy(value.readable); } - this.length = patternList.length; - if (index < 0 || index >= this.length) { - throw new TypeError("index out of range"); - } - this.#patternList = patternList; - this.#globList = globList; - this.#index = index; - this.#platform = platform; - // normalize root entries of absolute patterns on initial creation. - if (this.#index === 0) { - // c: => ['c:/'] - // C:/ => ['C:/'] - // C:/x => ['C:/', 'x'] - // //host/share => ['//host/share/'] - // //host/share/ => ['//host/share/'] - // //host/share/x => ['//host/share/', 'x'] - // /etc => ['/', 'etc'] - // / => ['/'] - if (this.isUNC()) { - // '' / '' / 'host' / 'share' - const [p0, p1, p2, p3, ...prest] = this.#patternList; - const [g0, g1, g2, g3, ...grest] = this.#globList; - if (prest[0] === "") { - // ends in / - prest.shift(); - grest.shift(); - } - const p = [p0, p1, p2, p3, ""].join("/"); - const g = [g0, g1, g2, g3, ""].join("/"); - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } else if (this.isDrive() || this.isAbsolute()) { - const [p1, ...prest] = this.#patternList; - const [g1, ...grest] = this.#globList; - if (prest[0] === "") { - // ends in / - prest.shift(); - grest.shift(); - } - const p = p1 + "/"; - const g = g1 + "/"; - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } + if (value !== undefined) { + assert.undefined(this.#internals.form); + assert.undefined(this.#internals.json); } + this.#internals.body = value; + trackStateMutation(this.#trackedStateMutations, "body"); } /** - * The first entry in the parsed list of patterns - */ - pattern() { - return this.#patternList[this.#index]; - } - /** - * true of if pattern() returns a string - */ - isString() { - return typeof this.#patternList[this.#index] === "string"; + The form body is converted to a query string using [`(new URLSearchParams(object)).toString()`](https://nodejs.org/api/url.html#url_constructor_new_urlsearchparams_obj). + + If the `Content-Type` header is not present, it will be set to `application/x-www-form-urlencoded`. + + __Note #1__: If you provide this option, `got.stream()` will be read-only. + + __Note #2__: This option is not enumerable and will not be merged with the instance defaults. + */ + get form() { + return this.#internals.form; + } + set form(value) { + options_assertAny( + "form", + [distribution.plainObject, distribution.undefined], + value, + ); + if (value !== undefined) { + assert.undefined(this.#internals.body); + assert.undefined(this.#internals.json); + } + this.#internals.form = value; + trackStateMutation(this.#trackedStateMutations, "form"); } /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar() { - return this.#patternList[this.#index] === minimatch_1.GLOBSTAR; + JSON request body. If the `content-type` header is not set, it will be set to `application/json`. + + __Important__: This option only affects the request body you send to the server. To parse the response as JSON, you must either call `.json()` on the promise or set `responseType: 'json'` in the options. + + __Note #1__: If you provide this option, `got.stream()` will be read-only. + + __Note #2__: This option is not enumerable and will not be merged with the instance defaults. + */ + get json() { + return this.#internals.json; } - /** - * true if pattern() returns a regexp - */ - isRegExp() { - return this.#patternList[this.#index] instanceof RegExp; + set json(value) { + if (value !== undefined) { + assert.undefined(this.#internals.body); + assert.undefined(this.#internals.form); + } + this.#internals.json = value; + trackStateMutation(this.#trackedStateMutations, "json"); } /** - * The /-joined set of glob parts that make up this pattern - */ - globString() { - return (this.#globString = - this.#globString || - (this.#index === 0 - ? this.isAbsolute() - ? this.#globList[0] + this.#globList.slice(1).join("/") - : this.#globList.join("/") - : this.#globList.slice(this.#index).join("/"))); + The URL to request, as a string, a [`https.request` options object](https://nodejs.org/api/https.html#https_https_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url). + + Properties from `options` will override properties in the parsed `url`. + + If no protocol is specified, it will throw a `TypeError`. + + __Note__: The query string is **not** parsed as search params. + + @example + ``` + await got('https://example.com/?query=a b'); //=> https://example.com/?query=a%20b + await got('https://example.com/', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b + + // The query string is overridden by `searchParams` + await got('https://example.com/?query=a b', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b + ``` + */ + get url() { + return this.#internals.url; } - /** - * true if there are more pattern parts after this one - */ - hasMore() { - return this.length > this.#index + 1; + set url(value) { + options_assertAny( + "url", + [ + distribution.string, + distribution.urlInstance, + distribution.undefined, + ], + value, + ); + if (value === undefined) { + this.#internals.url = undefined; + trackStateMutation(this.#trackedStateMutations, "url"); + return; + } + if (distribution.string(value) && value.startsWith("/")) { + throw new Error("`url` must not start with a slash"); + } + const valueString = value.toString(); + if ( + distribution.string(value) && + !this.prefixUrl && + hasHttpProtocolWithoutSlashes(valueString) + ) { + throw new Error("`url` protocol must be followed by `//`"); + } + // Detect if URL is already absolute (has a protocol/scheme) + const isAbsolute = + distribution.urlInstance(value) || hasProtocolSlashes(valueString); + // Only concatenate prefixUrl if the URL is relative + const urlString = isAbsolute + ? valueString + : `${this.prefixUrl}${valueString}`; + const url = new URL(urlString); + this.#internals.url = url; + trackStateMutation(this.#trackedStateMutations, "url"); + if (usesUnixSocket(url) && !this.#internals.enableUnixSockets) { + throw new Error( + "Using UNIX domain sockets but option `enableUnixSockets` is not enabled", + ); + } + if (url.protocol === "unix:") { + url.href = `http://unix${url.pathname}${url.search}`; + } + if (url.protocol !== "http:" && url.protocol !== "https:") { + const error = new Error(`Unsupported protocol: ${url.protocol}`); + error.code = "ERR_UNSUPPORTED_PROTOCOL"; + throw error; + } + if (this.#internals.username) { + url.username = this.#internals.username; + this.#internals.username = ""; + } + if (this.#internals.password) { + url.password = this.#internals.password; + this.#internals.password = ""; + } + if (this.#internals.searchParams) { + url.search = this.#internals.searchParams.toString(); + this.#internals.searchParams = undefined; + } } /** - * The rest of the pattern after this part, or null if this is the end - */ - rest() { - if (this.#rest !== undefined) return this.#rest; - if (!this.hasMore()) return (this.#rest = null); - this.#rest = new Pattern( - this.#patternList, - this.#globList, - this.#index + 1, - this.#platform - ); - this.#rest.#isAbsolute = this.#isAbsolute; - this.#rest.#isUNC = this.#isUNC; - this.#rest.#isDrive = this.#isDrive; - return this.#rest; + Cookie support. You don't have to care about parsing or how to store them. + + __Note__: If you provide this option, `options.headers.cookie` will be overridden. + */ + get cookieJar() { + return this.#internals.cookieJar; + } + set cookieJar(value) { + options_assertAny( + "cookieJar", + [distribution.object, distribution.undefined], + value, + ); + if (value === undefined) { + this.#internals.cookieJar = undefined; + return; + } + const { setCookie, getCookieString } = value; + assert.function(setCookie); + assert.function(getCookieString); + /* istanbul ignore next: Horrible `tough-cookie` v3 check */ + if (isToughCookieJar(value)) { + this.#internals.cookieJar = { + setCookie: (0, external_node_util_.promisify)( + value.setCookie.bind(value), + ), + getCookieString: (0, external_node_util_.promisify)( + value.getCookieString.bind(value), + ), + }; + } else { + this.#internals.cookieJar = value; + } } /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC() { - const pl = this.#patternList; - return this.#isUNC !== undefined - ? this.#isUNC - : (this.#isUNC = - this.#platform === "win32" && - this.#index === 0 && - pl[0] === "" && - pl[1] === "" && - typeof pl[2] === "string" && - !!pl[2] && - typeof pl[3] === "string" && - !!pl[3]); - } - // pattern like C:/... - // split = ['C:', ...] - // XXX: would be nice to handle patterns like `c:*` to test the cwd - // in c: for *, but I don't know of a way to even figure out what that - // cwd is without actually chdir'ing into it? - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive() { - const pl = this.#patternList; - return this.#isDrive !== undefined - ? this.#isDrive - : (this.#isDrive = - this.#platform === "win32" && - this.#index === 0 && - this.length > 1 && - typeof pl[0] === "string" && - /^[a-z]:$/i.test(pl[0])); - } - // pattern = '/' or '/...' or '/x/...' - // split = ['', ''] or ['', ...] or ['', 'x', ...] - // Drive and UNC both considered absolute on windows - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute() { - const pl = this.#patternList; - return this.#isAbsolute !== undefined - ? this.#isAbsolute - : (this.#isAbsolute = - (pl[0] === "" && pl.length > 1) || - this.isDrive() || - this.isUNC()); + You can abort the `request` using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + + @example + ``` + import got from 'got'; + + const abortController = new AbortController(); + + const request = got('https://httpbin.org/anything', { + signal: abortController.signal + }); + + setTimeout(() => { + abortController.abort(); + }, 100); + ``` + */ + get signal() { + return this.#internals.signal; + } + set signal(value) { + options_assertAny( + "signal", + [distribution.object, distribution.undefined], + value, + ); + this.#internals.signal = value; } /** - * consume the root of the pattern, and return it - */ - root() { - const p = this.#patternList[0]; - return typeof p === "string" && this.isAbsolute() && this.#index === 0 - ? p - : ""; + Ignore invalid cookies instead of throwing an error. + Only useful when the `cookieJar` option has been set. Not recommended. + + @default false + */ + get ignoreInvalidCookies() { + return this.#internals.ignoreInvalidCookies; } - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar() { - return !( - this.#index === 0 || - !this.isGlobstar() || - !this.#followGlobstar - ); + set ignoreInvalidCookies(value) { + assert.boolean(value); + this.#internals.ignoreInvalidCookies = value; } /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar() { - if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar) - return false; - this.#followGlobstar = false; - return true; - } - } - exports.Pattern = Pattern; - //# sourceMappingURL=pattern.js.map + Query string that will be added to the request URL. + This will override the query string in `url`. - /***/ - }, + If you need to pass in an array, you can do it using a `URLSearchParams` instance. - /***/ 146: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + @example + ``` + import got from 'got'; - // synchronous utility for filtering entries and calculating subwalks - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Processor = exports.SubWalks = exports.MatchRecord = exports.HasWalkedCache = void 0; - const minimatch_1 = __nccwpck_require__(3355); - /** - * A cache of which patterns have been processed for a given Path - */ - class HasWalkedCache { - store; - constructor(store = new Map()) { - this.store = store; + const searchParams = new URLSearchParams([['key', 'a'], ['key', 'b']]); + + await got('https://example.com', {searchParams}); + + console.log(searchParams.toString()); + //=> 'key=a&key=b' + ``` + */ + get searchParams() { + if (this.#internals.url) { + return this.#internals.url.searchParams; + } + this.#internals.searchParams ??= new URLSearchParams(); + return this.#internals.searchParams; + } + set searchParams(value) { + options_assertAny( + "searchParams", + [distribution.string, distribution.object, distribution.undefined], + value, + ); + const url = this.#internals.url; + if (value === undefined) { + this.#internals.searchParams = undefined; + if (url) { + url.search = ""; + } + return; + } + const searchParameters = this.searchParams; + let updated; + if (distribution.string(value)) { + updated = new URLSearchParams(value); + } else if (value instanceof URLSearchParams) { + // Clone so the caller-owned object is not stored by reference. + updated = new URLSearchParams(value); + } else { + validateSearchParameters(value); + updated = new URLSearchParams(); + for (const key of Object.keys(value)) { + if (key === "__proto__") { + continue; + } + const entry = value[key]; + if (entry === null) { + updated.append(key, ""); + } else if (entry === undefined) { + searchParameters.delete(key); + } else { + updated.append(key, entry); + } + } + } + if (this.#merging) { + // These keys will be replaced + for (const key of updated.keys()) { + searchParameters.delete(key); + } + for (const [key, value] of updated) { + searchParameters.append(key, value); + } + } else if (url) { + // Overrides the query string in the URL. + url.search = updated.toString(); + } else { + this.#internals.searchParams = updated; + } } - copy() { - return new HasWalkedCache(new Map(this.store)); + get searchParameters() { + throw new Error( + "The `searchParameters` option does not exist. Use `searchParams` instead.", + ); } - hasWalked(target, pattern) { - return this.store.get(target.fullpath())?.has(pattern.globString()); + set searchParameters(_value) { + throw new Error( + "The `searchParameters` option does not exist. Use `searchParams` instead.", + ); } - storeWalked(target, pattern) { - const fullpath = target.fullpath(); - const cached = this.store.get(fullpath); - if (cached) cached.add(pattern.globString()); - else this.store.set(fullpath, new Set([pattern.globString()])); + get dnsLookup() { + return this.#internals.dnsLookup; } - } - exports.HasWalkedCache = HasWalkedCache; - /** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ - class MatchRecord { - store = new Map(); - add(target, absolute, ifDir) { - const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); - const current = this.store.get(target); - this.store.set(target, current === undefined ? n : n & current); - } - // match, absolute, ifdir - entries() { - return [...this.store.entries()].map(([path, n]) => [ - path, - !!(n & 2), - !!(n & 1), - ]); + set dnsLookup(value) { + options_assertAny( + "dnsLookup", + [distribution.function, distribution.undefined], + value, + ); + this.#internals.dnsLookup = value; + } + /** + An instance of [`CacheableLookup`](https://github.com/szmarczak/cacheable-lookup) used for making DNS lookups. + Useful when making lots of requests to different *public* hostnames. + + `CacheableLookup` uses `dns.resolver4(..)` and `dns.resolver6(...)` under the hood and fall backs to `dns.lookup(...)` when the first two fail, which may lead to additional delay. + + __Note__: This should stay disabled when making requests to internal hostnames such as `localhost`, `database.local` etc. + + @default false + */ + get dnsCache() { + return this.#internals.dnsCache; + } + set dnsCache(value) { + options_assertAny( + "dnsCache", + [distribution.object, distribution.boolean, distribution.undefined], + value, + ); + if (value === true) { + this.#internals.dnsCache = getGlobalDnsCache(); + } else if (value === false) { + this.#internals.dnsCache = undefined; + } else { + this.#internals.dnsCache = value; + } + } + /** + User data. `context` is shallow merged and enumerable. If it contains non-enumerable properties they will NOT be merged. + + @example + ``` + import got from 'got'; + + const instance = got.extend({ + hooks: { + beforeRequest: [ + options => { + if (!options.context || !options.context.token) { + throw new Error('Token required'); + } + + options.headers.token = options.context.token; + } + ] } - } - exports.MatchRecord = MatchRecord; - /** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ - class SubWalks { - store = new Map(); - add(target, pattern) { - if (!target.canReaddir()) { - return; - } - const subs = this.store.get(target); - if (subs) { - if (!subs.find((p) => p.globString() === pattern.globString())) { - subs.push(pattern); - } - } else this.store.set(target, [pattern]); + }); + + const context = { + token: 'secret' + }; + + const response = await instance('https://httpbin.org/headers', {context}); + + // Let's see the headers + console.log(response.body); + ``` + */ + get context() { + return this.#internals.context; } - get(target) { - const subs = this.store.get(target); - /* c8 ignore start */ - if (!subs) { - throw new Error("attempting to walk unknown path"); + set context(value) { + assert.object(value); + if (this.#merging) { + safeObjectAssign(this.#internals.context, value); + } else { + this.#internals.context = { ...value }; } - /* c8 ignore stop */ - return subs; - } - entries() { - return this.keys().map((k) => [k, this.store.get(k)]); } - keys() { - return [...this.store.keys()].filter((t) => t.canReaddir()); + /** + Hooks allow modifications during the request lifecycle. + Hook functions may be async and are run serially. + */ + get hooks() { + return this.#internals.hooks; } - } - exports.SubWalks = SubWalks; - /** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ - class Processor { - hasWalkedCache; - matches = new MatchRecord(); - subwalks = new SubWalks(); - patterns; - follow; - dot; - opts; - constructor(opts, hasWalkedCache) { - this.opts = opts; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.hasWalkedCache = hasWalkedCache - ? hasWalkedCache.copy() - : new HasWalkedCache(); - } - processPatterns(target, patterns) { - this.patterns = patterns; - const processingSet = patterns.map((p) => [target, p]); - // map of paths to the magic-starting subwalks they need to walk - // first item in patterns is the filter - for (let [t, pattern] of processingSet) { - this.hasWalkedCache.storeWalked(t, pattern); - const root = pattern.root(); - const absolute = - pattern.isAbsolute() && this.opts.absolute !== false; - // start absolute patterns at root - if (root) { - t = t.resolve( - root === "/" && this.opts.root !== undefined - ? this.opts.root - : root - ); - const rest = pattern.rest(); - if (!rest) { - this.matches.add(t, true, false); - continue; - } else { - pattern = rest; + set hooks(value) { + assert.object(value); + for (const knownHookEvent of Object.keys(value)) { + if (knownHookEvent === "__proto__") { + continue; + } + if (!(knownHookEvent in this.#internals.hooks)) { + throw new Error(`Unexpected hook event: ${knownHookEvent}`); + } + const typedKnownHookEvent = knownHookEvent; + const hooks = value[typedKnownHookEvent]; + options_assertAny( + `hooks.${knownHookEvent}`, + [distribution.array, distribution.undefined], + hooks, + ); + if (hooks) { + for (const hook of hooks) { + assert.function(hook); } } - if (t.isENOENT()) continue; - let p; - let rest; - let changed = false; - while ( - typeof (p = pattern.pattern()) === "string" && - (rest = pattern.rest()) - ) { - const c = t.resolve(p); - // we can be reasonably sure that .. is a readable dir - if (c.isUnknown() && p !== "..") break; - t = c; - pattern = rest; - changed = true; - } - p = pattern.pattern(); - rest = pattern.rest(); - if (changed) { - if (this.hasWalkedCache.hasWalked(t, pattern)) continue; - this.hasWalkedCache.storeWalked(t, pattern); - } - // now we have either a final string for a known entry, - // more strings for an unknown entry, - // or a pattern starting with magic, mounted on t. - if (typeof p === "string") { - // must be final entry - if (!rest) { - const ifDir = p === ".." || p === "" || p === "."; - this.matches.add(t.resolve(p), absolute, ifDir); - } else { - this.subwalks.add(t, pattern); + if (this.#merging) { + if (hooks) { + // @ts-expect-error FIXME + this.#internals.hooks[typedKnownHookEvent].push(...hooks); } - continue; - } else if (p === minimatch_1.GLOBSTAR) { - // if no rest, match and subwalk pattern - // if rest, process rest and subwalk pattern - // if it's a symlink, but we didn't get here by way of a - // globstar match (meaning it's the first time THIS globstar - // has traversed a symlink), then we follow it. Otherwise, stop. - if ( - !t.isSymbolicLink() || - this.follow || - pattern.checkFollowGlobstar() - ) { - this.subwalks.add(t, pattern); - } - const rp = rest?.pattern(); - const rrest = rest?.rest(); - if (!rest || ((rp === "" || rp === ".") && !rrest)) { - // only HAS to be a dir if it ends in **/ or **/. - // but ending in ** will match files as well. - this.matches.add(t, absolute, rp === "" || rp === "."); - } else { - if (rp === "..") { - // this would mean you're matching **/.. at the fs root, - // and no thanks, I'm not gonna test that specific case. - /* c8 ignore start */ - const tp = t.parent || t; - /* c8 ignore stop */ - if (!rrest) this.matches.add(tp, absolute, true); - else if (!this.hasWalkedCache.hasWalked(tp, rrest)) { - this.subwalks.add(tp, rrest); - } - } + } else { + if (!hooks) { + throw new Error(`Missing hook event: ${knownHookEvent}`); } - } else if (p instanceof RegExp) { - this.subwalks.add(t, pattern); + // @ts-expect-error FIXME + this.#internals.hooks[knownHookEvent] = [...hooks]; } } - return this; } - subwalkTargets() { - return this.subwalks.keys(); - } - child() { - return new Processor(this.opts, this.hasWalkedCache); - } - // return a new Processor containing the subwalks for each - // child entry, and a set of matches, and - // a hasWalkedCache that's a copy of this one - // then we're going to call - filterEntries(parent, entries) { - const patterns = this.subwalks.get(parent); - // put matches and entry walks into the results processor - const results = this.child(); - for (const e of entries) { - for (const pattern of patterns) { - const absolute = pattern.isAbsolute(); - const p = pattern.pattern(); - const rest = pattern.rest(); - if (p === minimatch_1.GLOBSTAR) { - results.testGlobstar(e, pattern, rest, absolute); - } else if (p instanceof RegExp) { - results.testRegExp(e, p, rest, absolute); - } else { - results.testString(e, p, rest, absolute); - } - } - } - return results; + /** + Whether redirect responses should be followed automatically. + + Optionally, pass a function to dynamically decide based on the response object. + + Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), Got will automatically request the resource pointed to in the location header via `GET`. + This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4). You can optionally turn on this behavior also for other redirect codes - see `methodRewriting`. + On cross-origin redirects, Got strips `host`, `cookie`, `cookie2`, `authorization`, and `proxy-authorization`. When a redirect rewrites the request to `GET`, Got also strips request body headers. Use `hooks.beforeRedirect` for app-specific sensitive headers. + + @default true + */ + get followRedirect() { + return this.#internals.followRedirect; + } + set followRedirect(value) { + options_assertAny( + "followRedirect", + [distribution.boolean, distribution.function], + value, + ); + this.#internals.followRedirect = value; } - testGlobstar(e, pattern, rest, absolute) { - if (this.dot || !e.name.startsWith(".")) { - if (!pattern.hasMore()) { - this.matches.add(e, absolute, false); - } - if (e.canReaddir()) { - // if we're in follow mode or it's not a symlink, just keep - // testing the same pattern. If there's more after the globstar, - // then this symlink consumes the globstar. If not, then we can - // follow at most ONE symlink along the way, so we mark it, which - // also checks to ensure that it wasn't already marked. - if (this.follow || !e.isSymbolicLink()) { - this.subwalks.add(e, pattern); - } else if (e.isSymbolicLink()) { - if (rest && pattern.checkFollowGlobstar()) { - this.subwalks.add(e, rest); - } else if (pattern.markFollowGlobstar()) { - this.subwalks.add(e, pattern); - } - } - } - } - // if the NEXT thing matches this entry, then also add - // the rest. - if (rest) { - const rp = rest.pattern(); - if ( - typeof rp === "string" && - // dots and empty were handled already - rp !== ".." && - rp !== "" && - rp !== "." - ) { - this.testString(e, rp, rest.rest(), absolute); - } else if (rp === "..") { - /* c8 ignore start */ - const ep = e.parent || e; - /* c8 ignore stop */ - this.subwalks.add(ep, rest); - } else if (rp instanceof RegExp) { - this.testRegExp(e, rp, rest.rest(), absolute); - } + get followRedirects() { + throw new TypeError( + "The `followRedirects` option does not exist. Use `followRedirect` instead.", + ); + } + set followRedirects(_value) { + throw new TypeError( + "The `followRedirects` option does not exist. Use `followRedirect` instead.", + ); + } + /** + If exceeded, the request will be aborted and a `MaxRedirectsError` will be thrown. + + @default 10 + */ + get maxRedirects() { + return this.#internals.maxRedirects; + } + set maxRedirects(value) { + assert.number(value); + this.#internals.maxRedirects = value; + } + /** + A cache adapter instance for storing cached response data. + + @default false + */ + get cache() { + return this.#internals.cache; + } + set cache(value) { + options_assertAny( + "cache", + [ + distribution.object, + distribution.string, + distribution.boolean, + distribution.undefined, + ], + value, + ); + if (value === true) { + this.#internals.cache = globalCache; + } else if (value === false) { + this.#internals.cache = undefined; + } else { + this.#internals.cache = wrapQuickLruIfNeeded(value); } } - testRegExp(e, p, rest, absolute) { - if (!p.test(e.name)) return; - if (!rest) { - this.matches.add(e, absolute, false); + /** + Determines if a `got.HTTPError` is thrown for unsuccessful responses. + + If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing. + This may be useful if you are checking for resource availability and are expecting error responses. + + @default true + */ + get throwHttpErrors() { + return this.#internals.throwHttpErrors; + } + set throwHttpErrors(value) { + assert.boolean(value); + this.#internals.throwHttpErrors = value; + } + get username() { + const url = this.#internals.url; + const value = url ? url.username : this.#internals.username; + return decodeURIComponent(value); + } + set username(value) { + assert.string(value); + const url = this.#internals.url; + const fixedValue = encodeURIComponent(value); + if (url) { + url.username = fixedValue; } else { - this.subwalks.add(e, rest); + this.#internals.username = fixedValue; } + trackStateMutation(this.#trackedStateMutations, "username"); } - testString(e, p, rest, absolute) { - // should never happen? - if (!e.isNamed(p)) return; - if (!rest) { - this.matches.add(e, absolute, false); + get password() { + const url = this.#internals.url; + const value = url ? url.password : this.#internals.password; + return decodeURIComponent(value); + } + set password(value) { + assert.string(value); + const url = this.#internals.url; + const fixedValue = encodeURIComponent(value); + if (url) { + url.password = fixedValue; } else { - this.subwalks.add(e, rest); + this.#internals.password = fixedValue; } + trackStateMutation(this.#trackedStateMutations, "password"); } - } - exports.Processor = Processor; - //# sourceMappingURL=processor.js.map + /** + If set to `true`, Got will additionally accept HTTP2 requests. - /***/ - }, + It will choose either HTTP/1.1 or HTTP/2 depending on the ALPN protocol. - /***/ 8757: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + __Note__: This option requires Node.js 15.10.0 or newer as HTTP/2 support on older Node.js versions is very buggy. - var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0; - /** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ - const minipass_1 = __importDefault(__nccwpck_require__(1077)); - const ignore_js_1 = __nccwpck_require__(7056); - const processor_js_1 = __nccwpck_require__(146); - const makeIgnore = (ignore, opts) => - typeof ignore === "string" - ? new ignore_js_1.Ignore([ignore], opts) - : Array.isArray(ignore) - ? new ignore_js_1.Ignore(ignore, opts) - : ignore; - /** - * basic walking utilities that all the glob walker types use - */ - class GlobUtil { - path; - patterns; - opts; - seen = new Set(); - paused = false; - aborted = false; - #onResume = []; - #ignore; - #sep; - signal; - maxDepth; - constructor(patterns, path, opts) { - this.patterns = patterns; - this.path = path; - this.opts = opts; - this.#sep = opts.platform === "win32" ? "\\" : "/"; - if (opts.ignore) { - this.#ignore = makeIgnore(opts.ignore, opts); - } - // ignore, always set with maxDepth, but it's optional on the - // GlobOptions type - /* c8 ignore start */ - this.maxDepth = opts.maxDepth || Infinity; - /* c8 ignore stop */ - if (opts.signal) { - this.signal = opts.signal; - this.signal.addEventListener("abort", () => { - this.#onResume.length = 0; - }); - } + __Note__: Overriding `options.request` will disable HTTP2 support. + + @default false + + @example + ``` + import got from 'got'; + + const {headers} = await got('https://nghttp2.org/httpbin/anything', {http2: true}); + + console.log(headers.via); + //=> '2 nghttpx' + ``` + */ + get http2() { + return this.#internals.http2; } - #ignored(path) { - return this.seen.has(path) || !!this.#ignore?.ignored?.(path); + set http2(value) { + assert.boolean(value); + this.#internals.http2 = value; } - #childrenIgnored(path) { - return !!this.#ignore?.childrenIgnored?.(path); + /** + Set this to `true` to allow sending body for the `GET` method. + However, the [HTTP/2 specification](https://tools.ietf.org/html/rfc7540#section-8.1.3) says that `An HTTP GET request includes request header fields and no payload body`, therefore when using the HTTP/2 protocol this option will have no effect. + This option is only meant to interact with non-compliant servers when you have no other choice. + + __Note__: The [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1) doesn't specify any particular behavior for the GET method having a payload, therefore __it's considered an [anti-pattern](https://en.wikipedia.org/wiki/Anti-pattern)__. + + @default false + */ + get allowGetBody() { + return this.#internals.allowGetBody; } - // backpressure mechanism - pause() { - this.paused = true; + set allowGetBody(value) { + assert.boolean(value); + this.#internals.allowGetBody = value; } - resume() { - /* c8 ignore start */ - if (this.signal?.aborted) return; - /* c8 ignore stop */ - this.paused = false; - let fn = undefined; - while (!this.paused && (fn = this.#onResume.shift())) { - fn(); - } + /** + Automatically copy headers from piped streams. + + When piping a request into a Got stream (e.g., `request.pipe(got.stream(url))`), this controls whether headers from the source stream are automatically merged into the Got request headers. + + Note: Explicitly set headers take precedence over piped headers. Piped headers are only copied when a header is not already explicitly set. + + Useful for proxy scenarios when explicitly enabled, but you may still want to filter out headers like `Host`, `Connection`, `Authorization`, etc. + + @default false + + @example + ``` + import got from 'got'; + import {pipeline} from 'node:stream/promises'; + + // Opt in to automatic header copying for proxy scenarios + server.get('/proxy', async (request, response) => { + const gotStream = got.stream('https://example.com', { + copyPipedHeaders: true, + // Explicit headers win over piped headers + headers: { + host: 'example.com', + } + }); + + await pipeline(request, gotStream, response); + }); + ``` + + @example + ``` + import got from 'got'; + import {pipeline} from 'node:stream/promises'; + + // Keep it disabled and manually copy only safe headers + server.get('/proxy', async (request, response) => { + const gotStream = got.stream('https://example.com', { + headers: { + 'user-agent': request.headers['user-agent'], + 'accept': request.headers['accept'], + // Explicitly NOT copying host, connection, authorization, etc. + } + }); + + await pipeline(request, gotStream, response); + }); + ``` + */ + get copyPipedHeaders() { + return this.#internals.copyPipedHeaders; } - onResume(fn) { - if (this.signal?.aborted) return; - /* c8 ignore start */ - if (!this.paused) { - fn(); - } else { - /* c8 ignore stop */ - this.#onResume.push(fn); - } - } - // do the requisite realpath/stat checking, and return the path - // to add or undefined to filter it out. - async matchCheck(e, ifDir) { - if (ifDir && this.opts.nodir) return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || (await e.realpath()); - if (!rpc) return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir); - } - matchCheckTest(e, ifDir) { - return e && - (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && - (!ifDir || e.canReaddir()) && - (!this.opts.nodir || !e.isDirectory()) && - !this.#ignored(e) - ? e - : undefined; + set copyPipedHeaders(value) { + assert.boolean(value); + this.#internals.copyPipedHeaders = value; } - matchCheckSync(e, ifDir) { - if (ifDir && this.opts.nodir) return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || e.realpathSync(); - if (!rpc) return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir); - } - matchFinish(e, absolute) { - if (this.#ignored(e)) return; - const abs = - this.opts.absolute === undefined ? absolute : this.opts.absolute; - this.seen.add(e); - const mark = this.opts.mark && e.isDirectory() ? this.#sep : ""; - // ok, we have what we need! - if (this.opts.withFileTypes) { - this.matchEmit(e); - } else if (abs) { - this.matchEmit(e.fullpath() + mark); - } else { - const rel = e.relative(); - const pre = - this.opts.dotRelative && !rel.startsWith(".." + this.#sep) - ? "." + this.#sep - : ""; - this.matchEmit(!rel && mark ? "." + mark : pre + rel + mark); - } + isHeaderExplicitlySet(name) { + return this.#explicitHeaders.has(name.toLowerCase()); } - async match(e, absolute, ifDir) { - const p = await this.matchCheck(e, ifDir); - if (p) this.matchFinish(p, absolute); + shouldCopyPipedHeader(name) { + return !this.isHeaderExplicitlySet(name); } - matchSync(e, absolute, ifDir) { - const p = this.matchCheckSync(e, ifDir); - if (p) this.matchFinish(p, absolute); + setPipedHeader(name, value) { + assertValidHeaderName(name); + this.#internals.headers[name.toLowerCase()] = value; } - walkCB(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) cb(); - /* c8 ignore stop */ - this.walkCB2( - target, - patterns, - new processor_js_1.Processor(this.opts), - cb - ); + getInternalHeaders() { + return this.#internals.headers; } - walkCB2(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) return cb(); - if (this.signal?.aborted) cb(); - if (this.paused) { - this.onResume(() => this.walkCB2(target, patterns, processor, cb)); - return; + setInternalHeader(name, value) { + assertValidHeaderName(name); + this.#internals.headers[name.toLowerCase()] = value; + } + deleteInternalHeader(name) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete this.#internals.headers[name.toLowerCase()]; + } + async trackStateMutations(operation) { + const changedState = new Set(); + this.#trackedStateMutations = changedState; + try { + return await operation(changedState); + } finally { + this.#trackedStateMutations = undefined; } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); + } + clearBody() { + this.body = undefined; + this.json = undefined; + this.form = undefined; + for (const header of bodyHeaderNames) { + this.deleteInternalHeader(header); } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const childrenCached = t.readdirCached(); - if (t.calledReaddir()) - this.walkCB3(t, childrenCached, processor, next); - else { - t.readdirCB( - (_, entries) => this.walkCB3(t, entries, processor, next), - true - ); - } + } + clearUnchangedCookieHeader(previousState, changedState) { + if ( + previousState?.hadCookieJar && + this.cookieJar === undefined && + !this.isHeaderExplicitlySet("cookie") && + !changedState?.has("cookie") && + this.headers.cookie === previousState.headers.cookie + ) { + this.deleteInternalHeader("cookie"); } - next(); } - walkCB3(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2(target, patterns, processor.child(), next); - } - next(); - } - walkCBSync(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) cb(); - /* c8 ignore stop */ - this.walkCB2Sync( - target, - patterns, - new processor_js_1.Processor(this.opts), - cb - ); - } - walkCB2Sync(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) return cb(); - if (this.signal?.aborted) cb(); - if (this.paused) { - this.onResume(() => - this.walkCB2Sync(target, patterns, processor, cb) - ); + restoreCookieHeader(previousState, headers) { + if (!previousState) { return; } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) continue; - this.matchSync(m, absolute, ifDir); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const children = t.readdirSync(); - this.walkCB3Sync(t, children, processor, next); + if (Object.hasOwn(headers ?? {}, "cookie")) { + return; } - next(); - } - walkCB3Sync(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) continue; - this.matchSync(m, absolute, ifDir); + if (previousState.cookieWasExplicitlySet) { + this.headers.cookie = previousState.headers.cookie; + return; } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2Sync(target, patterns, processor.child(), next); + delete this.headers.cookie; + if (previousState.headers.cookie !== undefined) { + this.setInternalHeader("cookie", previousState.headers.cookie); } - next(); - } - } - exports.GlobUtil = GlobUtil; - class GlobWalker extends GlobUtil { - matches; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.matches = new Set(); } - matchEmit(e) { - this.matches.add(e); + syncCookieHeaderAfterMerge(previousState, headers) { + this.restoreCookieHeader(previousState, headers); + this.clearUnchangedCookieHeader(previousState); } - async walk() { - if (this.signal?.aborted) throw this.signal.reason; - if (this.path.isUnknown()) { - await this.path.lstat(); + stripUnchangedCrossOriginState( + previousState, + changedState, + { clearBody = true } = {}, + ) { + const headers = this.getInternalHeaders(); + const url = this.#internals.url; + for (const header of crossOriginStripHeaders) { + if ( + !changedState.has(header) && + headers[header] === previousState.headers[header] + ) { + this.deleteInternalHeader(header); + } } - await new Promise((res, rej) => { - this.walkCB(this.path, this.patterns, () => { - if (this.signal?.aborted) { - rej(this.signal.reason); - } else { - res(this.matches); - } - }); - }); - return this.matches; - } - walkSync() { - if (this.signal?.aborted) throw this.signal.reason; - if (this.path.isUnknown()) { - this.path.lstatSync(); + if ( + !hasExplicitCredentialInUrlChange(changedState, url, "username") + ) { + this.username = ""; } - // nothing for the callback to do, because this never pauses - this.walkCBSync(this.path, this.patterns, () => { - if (this.signal?.aborted) throw this.signal.reason; - }); - return this.matches; - } - } - exports.GlobWalker = GlobWalker; - class GlobStream extends GlobUtil { - results; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.results = new minipass_1.default({ - signal: this.signal, - objectMode: true, - }); - this.results.on("drain", () => this.resume()); - this.results.on("resume", () => this.resume()); - } - matchEmit(e) { - this.results.write(e); - if (!this.results.flowing) this.pause(); - } - stream() { - const target = this.path; - if (target.isUnknown()) { - target.lstat().then(() => { - this.walkCB(target, this.patterns, () => this.results.end()); - }); - } else { - this.walkCB(target, this.patterns, () => this.results.end()); + if ( + !hasExplicitCredentialInUrlChange(changedState, url, "password") + ) { + this.password = ""; } - return this.results; - } - streamSync() { - if (this.path.isUnknown()) { - this.path.lstatSync(); + if ( + clearBody && + !changedState.has("body") && + !changedState.has("json") && + !changedState.has("form") && + isBodyUnchanged(this, previousState) + ) { + this.clearBody(); } - this.walkCBSync(this.path, this.patterns, () => this.results.end()); - return this.results; } - } - exports.GlobStream = GlobStream; - //# sourceMappingURL=walker.js.map - - /***/ - }, - - /***/ 314: /***/ (__unused_webpack_module, exports) => { - "use strict"; - - // translate the various posix character classes into unicode properties - // this works across all unicode locales - Object.defineProperty(exports, "__esModule", { value: true }); - exports.parseClass = void 0; - // { : [, /u flag required, negated] - const posixClasses = { - "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true], - "[:alpha:]": ["\\p{L}\\p{Nl}", true], - "[:ascii:]": ["\\x" + "00-\\x" + "7f", false], - "[:blank:]": ["\\p{Zs}\\t", true], - "[:cntrl:]": ["\\p{Cc}", true], - "[:digit:]": ["\\p{Nd}", true], - "[:graph:]": ["\\p{Z}\\p{C}", true, true], - "[:lower:]": ["\\p{Ll}", true], - "[:print:]": ["\\p{C}", true], - "[:punct:]": ["\\p{P}", true], - "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true], - "[:upper:]": ["\\p{Lu}", true], - "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true], - "[:xdigit:]": ["A-Fa-f0-9", false], - }; - // only need to escape a few things inside of brace expressions - // escapes: [ \ ] - - const braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&"); - // escape all regexp magic characters - const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - // everything has already been escaped, we just have to join - const rangesToString = (ranges) => ranges.join(""); - // takes a glob string at a posix brace expression, and returns - // an equivalent regular expression source, and boolean indicating - // whether the /u flag needs to be applied, and the number of chars - // consumed to parse the character class. - // This also removes out of order ranges, and returns ($.) if the - // entire class just no good. - const parseClass = (glob, position) => { - const pos = position; - /* c8 ignore start */ - if (glob.charAt(pos) !== "[") { - throw new Error("not in a brace expression"); - } - /* c8 ignore stop */ - const ranges = []; - const negs = []; - let i = pos + 1; - let sawStart = false; - let uflag = false; - let escaping = false; - let negate = false; - let endPos = pos; - let rangeStart = ""; - WHILE: while (i < glob.length) { - const c = glob.charAt(i); - if ((c === "!" || c === "^") && i === pos + 1) { - negate = true; - i++; - continue; - } - if (c === "]" && sawStart && !escaping) { - endPos = i + 1; - break; + /** + Strip sensitive headers and credentials when navigating to a different origin. + Headers and credentials explicitly provided in `userOptions` are preserved. + */ + stripSensitiveHeaders(previousUrl, nextUrl, userOptions) { + if (isSameOrigin(previousUrl, nextUrl)) { + return; } - sawStart = true; - if (c === "\\") { - if (!escaping) { - escaping = true; - i++; - continue; + const headers = lowercase_keys_lowercaseKeys( + userOptions.headers ?? {}, + ); + for (const header of crossOriginStripHeaders) { + if (headers[header] === undefined) { + this.deleteInternalHeader(header); } - // escaped \ char, fall through and treat like normal char - } - if (c === "[" && !escaping) { - // either a posix class, a collation equivalent, or just a [ - for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { - if (glob.startsWith(cls, i)) { - // invalid, [a-[] is fine, but not [a-[:alpha]] - if (rangeStart) { - return ["$.", false, glob.length - pos, true]; - } - i += cls.length; - if (neg) negs.push(unip); - else ranges.push(unip); - uflag = uflag || u; - continue WHILE; - } - } - } - // now it's just a normal character, effectively - escaping = false; - if (rangeStart) { - // throw this range away if it's not valid, but others - // can still match. - if (c > rangeStart) { - ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c)); - } else if (c === rangeStart) { - ranges.push(braceEscape(c)); - } - rangeStart = ""; - i++; - continue; } - // now might be the start of a range. - // can be either c-d or c-] or c] or c] at this point - if (glob.startsWith("-]", i + 1)) { - ranges.push(braceEscape(c + "-")); - i += 2; - continue; + const explicitUsername = Object.hasOwn(userOptions, "username") + ? userOptions.username + : undefined; + const explicitPassword = Object.hasOwn(userOptions, "password") + ? userOptions.password + : undefined; + const hasExplicitUsername = + explicitUsername !== undefined || + hasCredentialInUrl(userOptions.url, "username") || + isCrossOriginCredentialChanged(previousUrl, nextUrl, "username"); + const hasExplicitPassword = + explicitPassword !== undefined || + hasCredentialInUrl(userOptions.url, "password") || + isCrossOriginCredentialChanged(previousUrl, nextUrl, "password"); + if (!hasExplicitUsername && this.username) { + this.username = ""; } - if (glob.startsWith("-", i + 1)) { - rangeStart = c; - i += 2; - continue; + if (!hasExplicitPassword && this.password) { + this.password = ""; } - // not the start of a range, just a single character - ranges.push(braceEscape(c)); - i++; } - if (endPos < i) { - // didn't see the end of the class, not a valid class, - // but might still be valid as a literal match. - return ["", false, 0, false]; + /** + Request headers. + + Existing headers will be overwritten. Headers set to `undefined` will be omitted. + + @default {} + */ + get headers() { + return this.#headersProxy; } - // if we got no ranges and no negates, then we have a range that - // cannot possibly match anything, and that poisons the whole glob - if (!ranges.length && !negs.length) { - return ["$.", false, glob.length - pos, true]; + set headers(value) { + options_assertPlainObject("headers", value); + const normalizedHeaders = lowercase_keys_lowercaseKeys(value); + for (const header of Object.keys(normalizedHeaders)) { + assertValidHeaderName(header); + } + if (this.#merging) { + safeObjectAssign(this.#internals.headers, normalizedHeaders); + } else { + const previousHeaders = this.#internals.headers; + this.#internals.headers = normalizedHeaders; + this.#headersProxy = this.#createHeadersProxy(); + this.#explicitHeaders.clear(); + trackReplacedHeaderMutations( + this.#trackedStateMutations, + previousHeaders, + normalizedHeaders, + ); + } + for (const header of Object.keys(normalizedHeaders)) { + if (this.#merging) { + markHeaderAsExplicit( + this.#explicitHeaders, + this.#trackedStateMutations, + header, + ); + } else { + addExplicitHeader(this.#explicitHeaders, header); + } + } } - // if we got one positive range, and it's a single character, then that's - // not actually a magic pattern, it's just that one literal character. - // we should not treat that as "magic", we should just return the literal - // character. [_] is a perfectly valid way to escape glob magic chars. - if ( - negs.length === 0 && - ranges.length === 1 && - /^\\?.$/.test(ranges[0]) && - !negate - ) { - const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; - return [regexpEscape(r), false, endPos - pos, false]; - } - const sranges = - "[" + (negate ? "^" : "") + rangesToString(ranges) + "]"; - const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]"; - const comb = - ranges.length && negs.length - ? "(" + sranges + "|" + snegs + ")" - : ranges.length - ? sranges - : snegs; - return [comb, uflag, endPos - pos, true]; - }; - exports.parseClass = parseClass; - //# sourceMappingURL=brace-expressions.js.map + /** + Specifies if the HTTP request method should be [rewritten as `GET`](https://tools.ietf.org/html/rfc7231#section-6.4) on redirects. - /***/ - }, + As the [specification](https://tools.ietf.org/html/rfc7231#section-6.4) prefers to rewrite the HTTP method only on `303` responses, this is Got's default behavior. Cross-origin `301` and `302` redirects also rewrite `POST` requests to `GET` by default to avoid forwarding request bodies to another origin. + Setting `methodRewriting` to `true` will also rewrite same-origin `301` and `302` responses, as allowed by the spec. This is the behavior followed by `curl` and browsers. - /***/ 1477: /***/ (__unused_webpack_module, exports) => { - "use strict"; + __Note__: Got never performs method rewriting on `307` and `308` responses, as this is [explicitly prohibited by the specification](https://www.rfc-editor.org/rfc/rfc7231#section-6.4.7). - Object.defineProperty(exports, "__esModule", { value: true }); - exports.escape = void 0; - /** - * Escape all magic characters in a glob pattern. - * - * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} - * option is used, then characters are escaped by wrapping in `[]`, because - * a magic character wrapped in a character class can only be satisfied by - * that exact character. In this mode, `\` is _not_ escaped, because it is - * not interpreted as a magic character, but instead as a path separator. - */ - const escape = (s, { windowsPathsNoEscape = false } = {}) => { - // don't need to escape +@! because we escape the parens - // that make those magic, and escaping ! as [!] isn't valid, - // because [!]] is a valid glob class meaning not ']'. - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, "[$&]") - : s.replace(/[?*()[\]\\]/g, "\\$&"); - }; - exports.escape = escape; - //# sourceMappingURL=escape.js.map + @default false + */ + get methodRewriting() { + return this.#internals.methodRewriting; + } + set methodRewriting(value) { + assert.boolean(value); + this.#internals.methodRewriting = value; + } + /** + Indicates which DNS record family to use. - /***/ - }, + Values: + - `undefined`: IPv4 (if present) or IPv6 + - `4`: Only IPv4 + - `6`: Only IPv6 - /***/ 3355: /***/ function ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) { - "use strict"; + @default undefined + */ + get dnsLookupIpVersion() { + return this.#internals.dnsLookupIpVersion; + } + set dnsLookupIpVersion(value) { + if (value !== undefined && value !== 4 && value !== 6) { + throw new TypeError(`Invalid DNS lookup IP version: ${value}`); + } + this.#internals.dnsLookupIpVersion = value; + } + /** + A function used to parse JSON responses. - var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - const index_js_1 = __importDefault(__nccwpck_require__(266)); - module.exports = Object.assign(index_js_1.default, { - default: index_js_1.default, - minimatch: index_js_1.default, - }); - //# sourceMappingURL=index-cjs.js.map + @example + ``` + import got from 'got'; + import Bourne from '@hapi/bourne'; - /***/ - }, + const parsed = await got('https://example.com', { + parseJson: text => Bourne.parse(text) + }).json(); - /***/ 266: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; + console.log(parsed); + ``` + */ + get parseJson() { + return this.#internals.parseJson; + } + set parseJson(value) { + assert.function(value); + this.#internals.parseJson = value; + } + /** + A function used to stringify the body of JSON requests. - var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.unescape = exports.escape = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; - const brace_expansion_1 = __importDefault(__nccwpck_require__(1046)); - const brace_expressions_js_1 = __nccwpck_require__(314); - const escape_js_1 = __nccwpck_require__(1477); - const unescape_js_1 = __nccwpck_require__(9820); - const minimatch = (p, pattern, options = {}) => { - assertValidPattern(pattern); - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; + @example + ``` + import got from 'got'; + + await got.post('https://example.com', { + stringifyJson: object => JSON.stringify(object, (key, value) => { + if (key.startsWith('_')) { + return; + } + + return value; + }), + json: { + some: 'payload', + _ignoreMe: 1234 } - return new Minimatch(pattern, options).match(p); - }; - exports.minimatch = minimatch; - exports["default"] = exports.minimatch; - // Optimized checking for the most common glob patterns. - const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; - const starDotExtTest = (ext) => (f) => - !f.startsWith(".") && f.endsWith(ext); - const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); - const starDotExtTestNocase = (ext) => { - ext = ext.toLowerCase(); - return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext); - }; - const starDotExtTestNocaseDot = (ext) => { - ext = ext.toLowerCase(); - return (f) => f.toLowerCase().endsWith(ext); - }; - const starDotStarRE = /^\*+\.\*+$/; - const starDotStarTest = (f) => !f.startsWith(".") && f.includes("."); - const starDotStarTestDot = (f) => - f !== "." && f !== ".." && f.includes("."); - const dotStarRE = /^\.\*+$/; - const dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith("."); - const starRE = /^\*+$/; - const starTest = (f) => f.length !== 0 && !f.startsWith("."); - const starTestDot = (f) => f.length !== 0 && f !== "." && f !== ".."; - const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; - const qmarksTestNocase = ([$0, ext = ""]) => { - const noext = qmarksTestNoExt([$0]); - if (!ext) return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); - }; - const qmarksTestNocaseDot = ([$0, ext = ""]) => { - const noext = qmarksTestNoExtDot([$0]); - if (!ext) return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); - }; - const qmarksTestDot = ([$0, ext = ""]) => { - const noext = qmarksTestNoExtDot([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); - }; - const qmarksTest = ([$0, ext = ""]) => { - const noext = qmarksTestNoExt([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); - }; - const qmarksTestNoExt = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && !f.startsWith("."); - }; - const qmarksTestNoExtDot = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && f !== "." && f !== ".."; - }; - /* c8 ignore start */ - const defaultPlatform = - typeof process === "object" && process - ? (typeof process.env === "object" && - process.env && - process.env.__MINIMATCH_TESTING_PLATFORM__) || - process.platform - : "posix"; - const path = { - win32: { sep: "\\" }, - posix: { sep: "/" }, - }; - /* c8 ignore stop */ - exports.sep = - defaultPlatform === "win32" ? path.win32.sep : path.posix.sep; - exports.minimatch.sep = exports.sep; - exports.GLOBSTAR = Symbol("globstar **"); - exports.minimatch.GLOBSTAR = exports.GLOBSTAR; - const plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" }, - }; - // any single thing other than / - // don't need to escape / when using new RegExp() - const qmark = "[^/]"; - // * => any number of characters - const star = qmark + "*?"; - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - const twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - const twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - // "abc" -> { a:true, b:true, c:true } - const charSet = (s) => - s.split("").reduce((set, c) => { - set[c] = true; - return set; - }, {}); - // characters that need to be escaped in RegExp. - const reSpecials = charSet("().*{}+?[]^$\\!"); - // characters that indicate we have to add the pattern start - const addPatternStartSet = charSet("[.("); - const filter = (pattern, options = {}) => (p) => - (0, exports.minimatch)(p, pattern, options); - exports.filter = filter; - exports.minimatch.filter = exports.filter; - const ext = (a, b = {}) => Object.assign({}, a, b); - const defaults = (def) => { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return exports.minimatch; - } - const orig = exports.minimatch; - const m = (p, pattern, options = {}) => - orig(p, pattern, ext(def, options)); - return Object.assign(m, { - Minimatch: class Minimatch extends orig.Minimatch { - constructor(pattern, options = {}) { - super(pattern, ext(def, options)); - } - static defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; + }); + ``` + + @example + ``` + import got from 'got'; + + await got.post('https://example.com', { + stringifyJson: object => JSON.stringify(object, (key, value) => { + if (typeof value === 'number') { + return value.toString(); } - }, - unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), - escape: (s, options = {}) => orig.escape(s, ext(def, options)), - filter: (pattern, options = {}) => - orig.filter(pattern, ext(def, options)), - defaults: (options) => orig.defaults(ext(def, options)), - makeRe: (pattern, options = {}) => - orig.makeRe(pattern, ext(def, options)), - braceExpand: (pattern, options = {}) => - orig.braceExpand(pattern, ext(def, options)), - match: (list, pattern, options = {}) => - orig.match(list, pattern, ext(def, options)), - sep: orig.sep, - GLOBSTAR: exports.GLOBSTAR, - }); - }; - exports.defaults = defaults; - exports.minimatch.defaults = exports.defaults; - // Brace expansion: - // a{b,c}d -> abd acd - // a{b,}c -> abc ac - // a{0..3}d -> a0d a1d a2d a3d - // a{b,c{d,e}f}g -> abg acdfg acefg - // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg - // - // Invalid sets are not expanded. - // a{2..}b -> a{2..}b - // a{b}c -> a{b}c - const braceExpand = (pattern, options = {}) => { - assertValidPattern(pattern); - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern]; - } - return (0, brace_expansion_1.default)(pattern); - }; - exports.braceExpand = braceExpand; - exports.minimatch.braceExpand = exports.braceExpand; - const MAX_PATTERN_LENGTH = 1024 * 64; - const assertValidPattern = (pattern) => { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); + + return value; + }), + json: { + some: 'payload', + number: 1 } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); + }); + ``` + */ + get stringifyJson() { + return this.#internals.stringifyJson; } - }; - // parse a component of the expanded set. - // At this point, no pattern may contain "/" in it - // so we're going to return a 2d array, where each entry is the full - // pattern, split on '/', and then turned into a regular expression. - // A regexp is made at the end which joins each array with an - // escaped /, and another full one which joins each regexp with |. - // - // Following the lead of Bash 4.1, note that "**" only has special meaning - // when it is the *only* thing in a path portion. Otherwise, any series - // of * is equivalent to a single *. Globstar behavior is enabled by - // default, and can be disabled by setting options.noglobstar. - const makeRe = (pattern, options = {}) => - new Minimatch(pattern, options).makeRe(); - exports.makeRe = makeRe; - exports.minimatch.makeRe = exports.makeRe; - const match = (list, pattern, options = {}) => { - const mm = new Minimatch(pattern, options); - list = list.filter((f) => mm.match(f)); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - exports.match = match; - exports.minimatch.match = exports.match; - // replace stuff like \* with * - const globUnescape = (s) => s.replace(/\\(.)/g, "$1"); - const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; - const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - class Minimatch { - options; - set; - pattern; - windowsPathsNoEscape; - nonegate; - negate; - comment; - empty; - preserveMultipleSlashes; - partial; - globSet; - globParts; - nocase; - isWindows; - platform; - windowsNoMagicRoot; - regexp; - constructor(pattern, options = {}) { - assertValidPattern(pattern); - options = options || {}; - this.options = options; - this.pattern = pattern; - this.platform = options.platform || defaultPlatform; - this.isWindows = this.platform === "win32"; - this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || - options.allowWindowsEscape === false; - if (this.windowsPathsNoEscape) { - this.pattern = this.pattern.replace(/\\/g, "/"); - } - this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; - this.regexp = null; - this.negate = false; - this.nonegate = !!options.nonegate; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.nocase = !!this.options.nocase; - this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot - : !!(this.isWindows && this.nocase); - this.globSet = []; - this.globParts = []; - this.set = []; - // make the set of regexps etc. - this.make(); - } - hasMagic() { - if (this.options.magicalBraces && this.set.length > 1) { - return true; - } - for (const pattern of this.set) { - for (const part of pattern) { - if (typeof part !== "string") return true; - } - } - return false; + set stringifyJson(value) { + assert.function(value); + this.#internals.stringifyJson = value; } - debug(..._) {} - make() { - const pattern = this.pattern; - const options = this.options; - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; + /** + An object representing `limit`, `calculateDelay`, `methods`, `statusCodes`, `maxRetryAfter` and `errorCodes` fields for maximum retry count, retry handler, allowed methods, allowed status codes, maximum [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) time and allowed error codes. + + Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 1). + + The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value. + The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry). + + The `enforceRetryRules` property is a `boolean` that, when set to `true` (default), enforces the `limit`, `methods`, `statusCodes`, and `errorCodes` options before calling `calculateDelay`. Your `calculateDelay` function is only invoked when a retry is allowed based on these criteria. When `false`, `calculateDelay` receives the computed value but can override all retry logic. + + __Note:__ When `enforceRetryRules` is `false`, you must check `computedValue` in your `calculateDelay` function to respect retry rules. When `true` (default), the retry rules are enforced automatically. + + By default, it retries *only* on the specified methods, status codes, and on these network errors: + + - `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached. + - `ECONNRESET`: Connection was forcibly closed by a peer. + - `EADDRINUSE`: Could not bind to any free port. + - `ECONNREFUSED`: Connection was refused by the server. + - `EPIPE`: The remote side of the stream being written has been closed. + - `ENOTFOUND`: Couldn't resolve the hostname to an IP address. + - `ENETUNREACH`: No internet connection. + - `EAI_AGAIN`: DNS lookup timed out. + + __Note__: If `maxRetryAfter` is set to `undefined`, it will use `options.timeout`. + __Note__: If [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header is greater than `maxRetryAfter`, it will cancel the request. + */ + get retry() { + return this.#internals.retry; + } + set retry(value) { + options_assertPlainObject("retry", value); + options_assertAny( + "retry.calculateDelay", + [distribution.function, distribution.undefined], + value.calculateDelay, + ); + options_assertAny( + "retry.maxRetryAfter", + [distribution.number, distribution.undefined], + value.maxRetryAfter, + ); + options_assertAny( + "retry.limit", + [distribution.number, distribution.undefined], + value.limit, + ); + options_assertAny( + "retry.methods", + [distribution.array, distribution.undefined], + value.methods, + ); + options_assertAny( + "retry.statusCodes", + [distribution.array, distribution.undefined], + value.statusCodes, + ); + options_assertAny( + "retry.errorCodes", + [distribution.array, distribution.undefined], + value.errorCodes, + ); + options_assertAny( + "retry.noise", + [distribution.number, distribution.undefined], + value.noise, + ); + options_assertAny( + "retry.enforceRetryRules", + [distribution.boolean, distribution.undefined], + value.enforceRetryRules, + ); + if (value.noise && Math.abs(value.noise) > 100) { + throw new Error( + `The maximum acceptable retry noise is +/- 100ms, got ${value.noise}`, + ); } - // step 1: figure out negation, etc. - this.parseNegate(); - // step 2: expand braces - this.globSet = [...new Set(this.braceExpand())]; - if (options.debug) { - this.debug = (...args) => console.error(...args); - } - this.debug(this.pattern, this.globSet); - // step 3: now we have a set, so turn each one into a series of - // path-portion matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - // - // First, we preprocess to make the glob pattern sets a bit simpler - // and deduped. There are some perf-killing patterns that can cause - // problems with a glob walk, but we can simplify them down a bit. - const rawGlobParts = this.globSet.map((s) => this.slashSplit(s)); - this.globParts = this.preprocess(rawGlobParts); - this.debug(this.pattern, this.globParts); - // glob --> regexps - let set = this.globParts.map((s, _, __) => { - if (this.isWindows && this.windowsNoMagicRoot) { - // check if it's a drive or unc path. - const isUNC = - s[0] === "" && - s[1] === "" && - (s[2] === "?" || !globMagic.test(s[2])) && - !globMagic.test(s[3]); - const isDrive = /^[a-z]:/i.test(s[0]); - if (isUNC) { - return [ - ...s.slice(0, 4), - ...s.slice(4).map((ss) => this.parse(ss)), - ]; - } else if (isDrive) { - return [s[0], ...s.slice(1).map((ss) => this.parse(ss))]; - } - } - return s.map((ss) => this.parse(ss)); - }); - this.debug(this.pattern, set); - // filter out everything that didn't compile properly. - this.set = set.filter((s) => s.indexOf(false) === -1); - // do not treat the ? in UNC paths as magic - if (this.isWindows) { - for (let i = 0; i < this.set.length; i++) { - const p = this.set[i]; - if ( - p[0] === "" && - p[1] === "" && - this.globParts[i][2] === "?" && - typeof p[3] === "string" && - /^[a-z]:$/i.test(p[3]) - ) { - p[2] = "?"; - } + for (const key of Object.keys(value)) { + if (key === "__proto__") { + continue; } - } - this.debug(this.pattern, this.set); - } - // various transforms to equivalent pattern sets that are - // faster to process in a filesystem walk. The goal is to - // eliminate what we can, and push all ** patterns as far - // to the right as possible, even if it increases the number - // of patterns that we have to process. - preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * - if (this.options.noglobstar) { - for (let i = 0; i < globParts.length; i++) { - for (let j = 0; j < globParts[i].length; j++) { - if (globParts[i][j] === "**") { - globParts[i][j] = "*"; - } - } + if (!(key in this.#internals.retry)) { + throw new Error(`Unexpected retry option: ${key}`); } } - const { optimizationLevel = 1 } = this.options; - if (optimizationLevel >= 2) { - // aggressive optimization for the purpose of fs walking - globParts = this.firstPhasePreProcess(globParts); - globParts = this.secondPhasePreProcess(globParts); - } else if (optimizationLevel >= 1) { - // just basic optimizations to remove some .. parts - globParts = this.levelOneOptimize(globParts); + if (this.#merging) { + safeObjectAssign(this.#internals.retry, value); } else { - globParts = this.adjascentGlobstarOptimize(globParts); + this.#internals.retry = { ...value }; } - return globParts; + const { retry } = this.#internals; + retry.methods = [ + ...new Set(retry.methods.map((method) => method.toUpperCase())), + ]; + retry.statusCodes = [...new Set(retry.statusCodes)]; + retry.errorCodes = [...new Set(retry.errorCodes)]; } - // just get rid of adjascent ** portions - adjascentGlobstarOptimize(globParts) { - return globParts.map((parts) => { - let gs = -1; - while (-1 !== (gs = parts.indexOf("**", gs + 1))) { - let i = gs; - while (parts[i + 1] === "**") { - i++; - } - if (i !== gs) { - parts.splice(gs, i - gs); - } - } - return parts; - }); + /** + From `http.RequestOptions`. + + The IP address used to send the request from. + */ + get localAddress() { + return this.#internals.localAddress; + } + set localAddress(value) { + options_assertAny( + "localAddress", + [distribution.string, distribution.undefined], + value, + ); + this.#internals.localAddress = value; } - // get rid of adjascent ** and resolve .. portions - levelOneOptimize(globParts) { - return globParts.map((parts) => { - parts = parts.reduce((set, part) => { - const prev = set[set.length - 1]; - if (part === "**" && prev === "**") { - return set; - } - if (part === "..") { - if (prev && prev !== ".." && prev !== "." && prev !== "**") { - set.pop(); - return set; - } - } - set.push(part); - return set; - }, []); - return parts.length === 0 ? [""] : parts; - }); + /** + The HTTP method used to make the request. + + @default 'GET' + */ + get method() { + return this.#internals.method; } - levelTwoFileOptimize(parts) { - if (!Array.isArray(parts)) { - parts = this.slashSplit(parts); - } - let didSomething = false; - do { - didSomething = false; - //
// -> 
/
-            if (!this.preserveMultipleSlashes) {
-              for (let i = 1; i < parts.length - 1; i++) {
-                const p = parts[i];
-                // don't squeeze out UNC patterns
-                if (i === 1 && p === "" && parts[0] === "") continue;
-                if (p === "." || p === "") {
-                  didSomething = true;
-                  parts.splice(i, 1);
-                  i--;
-                }
-              }
-              if (
-                parts[0] === "." &&
-                parts.length === 2 &&
-                (parts[1] === "." || parts[1] === "")
-              ) {
-                didSomething = true;
-                parts.pop();
-              }
-            }
-            // 
/

/../ ->

/
-            let dd = 0;
-            while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
-              const p = parts[dd - 1];
-              if (p && p !== "." && p !== ".." && p !== "**") {
-                didSomething = true;
-                parts.splice(dd - 1, 2);
-                dd -= 2;
-              }
-            }
-          } while (didSomething);
-          return parts.length === 0 ? [""] : parts;
-        }
-        // First phase: single-pattern processing
-        // 
 is 1 or more portions
-        //  is 1 or more portions
-        // 

is any portion other than ., .., '', or ** - // is . or '' - // - // **/.. is *brutal* for filesystem walking performance, because - // it effectively resets the recursive walk each time it occurs, - // and ** cannot be reduced out by a .. pattern part like a regexp - // or most strings (other than .., ., and '') can be. - // - //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} - //

// -> 
/
-        // 
/

/../ ->

/
-        // **/**/ -> **/
-        //
-        // **/*/ -> */**/ <== not valid because ** doesn't follow
-        // this WOULD be allowed if ** did follow symlinks, or * didn't
-        firstPhasePreProcess(globParts) {
-          let didSomething = false;
-          do {
-            didSomething = false;
-            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} - for (let parts of globParts) { - let gs = -1; - while (-1 !== (gs = parts.indexOf("**", gs + 1))) { - let gss = gs; - while (parts[gss + 1] === "**") { - //

/**/**/ -> 
/**/
-                  gss++;
-                }
-                // eg, if gs is 2 and gss is 4, that means we have 3 **
-                // parts, and can remove 2 of them.
-                if (gss > gs) {
-                  parts.splice(gs + 1, gss - gs);
-                }
-                let next = parts[gs + 1];
-                const p = parts[gs + 2];
-                const p2 = parts[gs + 3];
-                if (next !== "..") continue;
-                if (
-                  !p ||
-                  p === "." ||
-                  p === ".." ||
-                  !p2 ||
-                  p2 === "." ||
-                  p2 === ".."
-                ) {
-                  continue;
-                }
-                didSomething = true;
-                // edit parts in place, and push the new one
-                parts.splice(gs, 1);
-                const other = parts.slice(0);
-                other[gs] = "**";
-                globParts.push(other);
-                gs--;
-              }
-              // 
// -> 
/
-              if (!this.preserveMultipleSlashes) {
-                for (let i = 1; i < parts.length - 1; i++) {
-                  const p = parts[i];
-                  // don't squeeze out UNC patterns
-                  if (i === 1 && p === "" && parts[0] === "") continue;
-                  if (p === "." || p === "") {
-                    didSomething = true;
-                    parts.splice(i, 1);
-                    i--;
-                  }
-                }
-                if (
-                  parts[0] === "." &&
-                  parts.length === 2 &&
-                  (parts[1] === "." || parts[1] === "")
-                ) {
-                  didSomething = true;
-                  parts.pop();
-                }
-              }
-              // 
/

/../ ->

/
-              let dd = 0;
-              while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
-                const p = parts[dd - 1];
-                if (p && p !== "." && p !== ".." && p !== "**") {
-                  didSomething = true;
-                  const needDot = dd === 1 && parts[dd + 1] === "**";
-                  const splin = needDot ? ["."] : [];
-                  parts.splice(dd - 1, 2, ...splin);
-                  if (parts.length === 0) parts.push("");
-                  dd -= 2;
-                }
-              }
-            }
-          } while (didSomething);
-          return globParts;
-        }
-        // second phase: multi-pattern dedupes
-        // {
/*/,
/

/} ->

/*/
-        // {
/,
/} -> 
/
-        // {
/**/,
/} -> 
/**/
-        //
-        // {
/**/,
/**/

/} ->

/**/
-        // ^-- not valid because ** doens't follow symlinks
-        secondPhasePreProcess(globParts) {
-          for (let i = 0; i < globParts.length - 1; i++) {
-            for (let j = i + 1; j < globParts.length; j++) {
-              const matched = this.partsMatch(
-                globParts[i],
-                globParts[j],
-                !this.preserveMultipleSlashes
-              );
-              if (!matched) continue;
-              globParts[i] = matched;
-              globParts[j] = [];
-            }
-          }
-          return globParts.filter((gs) => gs.length);
+        set method(value) {
+          assert.string(value);
+          this.#internals.method = value.toUpperCase();
         }
-        partsMatch(a, b, emptyGSMatch = false) {
-          let ai = 0;
-          let bi = 0;
-          let result = [];
-          let which = "";
-          while (ai < a.length && bi < b.length) {
-            if (a[ai] === b[bi]) {
-              result.push(which === "b" ? b[bi] : a[ai]);
-              ai++;
-              bi++;
-            } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
-              result.push(a[ai]);
-              ai++;
-            } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
-              result.push(b[bi]);
-              bi++;
-            } else if (
-              a[ai] === "*" &&
-              b[bi] &&
-              (this.options.dot || !b[bi].startsWith(".")) &&
-              b[bi] !== "**"
-            ) {
-              if (which === "b") return false;
-              which = "a";
-              result.push(a[ai]);
-              ai++;
-              bi++;
-            } else if (
-              b[bi] === "*" &&
-              a[ai] &&
-              (this.options.dot || !a[ai].startsWith(".")) &&
-              a[ai] !== "**"
-            ) {
-              if (which === "a") return false;
-              which = "b";
-              result.push(b[bi]);
-              ai++;
-              bi++;
-            } else {
-              return false;
-            }
-          }
-          // if we fall out of the loop, it means they two are identical
-          // as long as their lengths match
-          return a.length === b.length && result;
+        get createConnection() {
+          return this.#internals.createConnection;
         }
-        parseNegate() {
-          if (this.nonegate) return;
-          const pattern = this.pattern;
-          let negate = false;
-          let negateOffset = 0;
-          for (
-            let i = 0;
-            i < pattern.length && pattern.charAt(i) === "!";
-            i++
-          ) {
-            negate = !negate;
-            negateOffset++;
-          }
-          if (negateOffset) this.pattern = pattern.slice(negateOffset);
-          this.negate = negate;
-        }
-        // set partial to true to test if, for example,
-        // "/a/b" matches the start of "/*/b/*/d"
-        // Partial means, if you run out of file before you run
-        // out of pattern, then that's fine, as long as all
-        // the parts match.
-        matchOne(file, pattern, partial = false) {
-          const options = this.options;
-          // a UNC pattern like //?/c:/* can match a path like c:/x
-          // and vice versa
-          if (this.isWindows) {
-            const fileUNC =
-              file[0] === "" &&
-              file[1] === "" &&
-              file[2] === "?" &&
-              typeof file[3] === "string" &&
-              /^[a-z]:$/i.test(file[3]);
-            const patternUNC =
-              pattern[0] === "" &&
-              pattern[1] === "" &&
-              pattern[2] === "?" &&
-              typeof pattern[3] === "string" &&
-              /^[a-z]:$/i.test(pattern[3]);
-            if (fileUNC && patternUNC) {
-              const fd = file[3];
-              const pd = pattern[3];
-              if (fd.toLowerCase() === pd.toLowerCase()) {
-                file[3] = pd;
-              }
-            } else if (patternUNC && typeof file[0] === "string") {
-              const pd = pattern[3];
-              const fd = file[0];
-              if (pd.toLowerCase() === fd.toLowerCase()) {
-                pattern[3] = fd;
-                pattern = pattern.slice(3);
-              }
-            } else if (fileUNC && typeof pattern[0] === "string") {
-              const fd = file[3];
-              if (fd.toLowerCase() === pattern[0].toLowerCase()) {
-                pattern[0] = fd;
-                file = file.slice(3);
-              }
-            }
-          }
-          // resolve and reduce . and .. portions in the file as well.
-          // dont' need to do the second phase, because it's only one string[]
-          const { optimizationLevel = 1 } = this.options;
-          if (optimizationLevel >= 2) {
-            file = this.levelTwoFileOptimize(file);
-          }
-          this.debug("matchOne", this, { file, pattern });
-          this.debug("matchOne", file.length, pattern.length);
-          for (
-            var fi = 0, pi = 0, fl = file.length, pl = pattern.length;
-            fi < fl && pi < pl;
-            fi++, pi++
-          ) {
-            this.debug("matchOne loop");
-            var p = pattern[pi];
-            var f = file[fi];
-            this.debug(pattern, p, f);
-            // should be impossible.
-            // some invalid regexp stuff in the set.
-            /* c8 ignore start */
-            if (p === false) {
-              return false;
+        set createConnection(value) {
+          options_assertAny(
+            "createConnection",
+            [distribution.function, distribution.undefined],
+            value,
+          );
+          this.#internals.createConnection = value;
+        }
+        /**
+    From `http-cache-semantics`
+
+    @default {}
+    */
+        get cacheOptions() {
+          return this.#internals.cacheOptions;
+        }
+        set cacheOptions(value) {
+          options_assertPlainObject("cacheOptions", value);
+          options_assertAny(
+            "cacheOptions.shared",
+            [distribution.boolean, distribution.undefined],
+            value.shared,
+          );
+          options_assertAny(
+            "cacheOptions.cacheHeuristic",
+            [distribution.number, distribution.undefined],
+            value.cacheHeuristic,
+          );
+          options_assertAny(
+            "cacheOptions.immutableMinTimeToLive",
+            [distribution.number, distribution.undefined],
+            value.immutableMinTimeToLive,
+          );
+          options_assertAny(
+            "cacheOptions.ignoreCargoCult",
+            [distribution.boolean, distribution.undefined],
+            value.ignoreCargoCult,
+          );
+          for (const key of Object.keys(value)) {
+            if (key === "__proto__") {
+              continue;
             }
-            /* c8 ignore stop */
-            if (p === exports.GLOBSTAR) {
-              this.debug("GLOBSTAR", [pattern, p, f]);
-              // "**"
-              // a/**/b/**/c would match the following:
-              // a/b/x/y/z/c
-              // a/x/y/z/b/c
-              // a/b/x/b/x/c
-              // a/b/c
-              // To do this, take the rest of the pattern after
-              // the **, and see if it would match the file remainder.
-              // If so, return success.
-              // If not, the ** "swallows" a segment, and try again.
-              // This is recursively awful.
-              //
-              // a/**/b/**/c matching a/b/x/y/z/c
-              // - a matches a
-              // - doublestar
-              //   - matchOne(b/x/y/z/c, b/**/c)
-              //     - b matches b
-              //     - doublestar
-              //       - matchOne(x/y/z/c, c) -> no
-              //       - matchOne(y/z/c, c) -> no
-              //       - matchOne(z/c, c) -> no
-              //       - matchOne(c, c) yes, hit
-              var fr = fi;
-              var pr = pi + 1;
-              if (pr === pl) {
-                this.debug("** at the end");
-                // a ** at the end will just swallow the rest.
-                // We have found a match.
-                // however, it will not swallow /.x, unless
-                // options.dot is set.
-                // . and .. are *never* matched by **, for explosively
-                // exponential reasons.
-                for (; fi < fl; fi++) {
-                  if (
-                    file[fi] === "." ||
-                    file[fi] === ".." ||
-                    (!options.dot && file[fi].charAt(0) === ".")
-                  )
-                    return false;
-                }
-                return true;
-              }
-              // ok, let's see if we can swallow whatever we can.
-              while (fr < fl) {
-                var swallowee = file[fr];
-                this.debug(
-                  "\nglobstar while",
-                  file,
-                  fr,
-                  pattern,
-                  pr,
-                  swallowee
-                );
-                // XXX remove this slice.  Just pass the start index.
-                if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
-                  this.debug("globstar found match!", fr, fl, swallowee);
-                  // found a match.
-                  return true;
-                } else {
-                  // can't swallow "." or ".." ever.
-                  // can only swallow ".foo" when explicitly asked.
-                  if (
-                    swallowee === "." ||
-                    swallowee === ".." ||
-                    (!options.dot && swallowee.charAt(0) === ".")
-                  ) {
-                    this.debug("dot detected!", file, fr, pattern, pr);
-                    break;
-                  }
-                  // ** swallows a segment, and continue.
-                  this.debug("globstar swallow a segment, and continue");
-                  fr++;
-                }
-              }
-              // no match was found.
-              // However, in partial mode, we can't say this is necessarily over.
-              /* c8 ignore start */
-              if (partial) {
-                // ran out of file
-                this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
-                if (fr === fl) {
-                  return true;
-                }
-              }
-              /* c8 ignore stop */
-              return false;
+            if (!(key in this.#internals.cacheOptions)) {
+              throw new Error(`Cache option \`${key}\` does not exist`);
             }
-            // something other than **
-            // non-magic patterns just have to match exactly
-            // patterns with magic have been turned into regexps.
-            let hit;
-            if (typeof p === "string") {
-              hit = f === p;
-              this.debug("string match", p, f, hit);
-            } else {
-              hit = p.test(f);
-              this.debug("pattern match", p, f, hit);
-            }
-            if (!hit) return false;
-          }
-          // Note: ending in / means that we'll get a final ""
-          // at the end of the pattern.  This can only match a
-          // corresponding "" at the end of the file.
-          // If the file ends in /, then it can only match a
-          // a pattern that ends in /, unless the pattern just
-          // doesn't have any more for it. But, a/b/ should *not*
-          // match "a/b/*", even though "" matches against the
-          // [^/]*? pattern, except in partial mode, where it might
-          // simply not be reached yet.
-          // However, a/b/ should still satisfy a/*
-          // now either we fell off the end of the pattern, or we're done.
-          if (fi === fl && pi === pl) {
-            // ran out of pattern and filename at the same time.
-            // an exact hit!
-            return true;
-          } else if (fi === fl) {
-            // ran out of file, but still had pattern left.
-            // this is ok if we're doing the match as part of
-            // a glob fs traversal.
-            return partial;
-          } else if (pi === pl) {
-            // ran out of pattern, still have file left.
-            // this is only acceptable if we're on the very last
-            // empty segment of a file with a trailing slash.
-            // a/* should match a/b/
-            return fi === fl - 1 && file[fi] === "";
-            /* c8 ignore start */
+          }
+          if (this.#merging) {
+            safeObjectAssign(this.#internals.cacheOptions, value);
           } else {
-            // should be unreachable.
-            throw new Error("wtf?");
-          }
-          /* c8 ignore stop */
-        }
-        braceExpand() {
-          return (0, exports.braceExpand)(this.pattern, this.options);
-        }
-        parse(pattern) {
-          assertValidPattern(pattern);
-          const options = this.options;
-          // shortcuts
-          if (pattern === "**") return exports.GLOBSTAR;
-          if (pattern === "") return "";
-          // far and away, the most common glob pattern parts are
-          // *, *.*, and *.  Add a fast check method for those.
-          let m;
-          let fastTest = null;
-          if ((m = pattern.match(starRE))) {
-            fastTest = options.dot ? starTestDot : starTest;
-          } else if ((m = pattern.match(starDotExtRE))) {
-            fastTest = (options.nocase
-              ? options.dot
-                ? starDotExtTestNocaseDot
-                : starDotExtTestNocase
-              : options.dot
-              ? starDotExtTestDot
-              : starDotExtTest)(m[1]);
-          } else if ((m = pattern.match(qmarksRE))) {
-            fastTest = (options.nocase
-              ? options.dot
-                ? qmarksTestNocaseDot
-                : qmarksTestNocase
-              : options.dot
-              ? qmarksTestDot
-              : qmarksTest)(m);
-          } else if ((m = pattern.match(starDotStarRE))) {
-            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
-          } else if ((m = pattern.match(dotStarRE))) {
-            fastTest = dotStarTest;
-          }
-          let re = "";
-          let hasMagic = false;
-          let escaping = false;
-          // ? => one single character
-          const patternListStack = [];
-          const negativeLists = [];
-          let stateChar = false;
-          let uflag = false;
-          let pl;
-          // . and .. never match anything that doesn't start with .,
-          // even when options.dot is set.  However, if the pattern
-          // starts with ., then traversal patterns can match.
-          let dotTravAllowed = pattern.charAt(0) === ".";
-          let dotFileAllowed = options.dot || dotTravAllowed;
-          const patternStart = () =>
-            dotTravAllowed
-              ? ""
-              : dotFileAllowed
-              ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))"
-              : "(?!\\.)";
-          const subPatternStart = (p) =>
-            p.charAt(0) === "."
-              ? ""
-              : options.dot
-              ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))"
-              : "(?!\\.)";
-          const clearStateChar = () => {
-            if (stateChar) {
-              // we had some state-tracking character
-              // that wasn't consumed by this pass.
-              switch (stateChar) {
-                case "*":
-                  re += star;
-                  hasMagic = true;
-                  break;
-                case "?":
-                  re += qmark;
-                  hasMagic = true;
-                  break;
-                default:
-                  re += "\\" + stateChar;
-                  break;
-              }
-              this.debug("clearStateChar %j %j", stateChar, re);
-              stateChar = false;
-            }
-          };
-          for (
-            let i = 0, c;
-            i < pattern.length && (c = pattern.charAt(i));
-            i++
-          ) {
-            this.debug("%s\t%s %s %j", pattern, i, re, c);
-            // skip over any that are escaped.
-            if (escaping) {
-              // completely not allowed, even escaped.
-              // should be impossible.
-              /* c8 ignore start */
-              if (c === "/") {
-                return false;
-              }
-              /* c8 ignore stop */
-              if (reSpecials[c]) {
-                re += "\\";
-              }
-              re += c;
-              escaping = false;
+            this.#internals.cacheOptions = { ...value };
+          }
+        }
+        /**
+    Options for the advanced HTTPS API.
+    */
+        get https() {
+          return this.#internals.https;
+        }
+        set https(value) {
+          options_assertPlainObject("https", value);
+          options_assertAny(
+            "https.rejectUnauthorized",
+            [distribution.boolean, distribution.undefined],
+            value.rejectUnauthorized,
+          );
+          options_assertAny(
+            "https.checkServerIdentity",
+            [distribution.function, distribution.undefined],
+            value.checkServerIdentity,
+          );
+          options_assertAny(
+            "https.serverName",
+            [distribution.string, distribution.undefined],
+            value.serverName,
+          );
+          options_assertAny(
+            "https.certificateAuthority",
+            [
+              distribution.string,
+              distribution.object,
+              distribution.array,
+              distribution.undefined,
+            ],
+            value.certificateAuthority,
+          );
+          options_assertAny(
+            "https.key",
+            [
+              distribution.string,
+              distribution.object,
+              distribution.array,
+              distribution.undefined,
+            ],
+            value.key,
+          );
+          options_assertAny(
+            "https.certificate",
+            [
+              distribution.string,
+              distribution.object,
+              distribution.array,
+              distribution.undefined,
+            ],
+            value.certificate,
+          );
+          options_assertAny(
+            "https.passphrase",
+            [distribution.string, distribution.undefined],
+            value.passphrase,
+          );
+          options_assertAny(
+            "https.pfx",
+            [
+              distribution.string,
+              distribution.buffer,
+              distribution.array,
+              distribution.undefined,
+            ],
+            value.pfx,
+          );
+          options_assertAny(
+            "https.alpnProtocols",
+            [distribution.array, distribution.undefined],
+            value.alpnProtocols,
+          );
+          options_assertAny(
+            "https.ciphers",
+            [distribution.string, distribution.undefined],
+            value.ciphers,
+          );
+          options_assertAny(
+            "https.dhparam",
+            [distribution.string, distribution.buffer, distribution.undefined],
+            value.dhparam,
+          );
+          options_assertAny(
+            "https.signatureAlgorithms",
+            [distribution.string, distribution.undefined],
+            value.signatureAlgorithms,
+          );
+          options_assertAny(
+            "https.minVersion",
+            [distribution.string, distribution.undefined],
+            value.minVersion,
+          );
+          options_assertAny(
+            "https.maxVersion",
+            [distribution.string, distribution.undefined],
+            value.maxVersion,
+          );
+          options_assertAny(
+            "https.honorCipherOrder",
+            [distribution.boolean, distribution.undefined],
+            value.honorCipherOrder,
+          );
+          options_assertAny(
+            "https.tlsSessionLifetime",
+            [distribution.number, distribution.undefined],
+            value.tlsSessionLifetime,
+          );
+          options_assertAny(
+            "https.ecdhCurve",
+            [distribution.string, distribution.undefined],
+            value.ecdhCurve,
+          );
+          options_assertAny(
+            "https.certificateRevocationLists",
+            [
+              distribution.string,
+              distribution.buffer,
+              distribution.array,
+              distribution.undefined,
+            ],
+            value.certificateRevocationLists,
+          );
+          options_assertAny(
+            "https.secureOptions",
+            [distribution.number, distribution.undefined],
+            value.secureOptions,
+          );
+          for (const key of Object.keys(value)) {
+            if (key === "__proto__") {
               continue;
             }
-            switch (c) {
-              // Should already be path-split by now.
-              /* c8 ignore start */
-              case "/": {
-                return false;
-              }
-              /* c8 ignore stop */
-              case "\\":
-                clearStateChar();
-                escaping = true;
-                continue;
-              // the various stateChar values
-              // for the "extglob" stuff.
-              case "?":
-              case "*":
-              case "+":
-              case "@":
-              case "!":
-                this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c);
-                // if we already have a stateChar, then it means
-                // that there was something like ** or +? in there.
-                // Handle the stateChar, then proceed with this one.
-                this.debug("call clearStateChar %j", stateChar);
-                clearStateChar();
-                stateChar = c;
-                // if extglob is disabled, then +(asdf|foo) isn't a thing.
-                // just clear the statechar *now*, rather than even diving into
-                // the patternList stuff.
-                if (options.noext) clearStateChar();
-                continue;
-              case "(": {
-                if (!stateChar) {
-                  re += "\\(";
-                  continue;
-                }
-                const plEntry = {
-                  type: stateChar,
-                  start: i - 1,
-                  reStart: re.length,
-                  open: plTypes[stateChar].open,
-                  close: plTypes[stateChar].close,
-                };
-                this.debug(this.pattern, "\t", plEntry);
-                patternListStack.push(plEntry);
-                // negation is (?:(?!(?:js)(?:))[^/]*)
-                re += plEntry.open;
-                // next entry starts with a dot maybe?
-                if (plEntry.start === 0 && plEntry.type !== "!") {
-                  dotTravAllowed = true;
-                  re += subPatternStart(pattern.slice(i + 1));
-                }
-                this.debug("plType %j %j", stateChar, re);
-                stateChar = false;
-                continue;
-              }
-              case ")": {
-                const plEntry = patternListStack[patternListStack.length - 1];
-                if (!plEntry) {
-                  re += "\\)";
-                  continue;
-                }
-                patternListStack.pop();
-                // closing an extglob
-                clearStateChar();
-                hasMagic = true;
-                pl = plEntry;
-                // negation is (?:(?!js)[^/]*)
-                // The others are (?:)
-                re += pl.close;
-                if (pl.type === "!") {
-                  negativeLists.push(Object.assign(pl, { reEnd: re.length }));
-                }
-                continue;
-              }
-              case "|": {
-                const plEntry = patternListStack[patternListStack.length - 1];
-                if (!plEntry) {
-                  re += "\\|";
-                  continue;
-                }
-                clearStateChar();
-                re += "|";
-                // next subpattern can start with a dot?
-                if (plEntry.start === 0 && plEntry.type !== "!") {
-                  dotTravAllowed = true;
-                  re += subPatternStart(pattern.slice(i + 1));
-                }
-                continue;
-              }
-              // these are mostly the same in regexp and glob
-              case "[":
-                // swallow any state-tracking char before the [
-                clearStateChar();
-                const [src, needUflag, consumed, magic] = (0,
-                brace_expressions_js_1.parseClass)(pattern, i);
-                if (consumed) {
-                  re += src;
-                  uflag = uflag || needUflag;
-                  i += consumed - 1;
-                  hasMagic = hasMagic || magic;
-                } else {
-                  re += "\\[";
-                }
-                continue;
-              case "]":
-                re += "\\" + c;
-                continue;
-              default:
-                // swallow any state char that wasn't consumed
-                clearStateChar();
-                re += regExpEscape(c);
-                break;
-            } // switch
-          } // for
-          // handle the case where we had a +( thing at the *end*
-          // of the pattern.
-          // each pattern list stack adds 3 chars, and we need to go through
-          // and escape any | chars that were passed through as-is for the regexp.
-          // Go through and escape them, taking care not to double-escape any
-          // | chars that were already escaped.
-          for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
-            let tail;
-            tail = re.slice(pl.reStart + pl.open.length);
-            this.debug(this.pattern, "setting tail", re, pl);
-            // maybe some even number of \, then maybe 1 \, followed by a |
-            tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => {
-              if (!$2) {
-                // the | isn't already escaped, so escape it.
-                $2 = "\\";
-                // should already be done
-                /* c8 ignore start */
-              }
-              /* c8 ignore stop */
-              // need to escape all those slashes *again*, without escaping the
-              // one that we need for escaping the | character.  As it works out,
-              // escaping an even number of slashes can be done by simply repeating
-              // it exactly after itself.  That's why this trick works.
-              //
-              // I am sorry that you have to see this.
-              return $1 + $1 + $2 + "|";
-            });
-            this.debug("tail=%j\n   %s", tail, tail, pl, re);
-            const t =
-              pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
-            hasMagic = true;
-            re = re.slice(0, pl.reStart) + t + "\\(" + tail;
-          }
-          // handle trailing things that only matter at the very end.
-          clearStateChar();
-          if (escaping) {
-            // trailing \\
-            re += "\\\\";
-          }
-          // only need to apply the nodot start if the re starts with
-          // something that could conceivably capture a dot
-          const addPatternStart = addPatternStartSet[re.charAt(0)];
-          // Hack to work around lack of negative lookbehind in JS
-          // A pattern like: *.!(x).!(y|z) needs to ensure that a name
-          // like 'a.xyz.yz' doesn't match.  So, the first negative
-          // lookahead, has to look ALL the way ahead, to the end of
-          // the pattern.
-          for (let n = negativeLists.length - 1; n > -1; n--) {
-            const nl = negativeLists[n];
-            const nlBefore = re.slice(0, nl.reStart);
-            const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
-            let nlAfter = re.slice(nl.reEnd);
-            const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
-            // Handle nested stuff like *(*.js|!(*.json)), where open parens
-            // mean that we should *not* include the ) in the bit that is considered
-            // "after" the negated section.
-            const closeParensBefore = nlBefore.split(")").length;
-            const openParensBefore =
-              nlBefore.split("(").length - closeParensBefore;
-            let cleanAfter = nlAfter;
-            for (let i = 0; i < openParensBefore; i++) {
-              cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
-            }
-            nlAfter = cleanAfter;
-            const dollar = nlAfter === "" ? "(?:$|\\/)" : "";
-            re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
-          }
-          // if the re is not "" at this point, then we need to make sure
-          // it doesn't match against an empty path part.
-          // Otherwise a/* will match a/, which it should not.
-          if (re !== "" && hasMagic) {
-            re = "(?=.)" + re;
-          }
-          if (addPatternStart) {
-            re = patternStart() + re;
-          }
-          // if it's nocase, and the lcase/uppercase don't match, it's magic
-          if (options.nocase && !hasMagic && !options.nocaseMagicOnly) {
-            hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
-          }
-          // skip the regexp for non-magical patterns
-          // unescape anything in it, though, so that it'll be
-          // an exact match against a file etc.
-          if (!hasMagic) {
-            return globUnescape(re);
-          }
-          const flags = (options.nocase ? "i" : "") + (uflag ? "u" : "");
-          try {
-            const ext = fastTest
-              ? {
-                  _glob: pattern,
-                  _src: re,
-                  test: fastTest,
-                }
-              : {
-                  _glob: pattern,
-                  _src: re,
-                };
-            return Object.assign(new RegExp("^" + re + "$", flags), ext);
-            /* c8 ignore start */
-          } catch (er) {
-            // should be impossible
-            // If it was an invalid regular expression, then it can't match
-            // anything.  This trick looks for a character after the end of
-            // the string, which is of course impossible, except in multi-line
-            // mode, but it's not a /m regex.
-            this.debug("invalid regexp", er);
-            return new RegExp("$.");
-          }
-          /* c8 ignore stop */
-        }
-        makeRe() {
-          if (this.regexp || this.regexp === false) return this.regexp;
-          // at this point, this.set is a 2d array of partial
-          // pattern strings, or "**".
-          //
-          // It's better to use .match().  This function shouldn't
-          // be used, really, but it's pretty convenient sometimes,
-          // when you just want to work with a regex.
-          const set = this.set;
-          if (!set.length) {
-            this.regexp = false;
-            return this.regexp;
-          }
-          const options = this.options;
-          const twoStar = options.noglobstar
-            ? star
-            : options.dot
-            ? twoStarDot
-            : twoStarNoDot;
-          const flags = options.nocase ? "i" : "";
-          // regexpify non-globstar patterns
-          // if ** is only item, then we just do one twoStar
-          // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
-          // if ** is last, append (\/twoStar|) to previous
-          // if ** is in the middle, append (\/|\/twoStar\/) to previous
-          // then filter out GLOBSTAR symbols
-          let re = set
-            .map((pattern) => {
-              const pp = pattern.map((p) =>
-                typeof p === "string"
-                  ? regExpEscape(p)
-                  : p === exports.GLOBSTAR
-                  ? exports.GLOBSTAR
-                  : p._src
-              );
-              pp.forEach((p, i) => {
-                const next = pp[i + 1];
-                const prev = pp[i - 1];
-                if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
-                  return;
-                }
-                if (prev === undefined) {
-                  if (next !== undefined && next !== exports.GLOBSTAR) {
-                    pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
-                  } else {
-                    pp[i] = twoStar;
-                  }
-                } else if (next === undefined) {
-                  pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
-                } else if (next !== exports.GLOBSTAR) {
-                  pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
-                  pp[i + 1] = exports.GLOBSTAR;
-                }
-              });
-              return pp.filter((p) => p !== exports.GLOBSTAR).join("/");
-            })
-            .join("|");
-          // must match entire pattern
-          // ending in a * or ** will make it less strict.
-          re = "^(?:" + re + ")$";
-          // can match anything, as long as it's not this.
-          if (this.negate) re = "^(?!" + re + ").*$";
-          try {
-            this.regexp = new RegExp(re, flags);
-            /* c8 ignore start */
-          } catch (ex) {
-            // should be impossible
-            this.regexp = false;
-          }
-          /* c8 ignore stop */
-          return this.regexp;
-        }
-        slashSplit(p) {
-          // if p starts with // on windows, we preserve that
-          // so that UNC paths aren't broken.  Otherwise, any number of
-          // / characters are coalesced into one, unless
-          // preserveMultipleSlashes is set to true.
-          if (this.preserveMultipleSlashes) {
-            return p.split("/");
-          } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
-            // add an extra '' for the one we lose
-            return ["", ...p.split(/\/+/)];
+            if (!(key in this.#internals.https)) {
+              throw new Error(`HTTPS option \`${key}\` does not exist`);
+            }
+          }
+          if (this.#merging) {
+            safeObjectAssign(this.#internals.https, value);
           } else {
-            return p.split(/\/+/);
+            this.#internals.https = { ...value };
           }
         }
-        match(f, partial = this.partial) {
-          this.debug("match", f, this.pattern);
-          // short-circuit in the case of busted things.
-          // comments, etc.
-          if (this.comment) {
-            return false;
-          }
-          if (this.empty) {
-            return f === "";
-          }
-          if (f === "/" && partial) {
-            return true;
-          }
-          const options = this.options;
-          // windows: need to use /, not \
-          if (this.isWindows) {
-            f = f.split("\\").join("/");
-          }
-          // treat the test path as a set of pathparts.
-          const ff = this.slashSplit(f);
-          this.debug(this.pattern, "split", ff);
-          // just ONE of the pattern sets in this.set needs to match
-          // in order for it to be valid.  If negating, then just one
-          // match means that we have failed.
-          // Either way, return on the first hit.
-          const set = this.set;
-          this.debug(this.pattern, "set", set);
-          // Find the basename of the path by looking for the last non-empty segment
-          let filename = ff[ff.length - 1];
-          if (!filename) {
-            for (let i = ff.length - 2; !filename && i >= 0; i--) {
-              filename = ff[i];
-            }
-          }
-          for (let i = 0; i < set.length; i++) {
-            const pattern = set[i];
-            let file = ff;
-            if (options.matchBase && pattern.length === 1) {
-              file = [filename];
-            }
-            const hit = this.matchOne(file, pattern, partial);
-            if (hit) {
-              if (options.flipNegate) {
-                return true;
-              }
-              return !this.negate;
-            }
-          }
-          // didn't get any hits.  this is success if it's a negative
-          // pattern, failure otherwise.
-          if (options.flipNegate) {
-            return false;
+        /**
+    [Encoding](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) to be used on `setEncoding` of the response data.
+
+    To get a [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), you need to set `responseType` to `buffer` instead.
+    Don't set this option to `null`.
+
+    __Note__: This doesn't affect streams! Instead, you need to do `got.stream(...).setEncoding(encoding)`.
+
+    @default 'utf-8'
+    */
+        get encoding() {
+          return this.#internals.encoding;
+        }
+        set encoding(value) {
+          if (value === null) {
+            throw new TypeError(
+              "To get a Uint8Array, set `options.responseType` to `buffer` instead",
+            );
           }
-          return this.negate;
+          options_assertAny(
+            "encoding",
+            [distribution.string, distribution.undefined],
+            value,
+          );
+          this.#internals.encoding = value;
         }
-        static defaults(def) {
-          return exports.minimatch.defaults(def).Minimatch;
+        /**
+    When set to `true` the promise will return the Response body instead of the Response object.
+
+    @default false
+    */
+        get resolveBodyOnly() {
+          return this.#internals.resolveBodyOnly;
         }
-      }
-      exports.Minimatch = Minimatch;
-      /* c8 ignore start */
-      var escape_js_2 = __nccwpck_require__(1477);
-      Object.defineProperty(exports, "escape", {
-        enumerable: true,
-        get: function () {
-          return escape_js_2.escape;
-        },
-      });
-      var unescape_js_2 = __nccwpck_require__(9820);
-      Object.defineProperty(exports, "unescape", {
-        enumerable: true,
-        get: function () {
-          return unescape_js_2.unescape;
-        },
-      });
-      /* c8 ignore stop */
-      exports.minimatch.Minimatch = Minimatch;
-      exports.minimatch.escape = escape_js_1.escape;
-      exports.minimatch.unescape = unescape_js_1.unescape;
-      //# sourceMappingURL=index.js.map
+        set resolveBodyOnly(value) {
+          assert.boolean(value);
+          this.#internals.resolveBodyOnly = value;
+        }
+        /**
+    Returns a `Stream` instead of a `Promise`.
+    Set internally by `got.stream()`.
 
-      /***/
-    },
+    @default false
+    @internal
+    */
+        get isStream() {
+          return this.#internals.isStream;
+        }
+        set isStream(value) {
+          assert.boolean(value);
+          this.#internals.isStream = value;
+        }
+        /**
+    The parsing method.
 
-    /***/ 9820: /***/ (__unused_webpack_module, exports) => {
-      "use strict";
+    The promise also has `.text()`, `.json()` and `.buffer()` methods which return another Got promise for the parsed body.
 
-      Object.defineProperty(exports, "__esModule", { value: true });
-      exports.unescape = void 0;
-      /**
-       * Un-escape a string that has been escaped with {@link escape}.
-       *
-       * If the {@link windowsPathsNoEscape} option is used, then square-brace
-       * escapes are removed, but not backslash escapes.  For example, it will turn
-       * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
-       * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
-       *
-       * When `windowsPathsNoEscape` is not set, then both brace escapes and
-       * backslash escapes are removed.
-       *
-       * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
-       * or unescaped.
-       */
-      const unescape = (s, { windowsPathsNoEscape = false } = {}) => {
-        return windowsPathsNoEscape
-          ? s.replace(/\[([^\/\\])\]/g, "$1")
-          : s
-              .replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2")
-              .replace(/\\([^\/])/g, "$1");
-      };
-      exports.unescape = unescape;
-      //# sourceMappingURL=unescape.js.map
+    It's like setting the options to `{responseType: 'json', resolveBodyOnly: true}` but without affecting the main Got promise.
 
-      /***/
-    },
+    __Note__: When using streams, this option is ignored.
 
-    /***/ 9569: /***/ function (
-      __unused_webpack_module,
-      exports,
-      __nccwpck_require__
-    ) {
-      "use strict";
+    @example
+    ```
+    const responsePromise = got(url);
+    const bufferPromise = responsePromise.buffer();
+    const jsonPromise = responsePromise.json();
 
-      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 __importDefault =
-        (this && this.__importDefault) ||
-        function (mod) {
-          return mod && mod.__esModule ? mod : { default: mod };
-        };
-      Object.defineProperty(exports, "__esModule", { value: true });
-      exports.PathScurry = exports.Path = exports.PathScurryDarwin = exports.PathScurryPosix = exports.PathScurryWin32 = exports.PathScurryBase = exports.PathPosix = exports.PathWin32 = exports.PathBase = exports.ChildrenCache = exports.ResolveCache = void 0;
-      const lru_cache_1 = __importDefault(__nccwpck_require__(758));
-      const path_1 = __nccwpck_require__(1017);
-      const url_1 = __nccwpck_require__(7310);
-      const actualFS = __importStar(__nccwpck_require__(7147));
-      const fs_1 = __nccwpck_require__(7147);
-      const realpathSync = fs_1.realpathSync.native;
-      // TODO: test perf of fs/promises realpath vs realpathCB,
-      // since the promises one uses realpath.native
-      const promises_1 = __nccwpck_require__(3292);
-      const minipass_1 = __importDefault(__nccwpck_require__(1077));
-      const defaultFS = {
-        lstatSync: fs_1.lstatSync,
-        readdir: fs_1.readdir,
-        readdirSync: fs_1.readdirSync,
-        readlinkSync: fs_1.readlinkSync,
-        realpathSync,
-        promises: {
-          lstat: promises_1.lstat,
-          readdir: promises_1.readdir,
-          readlink: promises_1.readlink,
-          realpath: promises_1.realpath,
-        },
-      };
-      // if they just gave us require('fs') then use our default
-      const fsFromOption = (fsOption) =>
-        !fsOption || fsOption === defaultFS || fsOption === actualFS
-          ? defaultFS
-          : {
-              ...defaultFS,
-              ...fsOption,
-              promises: {
-                ...defaultFS.promises,
-                ...(fsOption.promises || {}),
-              },
-            };
-      // turn something like //?/c:/ into c:\
-      const uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i;
-      const uncToDrive = (rootPath) =>
-        rootPath.replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
-      // windows paths are separated by either / or \
-      const eitherSep = /[\\\/]/;
-      const UNKNOWN = 0; // may not even exist, for all we know
-      const IFIFO = 0b0001;
-      const IFCHR = 0b0010;
-      const IFDIR = 0b0100;
-      const IFBLK = 0b0110;
-      const IFREG = 0b1000;
-      const IFLNK = 0b1010;
-      const IFSOCK = 0b1100;
-      const IFMT = 0b1111;
-      // mask to unset low 4 bits
-      const IFMT_UNKNOWN = ~IFMT;
-      // set after successfully calling readdir() and getting entries.
-      const READDIR_CALLED = 16;
-      // set after a successful lstat()
-      const LSTAT_CALLED = 32;
-      // set if an entry (or one of its parents) is definitely not a dir
-      const ENOTDIR = 64;
-      // set if an entry (or one of its parents) does not exist
-      // (can also be set on lstat errors like EACCES or ENAMETOOLONG)
-      const ENOENT = 128;
-      // cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
-      // set if we fail to readlink
-      const ENOREADLINK = 256;
-      // set if we know realpath() will fail
-      const ENOREALPATH = 512;
-      const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
-      const TYPEMASK = 1023;
-      const entToType = (s) =>
-        s.isFile()
-          ? IFREG
-          : s.isDirectory()
-          ? IFDIR
-          : s.isSymbolicLink()
-          ? IFLNK
-          : s.isCharacterDevice()
-          ? IFCHR
-          : s.isBlockDevice()
-          ? IFBLK
-          : s.isSocket()
-          ? IFSOCK
-          : s.isFIFO()
-          ? IFIFO
-          : UNKNOWN;
-      // normalize unicode path names
-      const normalizeCache = new Map();
-      const normalize = (s) => {
-        const c = normalizeCache.get(s);
-        if (c) return c;
-        const n = s.normalize("NFKD");
-        normalizeCache.set(s, n);
-        return n;
-      };
-      const normalizeNocaseCache = new Map();
-      const normalizeNocase = (s) => {
-        const c = normalizeNocaseCache.get(s);
-        if (c) return c;
-        const n = normalize(s.toLowerCase());
-        normalizeNocaseCache.set(s, n);
-        return n;
-      };
-      /**
-       * An LRUCache for storing resolved path strings or Path objects.
-       * @internal
-       */
-      class ResolveCache extends lru_cache_1.default {
-        constructor() {
-          super({ max: 256 });
-        }
-      }
-      exports.ResolveCache = ResolveCache;
-      // In order to prevent blowing out the js heap by allocating hundreds of
-      // thousands of Path entries when walking extremely large trees, the "children"
-      // in this tree are represented by storing an array of Path entries in an
-      // LRUCache, indexed by the parent.  At any time, Path.children() may return an
-      // empty array, indicating that it doesn't know about any of its children, and
-      // thus has to rebuild that cache.  This is fine, it just means that we don't
-      // benefit as much from having the cached entries, but huge directory walks
-      // don't blow out the stack, and smaller ones are still as fast as possible.
-      //
-      //It does impose some complexity when building up the readdir data, because we
-      //need to pass a reference to the children array that we started with.
-      /**
-       * an LRUCache for storing child entries.
-       * @internal
-       */
-      class ChildrenCache extends lru_cache_1.default {
-        constructor(maxSize = 16 * 1024) {
-          super({
-            maxSize,
-            // parent + children
-            sizeCalculation: (a) => a.length + 1,
-          });
+    const [response, buffer, json] = Promise.all([responsePromise, bufferPromise, jsonPromise]);
+    // `response` is an instance of Got Response
+    // `buffer` is an instance of Uint8Array
+    // `json` is an object
+    ```
+
+    @example
+    ```
+    // This
+    const body = await got(url).json();
+
+    // is semantically the same as this
+    const body = await got(url, {responseType: 'json', resolveBodyOnly: true});
+    ```
+    */
+        get responseType() {
+          return this.#internals.responseType;
         }
-      }
-      exports.ChildrenCache = ChildrenCache;
-      /**
-       * Path objects are sort of like a super-powered
-       * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
-       *
-       * Each one represents a single filesystem entry on disk, which may or may not
-       * exist. It includes methods for reading various types of information via
-       * lstat, readlink, and readdir, and caches all information to the greatest
-       * degree possible.
-       *
-       * Note that fs operations that would normally throw will instead return an
-       * "empty" value. This is in order to prevent excessive overhead from error
-       * stack traces.
-       */
-      class PathBase {
-        /**
-         * the basename of this path
-         *
-         * **Important**: *always* test the path name against any test string
-         * usingthe {@link isNamed} method, and not by directly comparing this
-         * string. Otherwise, unicode path strings that the system sees as identical
-         * will not be properly treated as the same path, leading to incorrect
-         * behavior and possible security issues.
-         */
-        name;
-        /**
-         * the Path entry corresponding to the path root.
-         *
-         * @internal
-         */
-        root;
-        /**
-         * All roots found within the current PathScurry family
-         *
-         * @internal
-         */
-        roots;
-        /**
-         * a reference to the parent path, or undefined in the case of root entries
-         *
-         * @internal
-         */
-        parent;
-        /**
-         * boolean indicating whether paths are compared case-insensitively
-         * @internal
-         */
-        nocase;
-        // potential default fs override
-        #fs;
-        // Stats fields
-        #dev;
-        get dev() {
-          return this.#dev;
-        }
-        #mode;
-        get mode() {
-          return this.#mode;
+        set responseType(value) {
+          if (value === undefined) {
+            this.#internals.responseType = "text";
+            return;
+          }
+          if (value !== "text" && value !== "buffer" && value !== "json") {
+            throw new Error(`Invalid \`responseType\` option: ${value}`);
+          }
+          this.#internals.responseType = value;
         }
-        #nlink;
-        get nlink() {
-          return this.#nlink;
+        get pagination() {
+          return this.#internals.pagination;
         }
-        #uid;
-        get uid() {
-          return this.#uid;
+        set pagination(value) {
+          assert.object(value);
+          if (this.#merging) {
+            safeObjectAssign(this.#internals.pagination, value);
+          } else {
+            this.#internals.pagination = value;
+          }
         }
-        #gid;
-        get gid() {
-          return this.#gid;
+        get auth() {
+          throw new Error(
+            "Parameter `auth` is deprecated. Use `username` / `password` instead.",
+          );
         }
-        #rdev;
-        get rdev() {
-          return this.#rdev;
+        set auth(_value) {
+          throw new Error(
+            "Parameter `auth` is deprecated. Use `username` / `password` instead.",
+          );
         }
-        #blksize;
-        get blksize() {
-          return this.#blksize;
+        get setHost() {
+          return this.#internals.setHost;
         }
-        #ino;
-        get ino() {
-          return this.#ino;
+        set setHost(value) {
+          assert.boolean(value);
+          this.#internals.setHost = value;
         }
-        #size;
-        get size() {
-          return this.#size;
-        }
-        #blocks;
-        get blocks() {
-          return this.#blocks;
-        }
-        #atimeMs;
-        get atimeMs() {
-          return this.#atimeMs;
-        }
-        #mtimeMs;
-        get mtimeMs() {
-          return this.#mtimeMs;
-        }
-        #ctimeMs;
-        get ctimeMs() {
-          return this.#ctimeMs;
-        }
-        #birthtimeMs;
-        get birthtimeMs() {
-          return this.#birthtimeMs;
-        }
-        #atime;
-        get atime() {
-          return this.#atime;
-        }
-        #mtime;
-        get mtime() {
-          return this.#mtime;
-        }
-        #ctime;
-        get ctime() {
-          return this.#ctime;
-        }
-        #birthtime;
-        get birthtime() {
-          return this.#birthtime;
-        }
-        #matchName;
-        #depth;
-        #fullpath;
-        #relative;
-        #type;
-        #children;
-        #linkTarget;
-        #realpath;
-        /**
-         * Do not create new Path objects directly.  They should always be accessed
-         * via the PathScurry class or other methods on the Path class.
-         *
-         * @internal
-         */
-        constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-          this.name = name;
-          this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
-          this.#type = type & TYPEMASK;
-          this.nocase = nocase;
-          this.roots = roots;
-          this.root = root || this;
-          this.#children = children;
-          this.#fullpath = opts.fullpath;
-          this.#relative = opts.relative;
-          this.parent = opts.parent;
-          if (this.parent) {
-            this.#fs = this.parent.#fs;
-          } else {
-            this.#fs = fsFromOption(opts.fs);
-          }
+        get maxHeaderSize() {
+          return this.#internals.maxHeaderSize;
         }
-        /**
-         * Returns the depth of the Path object from its root.
-         *
-         * For example, a path at `/foo/bar` would have a depth of 2.
-         */
-        depth() {
-          if (this.#depth !== undefined) return this.#depth;
-          if (!this.parent) return (this.#depth = 0);
-          return (this.#depth = this.parent.depth() + 1);
+        set maxHeaderSize(value) {
+          options_assertAny(
+            "maxHeaderSize",
+            [distribution.number, distribution.undefined],
+            value,
+          );
+          this.#internals.maxHeaderSize = value;
         }
-        /**
-         * @internal
-         */
-        childrenCache() {
-          return this.#children;
+        get enableUnixSockets() {
+          return this.#internals.enableUnixSockets;
+        }
+        set enableUnixSockets(value) {
+          assert.boolean(value);
+          this.#internals.enableUnixSockets = value;
         }
         /**
-         * Get the Path object referenced by the string path, resolved from this Path
-         */
-        resolve(path) {
-          if (!path) {
-            return this;
-          }
-          const rootPath = this.getRootString(path);
-          const dir = path.substring(rootPath.length);
-          const dirParts = dir.split(this.splitSep);
-          const result = rootPath
-            ? this.getRoot(rootPath).#resolveParts(dirParts)
-            : this.#resolveParts(dirParts);
-          return result;
+    Throw an error if the server response's `content-length` header value doesn't match the number of bytes received.
+
+    This is useful for detecting truncated responses and follows RFC 9112 requirements for message completeness.
+
+    __Note__: Responses without a `content-length` header are not validated.
+    __Note__: When enabled and validation fails, a `ReadError` with code `ERR_HTTP_CONTENT_LENGTH_MISMATCH` will be thrown.
+
+    @default true
+    */
+        get strictContentLength() {
+          return this.#internals.strictContentLength;
         }
-        #resolveParts(dirParts) {
-          let p = this;
-          for (const part of dirParts) {
-            p = p.child(part);
-          }
-          return p;
+        set strictContentLength(value) {
+          assert.boolean(value);
+          this.#internals.strictContentLength = value;
         }
-        /**
-         * Returns the cached children Path objects, if still available.  If they
-         * have fallen out of the cache, then returns an empty array, and resets the
-         * READDIR_CALLED bit, so that future calls to readdir() will require an fs
-         * lookup.
-         *
-         * @internal
-         */
-        children() {
-          const cached = this.#children.get(this);
-          if (cached) {
-            return cached;
-          }
-          const children = Object.assign([], { provisional: 0 });
-          this.#children.set(this, children);
-          this.#type &= ~READDIR_CALLED;
-          return children;
+        // eslint-disable-next-line @typescript-eslint/naming-convention
+        toJSON() {
+          return { ...this.#internals };
         }
-        /**
-         * Resolves a path portion and returns or creates the child Path.
-         *
-         * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
-         * `'..'`.
-         *
-         * This should not be called directly.  If `pathPart` contains any path
-         * separators, it will lead to unsafe undefined behavior.
-         *
-         * Use `Path.resolve()` instead.
-         *
-         * @internal
-         */
-        child(pathPart, opts) {
-          if (pathPart === "" || pathPart === ".") {
-            return this;
+        [Symbol.for("nodejs.util.inspect.custom")](_depth, options) {
+          return (0, external_node_util_.inspect)(this.#internals, options);
+        }
+        createNativeRequestOptions() {
+          const internals = this.#internals;
+          const url = internals.url;
+          let agent;
+          if (url.protocol === "https:") {
+            if (internals.http2) {
+              // Ensure HTTP/2 agent is configured for connection reuse
+              // If no custom agent.http2 is provided, use the global agent for connection pooling
+              agent = {
+                ...internals.agent,
+                http2: internals.agent.http2 ?? source.globalAgent,
+              };
+            } else {
+              agent = internals.agent.https;
+            }
+          } else {
+            agent = internals.agent.http;
+          }
+          const { https } = internals;
+          let { pfx } = https;
+          if (distribution.array(pfx) && distribution.plainObject(pfx[0])) {
+            pfx = pfx.map((object) => ({
+              buf: object.buffer,
+              passphrase: object.passphrase,
+            }));
+          }
+          const unixSocketPath = getUnixSocketPath(url);
+          if (usesUnixSocket(url) && !internals.enableUnixSockets) {
+            throw new Error(
+              "Using UNIX domain sockets but option `enableUnixSockets` is not enabled",
+            );
+          }
+          let unixSocketGroups;
+          if (unixSocketPath !== undefined) {
+            unixSocketGroups = /^(?[^:]+):(?.+)$/v.exec(
+              `${url.pathname}${url.search}`,
+            )?.groups;
           }
-          if (pathPart === "..") {
-            return this.parent || this;
-          }
-          // find the child
-          const children = this.children();
-          const name = this.nocase
-            ? normalizeNocase(pathPart)
-            : normalize(pathPart);
-          for (const p of children) {
-            if (p.#matchName === name) {
-              return p;
-            }
-          }
-          // didn't find it, create provisional child, since it might not
-          // actually exist.  If we know the parent isn't a dir, then
-          // in fact it CAN'T exist.
-          const s = this.parent ? this.sep : "";
-          const fullpath = this.#fullpath
-            ? this.#fullpath + s + pathPart
+          const unixOptions = unixSocketGroups
+            ? {
+                socketPath: unixSocketGroups.socketPath,
+                path: unixSocketGroups.path,
+                host: "",
+              }
             : undefined;
-          const pchild = this.newChild(pathPart, UNKNOWN, {
-            ...opts,
-            parent: this,
-            fullpath,
-          });
-          if (!this.canReaddir()) {
-            pchild.#type |= ENOENT;
+          return {
+            ...internals.cacheOptions,
+            ...unixOptions,
+            // HTTPS options
+            // eslint-disable-next-line @typescript-eslint/naming-convention
+            ALPNProtocols: https.alpnProtocols,
+            ca: https.certificateAuthority,
+            cert: https.certificate,
+            key: https.key,
+            passphrase: https.passphrase,
+            pfx,
+            rejectUnauthorized: https.rejectUnauthorized,
+            checkServerIdentity:
+              https.checkServerIdentity ??
+              external_node_tls_.checkServerIdentity,
+            servername: https.serverName,
+            ciphers: https.ciphers,
+            honorCipherOrder: https.honorCipherOrder,
+            minVersion: https.minVersion,
+            maxVersion: https.maxVersion,
+            sigalgs: https.signatureAlgorithms,
+            sessionTimeout: https.tlsSessionLifetime,
+            dhparam: https.dhparam,
+            ecdhCurve: https.ecdhCurve,
+            crl: https.certificateRevocationLists,
+            secureOptions: https.secureOptions,
+            // HTTP options
+            lookup: internals.dnsLookup ?? internals.dnsCache?.lookup,
+            family: internals.dnsLookupIpVersion,
+            agent,
+            setHost: internals.setHost,
+            method: internals.method,
+            maxHeaderSize: internals.maxHeaderSize,
+            localAddress: internals.localAddress,
+            headers: internals.headers,
+            createConnection: internals.createConnection,
+            timeout: internals.http2
+              ? getHttp2TimeoutOption(internals)
+              : undefined,
+            // HTTP/2 options
+            h2session: internals.h2session,
+          };
+        }
+        getRequestFunction() {
+          const { request: customRequest } = this.#internals;
+          if (!customRequest) {
+            return this.#getFallbackRequestFunction();
           }
-          // don't have to update provisional, because if we have real children,
-          // then provisional is set to children.length, otherwise a lower number
-          children.push(pchild);
-          return pchild;
+          const requestWithFallback = (url, options, callback) => {
+            const result = customRequest(url, options, callback);
+            if (distribution.promise(result)) {
+              return this.#resolveRequestWithFallback(
+                result,
+                url,
+                options,
+                callback,
+              );
+            }
+            if (result !== undefined) {
+              return result;
+            }
+            return this.#callFallbackRequest(url, options, callback);
+          };
+          return requestWithFallback;
+        }
+        freeze() {
+          const options = this.#internals;
+          Object.freeze(options);
+          Object.freeze(options.hooks);
+          Object.freeze(options.hooks.afterResponse);
+          Object.freeze(options.hooks.beforeError);
+          Object.freeze(options.hooks.beforeRedirect);
+          Object.freeze(options.hooks.beforeRequest);
+          Object.freeze(options.hooks.beforeRetry);
+          Object.freeze(options.hooks.init);
+          Object.freeze(options.https);
+          Object.freeze(options.cacheOptions);
+          Object.freeze(options.agent);
+          Object.freeze(options.headers);
+          Object.freeze(options.timeout);
+          Object.freeze(options.retry);
+          Object.freeze(options.retry.errorCodes);
+          Object.freeze(options.retry.methods);
+          Object.freeze(options.retry.statusCodes);
+        }
+        #createHeadersProxy() {
+          return new Proxy(this.#internals.headers, {
+            get(target, property, receiver) {
+              if (typeof property === "string") {
+                if (Reflect.has(target, property)) {
+                  return Reflect.get(target, property, receiver);
+                }
+                const normalizedProperty = property.toLowerCase();
+                return Reflect.get(target, normalizedProperty, receiver);
+              }
+              return Reflect.get(target, property, receiver);
+            },
+            set: (target, property, value) => {
+              if (typeof property === "string") {
+                const normalizedProperty = property.toLowerCase();
+                assertValidHeaderName(normalizedProperty);
+                const isSuccess = Reflect.set(
+                  target,
+                  normalizedProperty,
+                  value,
+                );
+                if (isSuccess) {
+                  markHeaderAsExplicit(
+                    this.#explicitHeaders,
+                    this.#trackedStateMutations,
+                    normalizedProperty,
+                  );
+                }
+                return isSuccess;
+              }
+              return Reflect.set(target, property, value);
+            },
+            deleteProperty: (target, property) => {
+              if (typeof property === "string") {
+                const normalizedProperty = property.toLowerCase();
+                const isSuccess = Reflect.deleteProperty(
+                  target,
+                  normalizedProperty,
+                );
+                if (isSuccess) {
+                  this.#explicitHeaders.delete(normalizedProperty);
+                  trackStateMutation(
+                    this.#trackedStateMutations,
+                    normalizedProperty,
+                  );
+                }
+                return isSuccess;
+              }
+              return Reflect.deleteProperty(target, property);
+            },
+          });
         }
-        /**
-         * The relative path from the cwd. If it does not share an ancestor with
-         * the cwd, then this ends up being equivalent to the fullpath()
-         */
-        // TODO: instead of taking a param here, set it to '' in the constructor
-        // for the CWD, and set it to this.name for any roots.
-        relative() {
-          if (this.#relative !== undefined) {
-            return this.#relative;
+        #getFallbackRequestFunction() {
+          const url = this.#internals.url;
+          if (!url) {
+            return;
           }
-          const name = this.name;
-          const p = this.parent;
-          if (!p) {
-            return (this.#relative = this.name);
+          if (url.protocol === "https:") {
+            if (this.#internals.http2) {
+              if (major < 15 || (major === 15 && minor < 10)) {
+                const error = new Error(
+                  "To use the `http2` option, install Node.js 15.10.0 or above",
+                );
+                error.code = "EUNSUPPORTED";
+                throw error;
+              }
+              return source.auto;
+            }
+            return external_node_https_namespaceObject.request;
           }
-          const pv = p.relative();
-          const rp = pv + (!pv || !p.parent ? "" : this.sep) + name;
-          return (this.#relative = rp);
+          return external_node_http_.request;
         }
-        /**
-         * The fully resolved path string for this Path entry
-         */
-        fullpath() {
-          if (this.#fullpath !== undefined) {
-            return this.#fullpath;
+        #callFallbackRequest(url, options, callback) {
+          const fallbackRequest = this.#getFallbackRequestFunction();
+          if (!fallbackRequest) {
+            throw new TypeError("The request function must return a value");
           }
-          const name = this.name;
-          const p = this.parent;
-          if (!p) {
-            return (this.#fullpath = this.name);
+          const fallbackResult = fallbackRequest(url, options, callback);
+          if (fallbackResult === undefined) {
+            throw new TypeError("The request function must return a value");
           }
-          const pv = p.fullpath();
-          const fp = pv + (!p.parent ? "" : this.sep) + name;
-          return (this.#fullpath = fp);
-        }
-        /**
-         * Is the Path of an unknown type?
-         *
-         * Note that we might know *something* about it if there has been a previous
-         * filesystem operation, for example that it does not exist, or is not a
-         * link, or whether it has child entries.
-         */
-        isUnknown() {
-          return (this.#type & IFMT) === UNKNOWN;
-        }
-        /**
-         * Is the Path a regular file?
-         */
-        isFile() {
-          return (this.#type & IFMT) === IFREG;
-        }
-        /**
-         * Is the Path a directory?
-         */
-        isDirectory() {
-          return (this.#type & IFMT) === IFDIR;
-        }
-        /**
-         * Is the path a character device?
-         */
-        isCharacterDevice() {
-          return (this.#type & IFMT) === IFCHR;
-        }
-        /**
-         * Is the path a block device?
-         */
-        isBlockDevice() {
-          return (this.#type & IFMT) === IFBLK;
+          if (distribution.promise(fallbackResult)) {
+            return this.#resolveFallbackRequestResult(fallbackResult);
+          }
+          return fallbackResult;
         }
-        /**
-         * Is the path a FIFO pipe?
-         */
-        isFIFO() {
-          return (this.#type & IFMT) === IFIFO;
+        async #resolveRequestWithFallback(
+          requestResult,
+          url,
+          options,
+          callback,
+        ) {
+          const result = await requestResult;
+          if (result !== undefined) {
+            return result;
+          }
+          return this.#callFallbackRequest(url, options, callback);
         }
-        /**
-         * Is the path a socket?
-         */
-        isSocket() {
-          return (this.#type & IFMT) === IFSOCK;
+        async #resolveFallbackRequestResult(fallbackResult) {
+          const resolvedFallbackResult = await fallbackResult;
+          if (resolvedFallbackResult === undefined) {
+            throw new TypeError("The request function must return a value");
+          }
+          return resolvedFallbackResult;
         }
-        /**
-         * Is the path a symbolic link?
-         */
-        isSymbolicLink() {
-          return (this.#type & IFLNK) === IFLNK;
+      }
+      const snapshotCrossOriginState = (options) => ({
+        headers: { ...options.getInternalHeaders() },
+        hadCookieJar: options.cookieJar !== undefined,
+        cookieWasExplicitlySet: options.isHeaderExplicitlySet("cookie"),
+        username: options.username,
+        password: options.password,
+        body: options.body,
+        json: options.json,
+        form: options.form,
+        bodySnapshot: cloneCrossOriginBodyValue(options.body),
+        jsonSnapshot: cloneCrossOriginBodyValue(options.json),
+        formSnapshot: cloneCrossOriginBodyValue(options.form),
+      });
+      const cloneCrossOriginBodyValue = (value) => {
+        if (
+          value === undefined ||
+          value === null ||
+          typeof value !== "object"
+        ) {
+          return value;
         }
-        /**
-         * Return the entry if it has been subject of a successful lstat, or
-         * undefined otherwise.
-         *
-         * Does not read the filesystem, so an undefined result *could* simply
-         * mean that we haven't called lstat on it.
-         */
-        lstatCached() {
-          return this.#type & LSTAT_CALLED ? this : undefined;
+        try {
+          return structuredClone(value);
+        } catch {
+          return undefined;
         }
-        /**
-         * Return the cached link target if the entry has been the subject of a
-         * successful readlink, or undefined otherwise.
-         *
-         * Does not read the filesystem, so an undefined result *could* just mean we
-         * don't have any cached data. Only use it if you are very sure that a
-         * readlink() has been called at some point.
-         */
-        readlinkCached() {
-          return this.#linkTarget;
+      };
+      const isUnchangedCrossOriginBodyValue = (
+        currentValue,
+        previousValue,
+        previousSnapshot,
+      ) => {
+        if (currentValue !== previousValue) {
+          return false;
         }
-        /**
-         * Returns the cached realpath target if the entry has been the subject
-         * of a successful realpath, or undefined otherwise.
-         *
-         * Does not read the filesystem, so an undefined result *could* just mean we
-         * don't have any cached data. Only use it if you are very sure that a
-         * realpath() has been called at some point.
-         */
-        realpathCached() {
-          return this.#realpath;
+        if (
+          currentValue === undefined ||
+          currentValue === null ||
+          typeof currentValue !== "object"
+        ) {
+          return true;
         }
-        /**
-         * Returns the cached child Path entries array if the entry has been the
-         * subject of a successful readdir(), or [] otherwise.
-         *
-         * Does not read the filesystem, so an empty array *could* just mean we
-         * don't have any cached data. Only use it if you are very sure that a
-         * readdir() has been called recently enough to still be valid.
-         */
-        readdirCached() {
-          const children = this.children();
-          return children.slice(0, children.provisional);
+        if (previousSnapshot === undefined) {
+          return true;
         }
-        /**
-         * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
-         * any indication that readlink will definitely fail.
-         *
-         * Returns false if the path is known to not be a symlink, if a previous
-         * readlink failed, or if the entry does not exist.
-         */
-        canReadlink() {
-          if (this.#linkTarget) return true;
-          if (!this.parent) return false;
-          // cases where it cannot possibly succeed
-          const ifmt = this.#type & IFMT;
-          return !(
-            (ifmt !== UNKNOWN && ifmt !== IFLNK) ||
-            this.#type & ENOREADLINK ||
-            this.#type & ENOENT
+        return (0, external_node_util_.isDeepStrictEqual)(
+          currentValue,
+          previousSnapshot,
+        );
+      };
+      const isCrossOriginCredentialChanged = (
+        previousUrl,
+        nextUrl,
+        credential,
+      ) =>
+        nextUrl[credential] !== "" &&
+        nextUrl[credential] !== previousUrl[credential];
+      const isBodyUnchanged = (options, previousState) =>
+        isUnchangedCrossOriginBodyValue(
+          options.body,
+          previousState.body,
+          previousState.bodySnapshot,
+        ) &&
+        isUnchangedCrossOriginBodyValue(
+          options.json,
+          previousState.json,
+          previousState.jsonSnapshot,
+        ) &&
+        isUnchangedCrossOriginBodyValue(
+          options.form,
+          previousState.form,
+          previousState.formSnapshot,
+        ); // CONCATENATED MODULE: ./node_modules/got/dist/source/core/response.js
+
+      const decodedBodyCache = new WeakMap();
+      // Intentionally uses TextDecoder so the UTF-8 path strips a leading BOM.
+      const textDecoder = new TextDecoder();
+      const isUtf8Encoding = (encoding) =>
+        encoding === undefined ||
+        encoding.toLowerCase().replace("-", "") === "utf8";
+      const decodeUint8Array = (data, encoding) => {
+        if (isUtf8Encoding(encoding)) {
+          return textDecoder.decode(data);
+        }
+        return external_node_buffer_.Buffer.from(data).toString(encoding);
+      };
+      const isResponseOk = (response) => {
+        const { statusCode } = response;
+        const { followRedirect } = response.request.options;
+        const shouldFollow =
+          typeof followRedirect === "function"
+            ? followRedirect(response)
+            : followRedirect;
+        const limitStatusCode = shouldFollow ? 299 : 399;
+        return (
+          (statusCode >= 200 && statusCode <= limitStatusCode) ||
+          statusCode === 304
+        );
+      };
+      /**
+An error to be thrown when server response code is 2xx, and parsing body fails.
+Includes a `response` property.
+*/
+      class ParseError extends RequestError {
+        name = "ParseError";
+        code = "ERR_BODY_PARSE_FAILURE";
+        constructor(error, response) {
+          const { options } = response.request;
+          super(
+            `${error.message} in "${stripUrlAuth(options.url)}"`,
+            error,
+            response.request,
           );
         }
-        /**
-         * Return true if readdir has previously been successfully called on this
-         * path, indicating that cachedReaddir() is likely valid.
-         */
-        calledReaddir() {
-          return !!(this.#type & READDIR_CALLED);
-        }
-        /**
-         * Returns true if the path is known to not exist. That is, a previous lstat
-         * or readdir failed to verify its existence when that would have been
-         * expected, or a parent entry was marked either enoent or enotdir.
-         */
-        isENOENT() {
-          return !!(this.#type & ENOENT);
-        }
-        /**
-         * Return true if the path is a match for the given path name.  This handles
-         * case sensitivity and unicode normalization.
-         *
-         * Note: even on case-sensitive systems, it is **not** safe to test the
-         * equality of the `.name` property to determine whether a given pathname
-         * matches, due to unicode normalization mismatches.
-         *
-         * Always use this method instead of testing the `path.name` property
-         * directly.
-         */
-        isNamed(n) {
-          return !this.nocase
-            ? this.#matchName === normalize(n)
-            : this.#matchName === normalizeNocase(n);
-        }
-        /**
-         * Return the Path object corresponding to the target of a symbolic link.
-         *
-         * If the Path is not a symbolic link, or if the readlink call fails for any
-         * reason, `undefined` is returned.
-         *
-         * Result is cached, and thus may be outdated if the filesystem is mutated.
-         */
-        async readlink() {
-          const target = this.#linkTarget;
-          if (target) {
-            return target;
-          }
-          if (!this.canReadlink()) {
-            return undefined;
-          }
-          /* c8 ignore start */
-          // already covered by the canReadlink test, here for ts grumples
-          if (!this.parent) {
-            return undefined;
-          }
-          /* c8 ignore stop */
-          try {
-            const read = await this.#fs.promises.readlink(this.fullpath());
-            const linkTarget = this.parent.resolve(read);
-            if (linkTarget) {
-              return (this.#linkTarget = linkTarget);
+      }
+      const cacheDecodedBody = (response, decodedBody) => {
+        decodedBodyCache.set(response, decodedBody);
+      };
+      const parseBody = (response, responseType, parseJson, encoding) => {
+        const { rawBody } = response;
+        const cachedDecodedBody = decodedBodyCache.get(response);
+        try {
+          if (responseType === "text") {
+            if (cachedDecodedBody !== undefined) {
+              return cachedDecodedBody;
             }
-          } catch (er) {
-            this.#readlinkFail(er.code);
-            return undefined;
+            return decodeUint8Array(rawBody, encoding);
           }
-        }
-        /**
-         * Synchronous {@link PathBase.readlink}
-         */
-        readlinkSync() {
-          const target = this.#linkTarget;
-          if (target) {
-            return target;
+          if (responseType === "json") {
+            if (rawBody.length === 0) {
+              return "";
+            }
+            const text =
+              cachedDecodedBody ?? decodeUint8Array(rawBody, encoding);
+            return parseJson(text);
           }
-          if (!this.canReadlink()) {
-            return undefined;
+          if (responseType === "buffer") {
+            return rawBody;
           }
-          /* c8 ignore start */
-          // already covered by the canReadlink test, here for ts grumples
-          if (!this.parent) {
-            return undefined;
+        } catch (error) {
+          throw new ParseError(error, response);
+        }
+        throw new ParseError(
+          {
+            message: `Unknown body type '${responseType}'`,
+            name: "Error",
+          },
+          response,
+        );
+      }; // CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/is-client-request.js
+
+      function isClientRequest(clientRequest) {
+        return clientRequest.writable && !clientRequest.writableEnded;
+      }
+      /* harmony default export */ const is_client_request = isClientRequest;
+
+      // EXTERNAL MODULE: external "node:diagnostics_channel"
+      var external_node_diagnostics_channel_ = __nccwpck_require__(3053); // CONCATENATED MODULE: ./node_modules/got/dist/source/core/diagnostics-channel.js
+      const channels = {
+        requestCreate:
+          external_node_diagnostics_channel_.channel("got:request:create"),
+        requestStart:
+          external_node_diagnostics_channel_.channel("got:request:start"),
+        responseStart:
+          external_node_diagnostics_channel_.channel("got:response:start"),
+        responseEnd:
+          external_node_diagnostics_channel_.channel("got:response:end"),
+        retry: external_node_diagnostics_channel_.channel("got:request:retry"),
+        error: external_node_diagnostics_channel_.channel("got:request:error"),
+        redirect: external_node_diagnostics_channel_.channel(
+          "got:response:redirect",
+        ),
+      };
+      function generateRequestId() {
+        return (0, external_node_crypto_.randomUUID)();
+      }
+      const publishToChannel = (channel, message) => {
+        if (channel.hasSubscribers) {
+          channel.publish(message);
+        }
+      };
+      function publishRequestCreate(message) {
+        publishToChannel(channels.requestCreate, message);
+      }
+      function publishRequestStart(message) {
+        publishToChannel(channels.requestStart, message);
+      }
+      function publishResponseStart(message) {
+        publishToChannel(channels.responseStart, message);
+      }
+      function publishResponseEnd(message) {
+        publishToChannel(channels.responseEnd, message);
+      }
+      function publishRetry(message) {
+        publishToChannel(channels.retry, message);
+      }
+      function publishError(message) {
+        publishToChannel(channels.error, message);
+      }
+      function publishRedirect(message) {
+        publishToChannel(channels.redirect, message);
+      } // CONCATENATED MODULE: ./node_modules/got/dist/source/core/index.js
+
+      const supportsBrotli = distribution.string(
+        external_node_process_namespaceObject.versions.brotli,
+      );
+      const core_supportsZstd = distribution.string(
+        external_node_process_namespaceObject.versions.zstd,
+      );
+      const methodsWithoutBody = new Set(["GET", "HEAD"]);
+      const singleValueRequestHeaders = new Set([
+        "authorization",
+        "content-length",
+        "proxy-authorization",
+      ]);
+      const cacheableStore = new WeakableMap();
+      const redirectCodes = new Set([301, 302, 303, 307, 308]);
+
+      const transientWriteErrorCodes = new Set(["EPIPE", "ECONNRESET"]);
+      const omittedPipedHeaders = new Set([
+        "host",
+        "connection",
+        "keep-alive",
+        "proxy-authenticate",
+        "proxy-authorization",
+        "proxy-connection",
+        "te",
+        "trailer",
+        "transfer-encoding",
+        "upgrade",
+      ]);
+      // Track errors that have been processed by beforeError hooks to preserve custom error types
+      const errorsProcessedByHooks = new WeakSet();
+      const proxiedRequestEvents = [
+        "socket",
+        "connect",
+        "continue",
+        "information",
+        "upgrade",
+      ];
+      const core_noop = () => {};
+      const isTransientWriteError = (error) => {
+        const { code } = error;
+        return typeof code === "string" && transientWriteErrorCodes.has(code);
+      };
+      const getConnectionListedHeaders = (headers) => {
+        const connectionListedHeaders = new Set();
+        for (const [header, connectionHeader] of Object.entries(headers)) {
+          const normalizedHeader = header.toLowerCase();
+          if (
+            normalizedHeader !== "connection" &&
+            normalizedHeader !== "proxy-connection"
+          ) {
+            continue;
           }
-          /* c8 ignore stop */
-          try {
-            const read = this.#fs.readlinkSync(this.fullpath());
-            const linkTarget = this.parent.resolve(read);
-            if (linkTarget) {
-              return (this.#linkTarget = linkTarget);
-            }
-          } catch (er) {
-            this.#readlinkFail(er.code);
-            return undefined;
-          }
-        }
-        #readdirSuccess(children) {
-          // succeeded, mark readdir called bit
-          this.#type |= READDIR_CALLED;
-          // mark all remaining provisional children as ENOENT
-          for (let p = children.provisional; p < children.length; p++) {
-            children[p].#markENOENT();
-          }
-        }
-        #markENOENT() {
-          // mark as UNKNOWN and ENOENT
-          if (this.#type & ENOENT) return;
-          this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN;
-          this.#markChildrenENOENT();
-        }
-        #markChildrenENOENT() {
-          // all children are provisional and do not exist
-          const children = this.children();
-          children.provisional = 0;
-          for (const p of children) {
-            p.#markENOENT();
-          }
-        }
-        #markENOREALPATH() {
-          this.#type |= ENOREALPATH;
-          this.#markENOTDIR();
-        }
-        // save the information when we know the entry is not a dir
-        #markENOTDIR() {
-          // entry is not a directory, so any children can't exist.
-          // this *should* be impossible, since any children created
-          // after it's been marked ENOTDIR should be marked ENOENT,
-          // so it won't even get to this point.
-          /* c8 ignore start */
-          if (this.#type & ENOTDIR) return;
-          /* c8 ignore stop */
-          let t = this.#type;
-          // this could happen if we stat a dir, then delete it,
-          // then try to read it or one of its children.
-          if ((t & IFMT) === IFDIR) t &= IFMT_UNKNOWN;
-          this.#type = t | ENOTDIR;
-          this.#markChildrenENOENT();
-        }
-        #readdirFail(code = "") {
-          // markENOTDIR and markENOENT also set provisional=0
-          if (code === "ENOTDIR" || code === "EPERM") {
-            this.#markENOTDIR();
-          } else if (code === "ENOENT") {
-            this.#markENOENT();
-          } else {
-            this.children().provisional = 0;
-          }
-        }
-        #lstatFail(code = "") {
-          // Windows just raises ENOENT in this case, disable for win CI
-          /* c8 ignore start */
-          if (code === "ENOTDIR") {
-            // already know it has a parent by this point
-            const p = this.parent;
-            p.#markENOTDIR();
-          } else if (code === "ENOENT") {
-            /* c8 ignore stop */
-            this.#markENOENT();
-          }
-        }
-        #readlinkFail(code = "") {
-          let ter = this.#type;
-          ter |= ENOREADLINK;
-          if (code === "ENOENT") ter |= ENOENT;
-          // windows gets a weird error when you try to readlink a file
-          if (code === "EINVAL" || code === "UNKNOWN") {
-            // exists, but not a symlink, we don't know WHAT it is, so remove
-            // all IFMT bits.
-            ter &= IFMT_UNKNOWN;
-          }
-          this.#type = ter;
-          // windows just gets ENOENT in this case.  We do cover the case,
-          // just disabled because it's impossible on Windows CI
-          /* c8 ignore start */
-          if (code === "ENOTDIR" && this.parent) {
-            this.parent.#markENOTDIR();
-          }
-          /* c8 ignore stop */
-        }
-        #readdirAddChild(e, c) {
-          return (
-            this.#readdirMaybePromoteChild(e, c) ||
-            this.#readdirAddNewChild(e, c)
-          );
-        }
-        #readdirAddNewChild(e, c) {
-          // alloc new entry at head, so it's never provisional
-          const type = entToType(e);
-          const child = this.newChild(e.name, type, { parent: this });
-          const ifmt = child.#type & IFMT;
-          if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {
-            child.#type |= ENOTDIR;
-          }
-          c.unshift(child);
-          c.provisional++;
-          return child;
-        }
-        #readdirMaybePromoteChild(e, c) {
-          for (let p = c.provisional; p < c.length; p++) {
-            const pchild = c[p];
-            const name = this.nocase
-              ? normalizeNocase(e.name)
-              : normalize(e.name);
-            if (name !== pchild.#matchName) {
+          const connectionHeaderValues = Array.isArray(connectionHeader)
+            ? connectionHeader
+            : [connectionHeader];
+          for (const value of connectionHeaderValues) {
+            if (typeof value !== "string") {
               continue;
             }
-            return this.#readdirPromoteChild(e, pchild, p, c);
+            for (const token of value.split(",")) {
+              const normalizedToken = token.trim().toLowerCase();
+              if (normalizedToken.length > 0) {
+                connectionListedHeaders.add(normalizedToken);
+              }
+            }
           }
         }
-        #readdirPromoteChild(e, p, index, c) {
-          const v = p.name;
-          // retain any other flags, but set ifmt from dirent
-          p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e);
-          // case sensitivity fixing when we learn the true name.
-          if (v !== e.name) p.name = e.name;
-          // just advance provisional index (potentially off the list),
-          // otherwise we have to splice/pop it out and re-insert at head
-          if (index !== c.provisional) {
-            if (index === c.length - 1) c.pop();
-            else c.splice(index, 1);
-            c.unshift(p);
+        return connectionListedHeaders;
+      };
+      const normalizeError = (error) => {
+        if (error instanceof globalThis.Error) {
+          return error;
+        }
+        if (distribution.object(error)) {
+          const errorLike = error;
+          const message =
+            typeof errorLike.message === "string"
+              ? errorLike.message
+              : "Non-error object thrown";
+          const normalizedError = new globalThis.Error(message, {
+            cause: error,
+          });
+          if (typeof errorLike.stack === "string") {
+            normalizedError.stack = errorLike.stack;
           }
-          c.provisional++;
-          return p;
-        }
-        /**
-         * Call lstat() on this Path, and update all known information that can be
-         * determined.
-         *
-         * Note that unlike `fs.lstat()`, the returned value does not contain some
-         * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-         * information is required, you will need to call `fs.lstat` yourself.
-         *
-         * If the Path refers to a nonexistent file, or if the lstat call fails for
-         * any reason, `undefined` is returned.  Otherwise the updated Path object is
-         * returned.
-         *
-         * Results are cached, and thus may be out of date if the filesystem is
-         * mutated.
-         */
-        async lstat() {
-          if ((this.#type & ENOENT) === 0) {
-            try {
-              this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));
-              return this;
-            } catch (er) {
-              this.#lstatFail(er.code);
-            }
+          if (typeof errorLike.code === "string") {
+            normalizedError.code = errorLike.code;
           }
+          if (typeof errorLike.input === "string") {
+            normalizedError.input = errorLike.input;
+          }
+          return normalizedError;
         }
-        /**
-         * synchronous {@link PathBase.lstat}
-         */
-        lstatSync() {
-          if ((this.#type & ENOENT) === 0) {
-            try {
-              this.#applyStat(this.#fs.lstatSync(this.fullpath()));
-              return this;
-            } catch (er) {
-              this.#lstatFail(er.code);
+        return new globalThis.Error(String(error));
+      };
+      const getSanitizedUrl = (options) =>
+        options?.url ? stripUrlAuth(options.url) : "";
+      const makeProgress = (transferred, total) => {
+        let percent = 0;
+        if (total) {
+          percent = transferred / total;
+        } else if (total === transferred) {
+          percent = 1;
+        }
+        return { percent, transferred, total };
+      };
+      class Request extends external_node_stream_.Duplex {
+        // @ts-expect-error - Ignoring for now.
+        ["constructor"];
+        _noPipe;
+        // @ts-expect-error https://github.com/microsoft/TypeScript/issues/9568
+        options;
+        response;
+        requestUrl;
+        redirectUrls = [];
+        retryCount = 0;
+        _stopReading = false;
+        _stopRetry;
+        _downloadedSize = 0;
+        _uploadedSize = 0;
+        _pipedServerResponses = new Set();
+        _request;
+        _responseSize;
+        _bodySize;
+        _unproxyEvents;
+        _triggerRead = false;
+        _jobs = [];
+        _cancelTimeouts;
+        _abortListenerDisposer;
+        _flushed = false;
+        _aborted = false;
+        _expectedContentLength;
+        _compressedBytesCount;
+        _skipRequestEndInFinal = false;
+        _incrementalDecode;
+        _requestId = generateRequestId();
+        // We need this because `this._request` if `undefined` when using cache
+        _requestInitialized = false;
+        constructor(url, options, defaults) {
+          super({
+            // Don't destroy immediately, as the error may be emitted on unsuccessful retry
+            autoDestroy: false,
+            // It needs to be zero because we're just proxying the data to another stream
+            highWaterMark: 0,
+          });
+          this.on("pipe", (source) => {
+            if (this.options.copyPipedHeaders && source?.headers) {
+              const connectionListedHeaders = getConnectionListedHeaders(
+                source.headers,
+              );
+              for (const [header, value] of Object.entries(source.headers)) {
+                const normalizedHeader = header.toLowerCase();
+                if (
+                  omittedPipedHeaders.has(normalizedHeader) ||
+                  connectionListedHeaders.has(normalizedHeader)
+                ) {
+                  continue;
+                }
+                if (!this.options.shouldCopyPipedHeader(normalizedHeader)) {
+                  continue;
+                }
+                this.options.setPipedHeader(normalizedHeader, value);
+              }
+            }
+          });
+          this.on("newListener", (event) => {
+            if (event === "retry" && this.listenerCount("retry") > 0) {
+              throw new Error("A retry listener has been attached already.");
             }
+          });
+          try {
+            this.options = new Options(url, options, defaults);
+            if (!this.options.url) {
+              if (this.options.prefixUrl === "") {
+                throw new TypeError("Missing `url` property");
+              }
+              this.options.url = "";
+            }
+            this.requestUrl = this.options.url;
+            // Publish request creation event
+            publishRequestCreate({
+              requestId: this._requestId,
+              url: getSanitizedUrl(this.options),
+              method: this.options.method,
+            });
+          } catch (error) {
+            const { options } = error;
+            if (options) {
+              this.options = options;
+            }
+            this.flush = async () => {
+              this.flush = async () => {};
+              // Defer error emission to next tick to allow user to attach error handlers
+              external_node_process_namespaceObject.nextTick(() => {
+                // _beforeError requires options to access retry logic and hooks
+                if (this.options) {
+                  this._beforeError(normalizeError(error));
+                } else {
+                  // Options is undefined, skip _beforeError and destroy directly
+                  const normalizedError = normalizeError(error);
+                  const requestError =
+                    normalizedError instanceof RequestError
+                      ? normalizedError
+                      : new RequestError(
+                          normalizedError.message,
+                          normalizedError,
+                          this,
+                        );
+                  this.destroy(requestError);
+                }
+              });
+            };
+            return;
+          }
+          // Important! If you replace `body` in a handler with another stream, make sure it's readable first.
+          // The below is run only once.
+          const { body } = this.options;
+          if (distribution.nodeStream(body)) {
+            body.once("error", this._onBodyError);
           }
         }
-        #applyStat(st) {
-          const {
-            atime,
-            atimeMs,
-            birthtime,
-            birthtimeMs,
-            blksize,
-            blocks,
-            ctime,
-            ctimeMs,
-            dev,
-            gid,
-            ino,
-            mode,
-            mtime,
-            mtimeMs,
-            nlink,
-            rdev,
-            size,
-            uid,
-          } = st;
-          this.#atime = atime;
-          this.#atimeMs = atimeMs;
-          this.#birthtime = birthtime;
-          this.#birthtimeMs = birthtimeMs;
-          this.#blksize = blksize;
-          this.#blocks = blocks;
-          this.#ctime = ctime;
-          this.#ctimeMs = ctimeMs;
-          this.#dev = dev;
-          this.#gid = gid;
-          this.#ino = ino;
-          this.#mode = mode;
-          this.#mtime = mtime;
-          this.#mtimeMs = mtimeMs;
-          this.#nlink = nlink;
-          this.#rdev = rdev;
-          this.#size = size;
-          this.#uid = uid;
-          const ifmt = entToType(st);
-          // retain any other flags, but set the ifmt
-          this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED;
-          if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {
-            this.#type |= ENOTDIR;
-          }
-        }
-        #onReaddirCB = [];
-        #readdirCBInFlight = false;
-        #callOnReaddirCB(children) {
-          this.#readdirCBInFlight = false;
-          const cbs = this.#onReaddirCB.slice();
-          this.#onReaddirCB.length = 0;
-          cbs.forEach((cb) => cb(null, children));
-        }
-        /**
-         * Standard node-style callback interface to get list of directory entries.
-         *
-         * If the Path cannot or does not contain any children, then an empty array
-         * is returned.
-         *
-         * Results are cached, and thus may be out of date if the filesystem is
-         * mutated.
-         *
-         * @param cb The callback called with (er, entries).  Note that the `er`
-         * param is somewhat extraneous, as all readdir() errors are handled and
-         * simply result in an empty set of entries being returned.
-         * @param allowZalgo Boolean indicating that immediately known results should
-         * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
-         * zalgo at your peril, the dark pony lord is devious and unforgiving.
-         */
-        readdirCB(cb, allowZalgo = false) {
-          if (!this.canReaddir()) {
-            if (allowZalgo) cb(null, []);
-            else queueMicrotask(() => cb(null, []));
+        async flush() {
+          if (this._flushed) {
             return;
           }
-          const children = this.children();
-          if (this.calledReaddir()) {
-            const c = children.slice(0, children.provisional);
-            if (allowZalgo) cb(null, c);
-            else queueMicrotask(() => cb(null, c));
-            return;
+          this._flushed = true;
+          try {
+            this._attachAbortListener();
+            if (this.destroyed) {
+              return;
+            }
+            await this._finalizeBody();
+            if (this.destroyed) {
+              return;
+            }
+            await this._makeRequest();
+            if (this.destroyed) {
+              this._request?.destroy();
+              return;
+            }
+            // Queued writes etc.
+            for (const job of this._jobs) {
+              job();
+            }
+            // Prevent memory leak
+            this._jobs.length = 0;
+            this._requestInitialized = true;
+          } catch (error) {
+            this._beforeError(normalizeError(error));
           }
-          // don't have to worry about zalgo at this point.
-          this.#onReaddirCB.push(cb);
-          if (this.#readdirCBInFlight) {
+        }
+        _beforeError(error) {
+          if (this._stopReading) {
             return;
           }
-          this.#readdirCBInFlight = true;
-          // else read the directory, fill up children
-          // de-provisionalize any provisional children.
-          const fullpath = this.fullpath();
-          this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
-            if (er) {
-              this.#readdirFail(er.code);
-              children.provisional = 0;
-            } else {
-              // if we didn't get an error, we always get entries.
-              //@ts-ignore
-              for (const e of entries) {
-                this.#readdirAddChild(e, children);
+          const { response, options } = this;
+          const attemptCount =
+            this.retryCount + (error.name === "RetryError" ? 0 : 1);
+          this._stopReading = true;
+          if (!(error instanceof RequestError)) {
+            error = new RequestError(error.message, error, this);
+          }
+          const typedError = error;
+          void (async () => {
+            // Node.js parser is really weird.
+            // It emits post-request Parse Errors on the same instance as previous request. WTF.
+            // Therefore, we need to check if it has been destroyed as well.
+            //
+            // Furthermore, Node.js 16 `response.destroy()` doesn't immediately destroy the socket,
+            // but makes the response unreadable. So we additionally need to check `response.readable`.
+            if (
+              response?.readable &&
+              !response.rawBody &&
+              !this._request?.socket?.destroyed
+            ) {
+              // @types/node has incorrect typings. `setEncoding` accepts `null` as well.
+              response.setEncoding(this.readableEncoding);
+              const success = await this._setRawBody(response);
+              if (success) {
+                response.body = decodeUint8Array(response.rawBody);
               }
-              this.#readdirSuccess(children);
             }
-            this.#callOnReaddirCB(children.slice(0, children.provisional));
-            return;
-          });
+            if (this.listenerCount("retry") !== 0) {
+              let backoff;
+              try {
+                let retryAfter;
+                if (response && "retry-after" in response.headers) {
+                  retryAfter = Number(response.headers["retry-after"]);
+                  if (Number.isNaN(retryAfter)) {
+                    retryAfter =
+                      Date.parse(response.headers["retry-after"]) - Date.now();
+                    if (retryAfter <= 0) {
+                      retryAfter = 1;
+                    }
+                  } else {
+                    retryAfter *= 1000;
+                  }
+                }
+                const retryOptions = options.retry;
+                const computedValue = calculate_retry_delay({
+                  attemptCount,
+                  retryOptions,
+                  error: typedError,
+                  retryAfter,
+                  computedValue:
+                    retryOptions.maxRetryAfter ??
+                    options.timeout.request ??
+                    Number.POSITIVE_INFINITY,
+                });
+                // When enforceRetryRules is true, respect the retry rules (limit, methods, statusCodes, errorCodes)
+                // before calling the user's calculateDelay function. If computedValue is 0 (meaning retry is not allowed
+                // based on these rules), skip calling calculateDelay entirely.
+                // When false, always call calculateDelay, allowing it to override retry decisions.
+                if (retryOptions.enforceRetryRules && computedValue === 0) {
+                  backoff = 0;
+                } else {
+                  backoff = await retryOptions.calculateDelay({
+                    attemptCount,
+                    retryOptions,
+                    error: typedError,
+                    retryAfter,
+                    computedValue,
+                  });
+                }
+              } catch (error_) {
+                const normalizedError = normalizeError(error_);
+                void this._error(
+                  new RequestError(
+                    normalizedError.message,
+                    normalizedError,
+                    this,
+                  ),
+                );
+                return;
+              }
+              if (backoff) {
+                await new Promise((resolve) => {
+                  const timeout = setTimeout(resolve, backoff);
+                  this._stopRetry = () => {
+                    clearTimeout(timeout);
+                    resolve();
+                  };
+                });
+                // Something forced us to abort the retry
+                if (this.destroyed) {
+                  return;
+                }
+                // Capture body BEFORE hooks run to detect reassignment
+                const bodyBeforeHooks = this.options.body;
+                try {
+                  for (const hook of this.options.hooks.beforeRetry) {
+                    // eslint-disable-next-line no-await-in-loop
+                    await hook(typedError, this.retryCount + 1);
+                  }
+                } catch (error_) {
+                  const normalizedError = normalizeError(error_);
+                  void this._error(
+                    new RequestError(
+                      normalizedError.message,
+                      normalizedError,
+                      this,
+                    ),
+                  );
+                  return;
+                }
+                // Something forced us to abort the retry
+                if (this.destroyed) {
+                  return;
+                }
+                // Preserve stream body reassigned in beforeRetry hooks.
+                const bodyAfterHooks = this.options.body;
+                const bodyWasReassigned = bodyBeforeHooks !== bodyAfterHooks;
+                // Resource cleanup and preservation logic for retry with body reassignment.
+                // The Promise wrapper (as-promise/index.ts) compares body identity to detect consumed streams,
+                // so we must preserve the body reference across destroy(). However, destroy() calls _destroy()
+                // which destroys this.options.body, creating a complex dance of clear/restore operations.
+                //
+                // Key constraints:
+                // 1. If body was reassigned, we must NOT destroy the NEW stream (it will be used for retry)
+                // 2. If body was reassigned, we MUST destroy the OLD stream to prevent memory leaks
+                // 3. We must restore the body reference after destroy() for identity checks in promise wrapper
+                // 4. We cannot use the normal setter after destroy() because it validates stream readability
+                try {
+                  if (bodyWasReassigned) {
+                    const oldBody = bodyBeforeHooks;
+                    // Temporarily clear body to prevent destroy() from destroying the new stream
+                    this.options.body = undefined;
+                    this.destroy();
+                    // Clean up the old stream resource if it's a stream and different from new body
+                    // (edge case: if old and new are same stream object, don't destroy it)
+                    if (
+                      distribution.nodeStream(oldBody) &&
+                      oldBody !== bodyAfterHooks
+                    ) {
+                      oldBody.destroy();
+                    }
+                    // Restore new body for promise wrapper's identity check
+                    if (
+                      distribution.nodeStream(bodyAfterHooks) &&
+                      (bodyAfterHooks.readableEnded || bodyAfterHooks.destroyed)
+                    ) {
+                      throw new TypeError(
+                        "The reassigned stream body must be readable. Ensure you provide a fresh, readable stream in the beforeRetry hook.",
+                      );
+                    }
+                    this.options.body = bodyAfterHooks;
+                  } else {
+                    // Body wasn't reassigned - use normal destroy flow which handles body cleanup
+                    this.destroy();
+                    // Note: We do NOT restore the body reference here. The stream was destroyed by _destroy()
+                    // and should not be accessed. The promise wrapper will see that body identity hasn't changed
+                    // and will detect it's a consumed stream, which is the correct behavior.
+                  }
+                } catch (error_) {
+                  const normalizedError = normalizeError(error_);
+                  void this._error(
+                    new RequestError(
+                      normalizedError.message,
+                      normalizedError,
+                      this,
+                    ),
+                  );
+                  return;
+                }
+                // Publish retry event
+                publishRetry({
+                  requestId: this._requestId,
+                  retryCount: this.retryCount + 1,
+                  error: typedError,
+                  delay: backoff,
+                });
+                this.emit(
+                  "retry",
+                  this.retryCount + 1,
+                  error,
+                  (updatedOptions) => {
+                    const request = new Request(
+                      options.url,
+                      updatedOptions,
+                      options,
+                    );
+                    request.retryCount = this.retryCount + 1;
+                    external_node_process_namespaceObject.nextTick(() => {
+                      void request.flush();
+                    });
+                    return request;
+                  },
+                );
+                return;
+              }
+            }
+            void this._error(typedError);
+          })();
         }
-        #asyncReaddirInFlight;
-        /**
-         * Return an array of known child entries.
-         *
-         * If the Path cannot or does not contain any children, then an empty array
-         * is returned.
-         *
-         * Results are cached, and thus may be out of date if the filesystem is
-         * mutated.
-         */
-        async readdir() {
-          if (!this.canReaddir()) {
-            return [];
-          }
-          const children = this.children();
-          if (this.calledReaddir()) {
-            return children.slice(0, children.provisional);
-          }
-          // else read the directory, fill up children
-          // de-provisionalize any provisional children.
-          const fullpath = this.fullpath();
-          if (this.#asyncReaddirInFlight) {
-            await this.#asyncReaddirInFlight;
-          } else {
-            /* c8 ignore start */
-            let resolve = () => {};
-            /* c8 ignore stop */
-            this.#asyncReaddirInFlight = new Promise((res) => (resolve = res));
-            try {
-              for (const e of await this.#fs.promises.readdir(fullpath, {
-                withFileTypes: true,
-              })) {
-                this.#readdirAddChild(e, children);
+        _read() {
+          this._triggerRead = true;
+          const { response } = this;
+          if (response && !this._stopReading) {
+            // We cannot put this in the `if` above
+            // because `.read()` also triggers the `end` event
+            if (response.readableLength) {
+              this._triggerRead = false;
+            }
+            let data;
+            while ((data = response.read()) !== null) {
+              this._downloadedSize += data.length; // eslint-disable-line @typescript-eslint/restrict-plus-operands
+              if (this._incrementalDecode) {
+                try {
+                  const decodedChunk =
+                    typeof data === "string"
+                      ? data
+                      : this._incrementalDecode.decoder.decode(data, {
+                          stream: true,
+                        });
+                  if (decodedChunk.length > 0) {
+                    this._incrementalDecode.chunks.push(decodedChunk);
+                  }
+                } catch {
+                  this._incrementalDecode = undefined;
+                }
+              }
+              const progress = this.downloadProgress;
+              if (progress.percent < 1) {
+                this.emit("downloadProgress", progress);
+              }
+              if (this._stopReading) {
+                return;
+              }
+              this.push(data);
+              if (this._stopReading) {
+                return;
               }
-              this.#readdirSuccess(children);
-            } catch (er) {
-              this.#readdirFail(er.code);
-              children.provisional = 0;
             }
-            this.#asyncReaddirInFlight = undefined;
-            resolve();
           }
-          return children.slice(0, children.provisional);
         }
-        /**
-         * synchronous {@link PathBase.readdir}
-         */
-        readdirSync() {
-          if (!this.canReaddir()) {
-            return [];
-          }
-          const children = this.children();
-          if (this.calledReaddir()) {
-            return children.slice(0, children.provisional);
-          }
-          // else read the directory, fill up children
-          // de-provisionalize any provisional children.
-          const fullpath = this.fullpath();
-          try {
-            for (const e of this.#fs.readdirSync(fullpath, {
-              withFileTypes: true,
-            })) {
-              this.#readdirAddChild(e, children);
-            }
-            this.#readdirSuccess(children);
-          } catch (er) {
-            this.#readdirFail(er.code);
-            children.provisional = 0;
-          }
-          return children.slice(0, children.provisional);
-        }
-        canReaddir() {
-          if (this.#type & ENOCHILD) return false;
-          const ifmt = IFMT & this.#type;
-          // we always set ENOTDIR when setting IFMT, so should be impossible
-          /* c8 ignore start */
-          if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {
-            return false;
-          }
-          /* c8 ignore stop */
-          return true;
-        }
-        shouldWalk(dirs, walkFilter) {
-          return (
-            (this.#type & IFDIR) === IFDIR &&
-            !(this.#type & ENOCHILD) &&
-            !dirs.has(this) &&
-            (!walkFilter || walkFilter(this))
-          );
-        }
-        /**
-         * Return the Path object corresponding to path as resolved
-         * by realpath(3).
-         *
-         * If the realpath call fails for any reason, `undefined` is returned.
-         *
-         * Result is cached, and thus may be outdated if the filesystem is mutated.
-         * On success, returns a Path object.
-         */
-        async realpath() {
-          if (this.#realpath) return this.#realpath;
-          if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-            return undefined;
-          try {
-            const rp = await this.#fs.promises.realpath(this.fullpath());
-            return (this.#realpath = this.resolve(rp));
-          } catch (_) {
-            this.#markENOREALPATH();
-          }
-        }
-        /**
-         * Synchronous {@link realpath}
-         */
-        realpathSync() {
-          if (this.#realpath) return this.#realpath;
-          if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-            return undefined;
-          try {
-            const rp = this.#fs.realpathSync(this.fullpath());
-            return (this.#realpath = this.resolve(rp));
-          } catch (_) {
-            this.#markENOREALPATH();
+        _write(chunk, encoding, callback) {
+          const write = () => {
+            this._writeRequest(chunk, encoding, callback);
+          };
+          if (this._requestInitialized) {
+            write();
+          } else {
+            this._jobs.push(write);
           }
         }
-      }
-      exports.PathBase = PathBase;
-      /**
-       * Path class used on win32 systems
-       *
-       * Uses `'\\'` as the path separator for returned paths, either `'\\'` or `'/'`
-       * as the path separator for parsing paths.
-       */
-      class PathWin32 extends PathBase {
-        /**
-         * Separator for generating path strings.
-         */
-        sep = "\\";
-        /**
-         * Separator for parsing path strings.
-         */
-        splitSep = eitherSep;
-        /**
-         * Do not create new Path objects directly.  They should always be accessed
-         * via the PathScurry class or other methods on the Path class.
-         *
-         * @internal
-         */
-        constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-          super(name, type, root, roots, nocase, children, opts);
-        }
-        /**
-         * @internal
-         */
-        newChild(name, type = UNKNOWN, opts = {}) {
-          return new PathWin32(
-            name,
-            type,
-            this.root,
-            this.roots,
-            this.nocase,
-            this.childrenCache(),
-            opts
-          );
-        }
-        /**
-         * @internal
-         */
-        getRootString(path) {
-          return path_1.win32.parse(path).root;
-        }
-        /**
-         * @internal
-         */
-        getRoot(rootPath) {
-          rootPath = uncToDrive(rootPath.toUpperCase());
-          if (rootPath === this.root.name) {
-            return this.root;
-          }
-          // ok, not that one, check if it matches another we know about
-          for (const [compare, root] of Object.entries(this.roots)) {
-            if (this.sameRoot(rootPath, compare)) {
-              return (this.roots[rootPath] = root);
+        _final(callback) {
+          const endRequest = () => {
+            if (this._skipRequestEndInFinal) {
+              this._skipRequestEndInFinal = false;
+              callback();
+              return;
             }
-          }
-          // otherwise, have to create a new one.
-          return (this.roots[rootPath] = new PathScurryWin32(
-            rootPath,
-            this
-          ).root);
-        }
-        /**
-         * @internal
-         */
-        sameRoot(rootPath, compare = this.root.name) {
-          // windows can (rarely) have case-sensitive filesystem, but
-          // UNC and drive letters are always case-insensitive, and canonically
-          // represented uppercase.
-          rootPath = rootPath
-            .toUpperCase()
-            .replace(/\//g, "\\")
-            .replace(uncDriveRegexp, "$1\\");
-          return rootPath === compare;
-        }
-      }
-      exports.PathWin32 = PathWin32;
-      /**
-       * Path class used on all posix systems.
-       *
-       * Uses `'/'` as the path separator.
-       */
-      class PathPosix extends PathBase {
-        /**
-         * separator for parsing path strings
-         */
-        splitSep = "/";
-        /**
-         * separator for generating path strings
-         */
-        sep = "/";
-        /**
-         * Do not create new Path objects directly.  They should always be accessed
-         * via the PathScurry class or other methods on the Path class.
-         *
-         * @internal
-         */
-        constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-          super(name, type, root, roots, nocase, children, opts);
-        }
-        /**
-         * @internal
-         */
-        getRootString(path) {
-          return path.startsWith("/") ? "/" : "";
-        }
-        /**
-         * @internal
-         */
-        getRoot(_rootPath) {
-          return this.root;
-        }
-        /**
-         * @internal
-         */
-        newChild(name, type = UNKNOWN, opts = {}) {
-          return new PathPosix(
-            name,
-            type,
-            this.root,
-            this.roots,
-            this.nocase,
-            this.childrenCache(),
-            opts
-          );
-        }
-      }
-      exports.PathPosix = PathPosix;
-      /**
-       * The base class for all PathScurry classes, providing the interface for path
-       * resolution and filesystem operations.
-       *
-       * Typically, you should *not* instantiate this class directly, but rather one
-       * of the platform-specific classes, or the exported {@link PathScurry} which
-       * defaults to the current platform.
-       */
-      class PathScurryBase {
-        /**
-         * The root Path entry for the current working directory of this Scurry
-         */
-        root;
-        /**
-         * The string path for the root of this Scurry's current working directory
-         */
-        rootPath;
-        /**
-         * A collection of all roots encountered, referenced by rootPath
-         */
-        roots;
-        /**
-         * The Path entry corresponding to this PathScurry's current working directory.
-         */
-        cwd;
-        #resolveCache;
-        #children;
-        /**
-         * Perform path comparisons case-insensitively.
-         *
-         * Defaults true on Darwin and Windows systems, false elsewhere.
-         */
-        nocase;
-        #fs;
-        /**
-         * This class should not be instantiated directly.
-         *
-         * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
-         *
-         * @internal
-         */
-        constructor(
-          cwd = process.cwd(),
-          pathImpl,
-          sep,
-          { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}
-        ) {
-          this.#fs = fsFromOption(fs);
-          if (cwd instanceof URL || cwd.startsWith("file://")) {
-            cwd = (0, url_1.fileURLToPath)(cwd);
-          }
-          // resolve and split root, and then add to the store.
-          // this is the only time we call path.resolve()
-          const cwdPath = pathImpl.resolve(cwd);
-          this.roots = Object.create(null);
-          this.rootPath = this.parseRootPath(cwdPath);
-          this.#resolveCache = new ResolveCache();
-          this.#children = new ChildrenCache(childrenCacheSize);
-          const split = cwdPath.substring(this.rootPath.length).split(sep);
-          // resolve('/') leaves '', splits to [''], we don't want that.
-          if (split.length === 1 && !split[0]) {
-            split.pop();
-          }
-          /* c8 ignore start */
-          if (nocase === undefined) {
-            throw new TypeError(
-              "must provide nocase setting to PathScurryBase ctor"
-            );
-          }
-          /* c8 ignore stop */
-          this.nocase = nocase;
-          this.root = this.newRoot(this.#fs);
-          this.roots[this.rootPath] = this.root;
-          let prev = this.root;
-          let len = split.length - 1;
-          const joinSep = pathImpl.sep;
-          let abs = this.rootPath;
-          let sawFirst = false;
-          for (const part of split) {
-            prev = prev.child(part, {
-              relative: new Array(len--).fill("..").join(joinSep),
-              fullpath: (abs += (sawFirst ? "" : joinSep) + part),
+            const request = this._request;
+            // We need to check if `this._request` is present,
+            // because it isn't when we use cache.
+            if (!request || request.destroyed) {
+              callback();
+              return;
+            }
+            request.end((error) => {
+              // The request has been destroyed before `_final` finished.
+              // See https://github.com/nodejs/node/issues/39356
+              if (request?._writableState?.errored) {
+                return;
+              }
+              if (!error) {
+                this._emitUploadComplete(request);
+              }
+              callback(error);
             });
-            sawFirst = true;
-          }
-          this.cwd = prev;
-        }
-        /**
-         * Get the depth of a provided path, string, or the cwd
-         */
-        depth(path = this.cwd) {
-          if (typeof path === "string") {
-            path = this.cwd.resolve(path);
+          };
+          if (this._requestInitialized) {
+            endRequest();
+          } else {
+            this._jobs.push(endRequest);
           }
-          return path.depth();
-        }
-        /**
-         * Return the cache of child entries.  Exposed so subclasses can create
-         * child Path objects in a platform-specific way.
-         *
-         * @internal
-         */
-        childrenCache() {
-          return this.#children;
         }
-        /**
-         * Resolve one or more path strings to a resolved string
-         *
-         * Same interface as require('path').resolve.
-         *
-         * Much faster than path.resolve() when called multiple times for the same
-         * path, because the resolved Path objects are cached.  Much slower
-         * otherwise.
-         */
-        resolve(...paths) {
-          // first figure out the minimum number of paths we have to test
-          // we always start at cwd, but any absolutes will bump the start
-          let r = "";
-          for (let i = paths.length - 1; i >= 0; i--) {
-            const p = paths[i];
-            if (!p || p === ".") continue;
-            r = r ? `${p}/${r}` : p;
-            if (this.isAbsolute(p)) {
-              break;
+        _destroy(error, callback) {
+          this._stopReading = true;
+          this.flush = async () => {};
+          // Prevent further retries
+          this._stopRetry?.();
+          this._cancelTimeouts?.();
+          this._abortListenerDisposer?.[Symbol.dispose]();
+          if (this.options) {
+            const { body } = this.options;
+            if (distribution.nodeStream(body)) {
+              body.destroy();
             }
           }
-          const cached = this.#resolveCache.get(r);
-          if (cached !== undefined) {
-            return cached;
+          if (this._request) {
+            this._request.destroy();
           }
-          const result = this.cwd.resolve(r).fullpath();
-          this.#resolveCache.set(r, result);
-          return result;
-        }
-        /**
-         * find the relative path from the cwd to the supplied path string or entry
-         */
-        relative(entry = this.cwd) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
+          // Workaround: http-timer only sets timings.end when the response emits 'end'.
+          // When a stream is destroyed before completion, the 'end' event may not fire,
+          // leaving timings.end undefined. This should ideally be fixed in http-timer
+          // by listening to the 'close' event, but we handle it here for now.
+          // Only set timings.end if there was no error or abort (to maintain semantic correctness).
+          const timings = this._request?.timings;
+          if (
+            timings &&
+            distribution.undefined(timings.end) &&
+            !distribution.undefined(timings.response) &&
+            distribution.undefined(timings.error) &&
+            distribution.undefined(timings.abort)
+          ) {
+            timings.end = Date.now();
+            if (distribution.undefined(timings.phases.total)) {
+              timings.phases.download = timings.end - timings.response;
+              timings.phases.total = timings.end - timings.start;
+            }
           }
-          return entry.relative();
-        }
-        /**
-         * Return the basename for the provided string or Path object
-         */
-        basename(entry = this.cwd) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
+          // Preserve custom errors returned by beforeError hooks.
+          // For other errors, wrap non-RequestError instances for consistency.
+          if (error !== null && !distribution.undefined(error)) {
+            const processedByHooks =
+              error instanceof Error && errorsProcessedByHooks.has(error);
+            if (!processedByHooks && !(error instanceof RequestError)) {
+              error =
+                error instanceof Error
+                  ? new RequestError(error.message, error, this)
+                  : new RequestError(String(error), {}, this);
+            }
           }
-          return entry.name;
+          callback(error);
         }
-        /**
-         * Return the dirname for the provided string or Path object
-         */
-        dirname(entry = this.cwd) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
+        pipe(destination, options) {
+          if (destination instanceof external_node_http_.ServerResponse) {
+            this._pipedServerResponses.add(destination);
           }
-          return (entry.parent || entry).fullpath();
+          return super.pipe(destination, options);
         }
-        async readdir(
-          entry = this.cwd,
-          opts = {
-            withFileTypes: true,
-          }
-        ) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-          }
-          const { withFileTypes } = opts;
-          if (!entry.canReaddir()) {
-            return [];
-          } else {
-            const p = await entry.readdir();
-            return withFileTypes ? p : p.map((e) => e.name);
+        unpipe(destination) {
+          if (destination instanceof external_node_http_.ServerResponse) {
+            this._pipedServerResponses.delete(destination);
           }
+          super.unpipe(destination);
+          return this;
         }
-        readdirSync(
-          entry = this.cwd,
-          opts = {
-            withFileTypes: true,
-          }
-        ) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-          }
-          const { withFileTypes = true } = opts;
-          if (!entry.canReaddir()) {
-            return [];
-          } else if (withFileTypes) {
-            return entry.readdirSync();
-          } else {
-            return entry.readdirSync().map((e) => e.name);
+        _attachAbortListener() {
+          if (this._abortListenerDisposer) {
+            return;
           }
-        }
-        /**
-         * Call lstat() on the string or Path object, and update all known
-         * information that can be determined.
-         *
-         * Note that unlike `fs.lstat()`, the returned value does not contain some
-         * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-         * information is required, you will need to call `fs.lstat` yourself.
-         *
-         * If the Path refers to a nonexistent file, or if the lstat call fails for
-         * any reason, `undefined` is returned.  Otherwise the updated Path object is
-         * returned.
-         *
-         * Results are cached, and thus may be out of date if the filesystem is
-         * mutated.
-         */
-        async lstat(entry = this.cwd) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
+          const { signal } = this.options;
+          if (!signal) {
+            return;
           }
-          return entry.lstat();
-        }
-        /**
-         * synchronous {@link PathScurryBase.lstat}
-         */
-        lstatSync(entry = this.cwd) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
+          const abort = () => {
+            // See https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static#return_value
+            if (signal.reason?.name === "TimeoutError") {
+              this.destroy(new TimeoutError(signal.reason, this.timings, this));
+            } else {
+              this.destroy(new AbortError(this));
+            }
+          };
+          if (signal.aborted) {
+            abort();
+          } else {
+            this._abortListenerDisposer = (0,
+            external_node_events_.addAbortListener)(signal, abort);
           }
-          return entry.lstatSync();
         }
-        async readlink(
-          entry = this.cwd,
-          { withFileTypes } = {
-            withFileTypes: false,
-          }
-        ) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-          }
-          const e = await entry.readlink();
-          return withFileTypes ? e : e?.fullpath();
+        _shouldIncrementallyDecodeBody() {
+          const { responseType, encoding } = this.options;
+          return (
+            Boolean(this._noPipe) &&
+            (responseType === "text" || responseType === "json") &&
+            isUtf8Encoding(encoding) &&
+            typeof globalThis.TextDecoder === "function"
+          );
         }
-        readlinkSync(
-          entry = this.cwd,
-          { withFileTypes } = {
-            withFileTypes: false,
-          }
-        ) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
+        _checkContentLengthMismatch() {
+          if (
+            this.options.strictContentLength &&
+            this._expectedContentLength !== undefined
+          ) {
+            // Use compressed bytes count when available (for compressed responses),
+            // otherwise use _downloadedSize (for uncompressed responses)
+            const actualSize =
+              this._compressedBytesCount ?? this._downloadedSize;
+            if (actualSize !== this._expectedContentLength) {
+              this._beforeError(
+                new ReadError(
+                  {
+                    message: `Content-Length mismatch: expected ${this._expectedContentLength} bytes, received ${actualSize} bytes`,
+                    name: "Error",
+                    code: "ERR_HTTP_CONTENT_LENGTH_MISMATCH",
+                  },
+                  this,
+                ),
+              );
+              return true;
+            }
           }
-          const e = entry.readlinkSync();
-          return withFileTypes ? e : e?.fullpath();
+          return false;
         }
-        async realpath(
-          entry = this.cwd,
-          { withFileTypes } = {
-            withFileTypes: false,
+        async _finalizeBody() {
+          const { options } = this;
+          const headers = options.getInternalHeaders();
+          const isForm = !distribution.undefined(options.form);
+          // eslint-disable-next-line @typescript-eslint/naming-convention
+          const isJSON = !distribution.undefined(options.json);
+          const isBody = !distribution.undefined(options.body);
+          const cannotHaveBody =
+            methodsWithoutBody.has(options.method) &&
+            !(options.method === "GET" && options.allowGetBody);
+          if (isForm || isJSON || isBody) {
+            if (cannotHaveBody) {
+              throw new TypeError(
+                `The \`${options.method}\` method cannot be used with a body`,
+              );
+            }
+            // Serialize body
+            const noContentType = !distribution.string(headers["content-type"]);
+            if (isBody) {
+              // Native FormData
+              if (options.body instanceof FormData) {
+                const response = new Response(options.body);
+                if (noContentType) {
+                  headers["content-type"] =
+                    response.headers.get("content-type") ??
+                    "multipart/form-data";
+                }
+                options.body = response.body;
+              } else if (
+                Object.prototype.toString.call(options.body) ===
+                "[object FormData]"
+              ) {
+                throw new TypeError(
+                  "Non-native FormData is not supported. Use globalThis.FormData instead.",
+                );
+              }
+            } else if (isForm) {
+              if (noContentType) {
+                headers["content-type"] = "application/x-www-form-urlencoded";
+              }
+              const { form } = options;
+              options.form = undefined;
+              options.body = new URLSearchParams(form).toString();
+            } else {
+              if (noContentType) {
+                headers["content-type"] = "application/json";
+              }
+              const { json } = options;
+              options.json = undefined;
+              options.body = options.stringifyJson(json);
+            }
+            const uploadBodySize = getBodySize(options.body, headers);
+            // See 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.  For example, a Content-Length header
+            // field is normally sent in a POST request even when the value is 0
+            // (indicating an empty payload body).  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.
+            if (
+              distribution.undefined(headers["content-length"]) &&
+              distribution.undefined(headers["transfer-encoding"]) &&
+              !cannotHaveBody &&
+              !distribution.undefined(uploadBodySize)
+            ) {
+              headers["content-length"] = String(uploadBodySize);
+            }
           }
-        ) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
+          if (options.responseType === "json" && !("accept" in headers)) {
+            headers.accept = "application/json";
           }
-          const e = await entry.realpath();
-          return withFileTypes ? e : e?.fullpath();
+          this._bodySize = Number(headers["content-length"]) || undefined;
         }
-        realpathSync(
-          entry = this.cwd,
-          { withFileTypes } = {
-            withFileTypes: false,
+        async _onResponseBase(response) {
+          // This will be called e.g. when using cache so we need to check if this request has been aborted.
+          if (this.isAborted) {
+            return;
           }
-        ) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-          }
-          const e = entry.realpathSync();
-          return withFileTypes ? e : e?.fullpath();
-        }
-        async walk(entry = this.cwd, opts = {}) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
+          const { options } = this;
+          const { url } = options;
+          const nativeResponse = response;
+          const statusCode = response.statusCode;
+          const { method } = options;
+          const redirectLocationHeader = response.headers.location;
+          const redirectLocation = Array.isArray(redirectLocationHeader)
+            ? redirectLocationHeader[0]
+            : redirectLocationHeader;
+          const isRedirect = Boolean(
+            redirectLocation && redirectCodes.has(statusCode),
+          );
+          // Skip decompression for responses that must not have bodies per RFC 9110:
+          // - HEAD responses (any status code)
+          // - 1xx (Informational): 100, 101, 102, 103, etc.
+          // - 204 (No Content)
+          // - 205 (Reset Content)
+          // - 304 (Not Modified)
+          const hasNoBody =
+            method === "HEAD" ||
+            (statusCode >= 100 && statusCode < 200) ||
+            statusCode === 204 ||
+            statusCode === 205 ||
+            statusCode === 304;
+          const prepareResponse = (response) => {
+            if (!Object.hasOwn(response, "headers")) {
+              Object.defineProperty(response, "headers", {
+                value: response.headers,
+                enumerable: true,
+                writable: true,
+                configurable: true,
+              });
+            }
+            response.statusMessage ||=
+              external_node_http_.STATUS_CODES[statusCode]; // eslint-disable-line @typescript-eslint/prefer-nullish-coalescing -- The status message can be empty.
+            response.url = stripUrlAuth(options.url);
+            response.requestUrl = this.requestUrl;
+            response.redirectUrls = this.redirectUrls;
+            response.request = this;
+            response.isFromCache = nativeResponse.fromCache ?? false;
+            response.ip = this.ip;
+            response.retryCount = this.retryCount;
+            response.ok = isResponseOk(response);
+            return response;
+          };
+          let typedResponse = prepareResponse(response);
+          // Redirect responses that will be followed are drained raw. Decompressing them can
+          // turn an irrelevant redirect body into a client-side failure or decompression DoS.
+          const shouldFollowRedirect =
+            isRedirect &&
+            (typeof options.followRedirect === "function"
+              ? options.followRedirect(typedResponse)
+              : options.followRedirect);
+          if (options.decompress && !hasNoBody && !shouldFollowRedirect) {
+            // When strictContentLength is enabled, track compressed bytes by listening to
+            // the native response's data events before decompression
+            if (options.strictContentLength) {
+              this._compressedBytesCount = 0;
+              nativeResponse.on("data", (chunk) => {
+                this._compressedBytesCount += byteLength(chunk);
+              });
+            }
+            response = decompressResponse(response);
+            typedResponse = prepareResponse(response);
           }
-          const {
-            withFileTypes = true,
-            follow = false,
-            filter,
-            walkFilter,
-          } = opts;
-          const results = [];
-          if (!filter || filter(entry)) {
-            results.push(withFileTypes ? entry : entry.fullpath());
-          }
-          const dirs = new Set();
-          const walk = (dir, cb) => {
-            dirs.add(dir);
-            dir.readdirCB((er, entries) => {
-              /* c8 ignore start */
-              if (er) {
-                return cb(er);
-              }
-              /* c8 ignore stop */
-              let len = entries.length;
-              if (!len) return cb();
-              const next = () => {
-                if (--len === 0) {
-                  cb();
-                }
-              };
-              for (const e of entries) {
-                if (!filter || filter(e)) {
-                  results.push(withFileTypes ? e : e.fullpath());
-                }
-                if (follow && e.isSymbolicLink()) {
-                  e.realpath()
-                    .then((r) => (r?.isUnknown() ? r.lstat() : r))
-                    .then((r) =>
-                      r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next()
-                    );
-                } else {
-                  if (e.shouldWalk(dirs, walkFilter)) {
-                    walk(e, next);
-                  } else {
-                    next();
-                  }
-                }
+          // `decompressResponse` wraps the response stream when it decompresses,
+          // so `response !== nativeResponse` indicates decompression happened.
+          const wasDecompressed = response !== nativeResponse;
+          this._responseSize =
+            Number(response.headers["content-length"]) || undefined;
+          this.response = typedResponse;
+          // eslint-disable-next-line @typescript-eslint/naming-convention
+          this._incrementalDecode = this._shouldIncrementallyDecodeBody()
+            ? {
+                decoder: new globalThis.TextDecoder("utf8", {
+                  ignoreBOM: true,
+                }),
+                chunks: [],
               }
-            }, true); // zalgooooooo
-          };
-          const start = entry;
-          return new Promise((res, rej) => {
-            walk(start, (er) => {
-              /* c8 ignore start */
-              if (er) return rej(er);
-              /* c8 ignore stop */
-              res(results);
-            });
+            : undefined;
+          // Publish response start event
+          publishResponseStart({
+            requestId: this._requestId,
+            url: typedResponse.url,
+            statusCode,
+            headers: response.headers,
+            isFromCache: typedResponse.isFromCache,
+          });
+          response.once("error", (error) => {
+            // Node synthesizes ECONNRESET for close-delimited responses after all body
+            // bytes have been delivered. Only ignore that late synthetic error on the
+            // native response. Wrapped decompression streams surface real checksum and
+            // truncation failures after the underlying response has completed.
+            if (
+              !wasDecompressed &&
+              response.complete &&
+              this._responseSize === undefined &&
+              error.code === "ECONNRESET"
+            ) {
+              return;
+            }
+            this._aborted = true;
+            this._beforeError(new ReadError(error, this));
           });
-        }
-        walkSync(entry = this.cwd, opts = {}) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
+          response.once("aborted", () => {
+            // Without Content-Length, connection close is the intended EOF signal (RFC 9110 §8.6),
+            // not a premature abort. For wrapped decompression streams, rely on the native
+            // response completion state because the wrapper strips `content-length`.
+            if (this._responseSize === undefined && nativeResponse.complete) {
+              return;
+            }
+            this._aborted = true;
+            // Check if there's a content-length mismatch to provide a more specific error
+            if (!this._checkContentLengthMismatch()) {
+              this._beforeError(
+                new ReadError(
+                  {
+                    name: "Error",
+                    message: "The server aborted pending request",
+                    code: "ECONNRESET",
+                  },
+                  this,
+                ),
+              );
+            }
+          });
+          let canFinalizeResponse = false;
+          const handleResponseEnd = () => {
+            if (!canFinalizeResponse || !response.readableEnded) {
+              return;
+            }
+            canFinalizeResponse = false;
+            if (this._stopReading) {
+              return;
+            }
+            // Validate content-length if it was provided
+            // Per RFC 9112: "If the sender closes the connection before the indicated number
+            // of octets are received, the recipient MUST consider the message to be incomplete"
+            if (this._checkContentLengthMismatch()) {
+              return;
+            }
+            this._responseSize = this._downloadedSize;
+            this.emit("downloadProgress", this.downloadProgress);
+            // Publish response end event
+            publishResponseEnd({
+              requestId: this._requestId,
+              url: typedResponse.url,
+              statusCode,
+              bodySize: this._downloadedSize,
+              timings: this.timings,
+            });
+            this.push(null);
+          };
+          if (!shouldFollowRedirect) {
+            // `set-cookie` handling below awaits the cookie jar. A fast response can fully
+            // end during that await, so we need to observe `end` early without completing
+            // the outward stream until cookie handling has finished.
+            response.once("end", handleResponseEnd);
+          }
+          const noPipeCookieJarRawBodyPromise =
+            this._noPipe &&
+            distribution.object(options.cookieJar) &&
+            !isRedirect
+              ? this._setRawBody(response)
+              : undefined;
+          const rawCookies = response.headers["set-cookie"];
+          if (distribution.object(options.cookieJar) && rawCookies) {
+            let promises = rawCookies.map(async (rawCookie) =>
+              options.cookieJar.setCookie(rawCookie, url.toString()),
+            );
+            if (options.ignoreInvalidCookies) {
+              promises = promises.map(async (promise) => {
+                try {
+                  await promise;
+                } catch {}
+              });
+            }
+            try {
+              await Promise.all(promises);
+            } catch (error) {
+              this._beforeError(normalizeError(error));
+              return;
+            }
           }
-          const {
-            withFileTypes = true,
-            follow = false,
-            filter,
-            walkFilter,
-          } = opts;
-          const results = [];
-          if (!filter || filter(entry)) {
-            results.push(withFileTypes ? entry : entry.fullpath());
+          // The above is running a promise, therefore we need to check if this request has been aborted yet again.
+          if (this.isAborted) {
+            return;
           }
-          const dirs = new Set([entry]);
-          for (const dir of dirs) {
-            const entries = dir.readdirSync();
-            for (const e of entries) {
-              if (!filter || filter(e)) {
-                results.push(withFileTypes ? e : e.fullpath());
+          if (shouldFollowRedirect) {
+            // We're being redirected, we don't care about the response.
+            // It'd be best to abort the request, but we can't because
+            // we would have to sacrifice the TCP connection. We don't want that.
+            response.resume();
+            this._cancelTimeouts?.();
+            this._unproxyEvents?.();
+            if (this.redirectUrls.length >= options.maxRedirects) {
+              this._beforeError(new MaxRedirectsError(this));
+              return;
+            }
+            this._request = undefined;
+            // Reset progress for the new request.
+            this._downloadedSize = 0;
+            this._uploadedSize = 0;
+            const updatedOptions = new Options(
+              undefined,
+              undefined,
+              this.options,
+            );
+            try {
+              // We need this in order to support UTF-8
+              const redirectBuffer = external_node_buffer_.Buffer.from(
+                redirectLocation,
+                "binary",
+              ).toString();
+              const redirectUrl = new URL(redirectBuffer, url);
+              const currentUnixSocketPath = getUnixSocketPath(url);
+              const redirectUnixSocketPath = getUnixSocketPath(redirectUrl);
+              if (
+                redirectUrl.protocol === "unix:" &&
+                redirectUnixSocketPath === undefined
+              ) {
+                this._beforeError(
+                  new RequestError("Cannot redirect to UNIX socket", {}, this),
+                );
+                return;
+              }
+              // Relative redirects on the same socket are fine, but a redirect must not switch to a different local socket.
+              if (
+                redirectUnixSocketPath !== undefined &&
+                currentUnixSocketPath !== redirectUnixSocketPath
+              ) {
+                this._beforeError(
+                  new RequestError("Cannot redirect to UNIX socket", {}, this),
+                );
+                return;
+              }
+              // Redirecting to a different site, clear sensitive data.
+              // For UNIX sockets, different socket paths are also different origins.
+              const isDifferentOrigin =
+                redirectUrl.origin !== url.origin ||
+                currentUnixSocketPath !== redirectUnixSocketPath;
+              const serverRequestedGet =
+                statusCode === 303 &&
+                updatedOptions.method !== "GET" &&
+                updatedOptions.method !== "HEAD";
+              // Avoid forwarding a POST body to a different origin on historical 301/302 redirects.
+              const crossOriginRequestedGet =
+                isDifferentOrigin &&
+                (statusCode === 301 || statusCode === 302) &&
+                updatedOptions.method === "POST";
+              const canRewrite = statusCode !== 307 && statusCode !== 308;
+              const userRequestedGet =
+                updatedOptions.methodRewriting && canRewrite;
+              const shouldDropBody =
+                serverRequestedGet ||
+                crossOriginRequestedGet ||
+                userRequestedGet;
+              if (shouldDropBody) {
+                updatedOptions.method = "GET";
+                this._dropBody(updatedOptions);
               }
-              let r = e;
-              if (e.isSymbolicLink()) {
-                if (!(follow && (r = e.realpathSync()))) continue;
-                if (r.isUnknown()) r.lstatSync();
+              if (isDifferentOrigin) {
+                // Also strip body on cross-origin redirects to prevent data leakage.
+                // 301/302 POST already drops the body (converted to GET above).
+                // 307/308 preserve the method per RFC, but the body must not be
+                // forwarded to a different origin.
+                // Strip credentials embedded in the redirect URL itself
+                // to prevent a malicious server from injecting auth to third parties.
+                this._stripCrossOriginState(
+                  updatedOptions,
+                  redirectUrl,
+                  shouldDropBody,
+                );
+              } else {
+                redirectUrl.username = updatedOptions.username;
+                redirectUrl.password = updatedOptions.password;
               }
-              if (r.shouldWalk(dirs, walkFilter)) {
-                dirs.add(r);
+              updatedOptions.url = redirectUrl;
+              this.redirectUrls.push(redirectUrl);
+              const preHookState = isDifferentOrigin
+                ? undefined
+                : {
+                    ...snapshotCrossOriginState(updatedOptions),
+                    url: new URL(updatedOptions.url),
+                  };
+              const changedState = await updatedOptions.trackStateMutations(
+                async (changedState) => {
+                  for (const hook of updatedOptions.hooks.beforeRedirect) {
+                    // eslint-disable-next-line no-await-in-loop
+                    await hook(updatedOptions, typedResponse);
+                  }
+                  return changedState;
+                },
+              );
+              updatedOptions.clearUnchangedCookieHeader(
+                preHookState,
+                changedState,
+              );
+              // If a beforeRedirect hook changed the URL to a different origin,
+              // strip sensitive headers that were preserved for the original origin.
+              // When isDifferentOrigin was already true, headers were already stripped above.
+              if (!isDifferentOrigin) {
+                const state = preHookState;
+                const hookUrl = updatedOptions.url;
+                if (!isSameOrigin(state.url, hookUrl)) {
+                  this._stripUnchangedCrossOriginState(
+                    updatedOptions,
+                    hookUrl,
+                    shouldDropBody,
+                    {
+                      ...state,
+                      changedState,
+                      preserveUsername:
+                        hasExplicitCredentialInUrlChange(
+                          changedState,
+                          hookUrl,
+                          "username",
+                        ) ||
+                        isCrossOriginCredentialChanged(
+                          state.url,
+                          hookUrl,
+                          "username",
+                        ),
+                      preservePassword:
+                        hasExplicitCredentialInUrlChange(
+                          changedState,
+                          hookUrl,
+                          "password",
+                        ) ||
+                        isCrossOriginCredentialChanged(
+                          state.url,
+                          hookUrl,
+                          "password",
+                        ),
+                    },
+                  );
+                }
               }
+              // Publish redirect event
+              publishRedirect({
+                requestId: this._requestId,
+                fromUrl: url.toString(),
+                toUrl: updatedOptions.url.toString(),
+                statusCode,
+              });
+              this.emit("redirect", updatedOptions, typedResponse);
+              this.options = updatedOptions;
+              await this._makeRequest();
+            } catch (error) {
+              this._beforeError(normalizeError(error));
+              return;
             }
+            return;
           }
-          return results;
-        }
-        /**
-         * Support for `for await`
-         *
-         * Alias for {@link PathScurryBase.iterate}
-         *
-         * Note: As of Node 19, this is very slow, compared to other methods of
-         * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
-         * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
-         */
-        [Symbol.asyncIterator]() {
-          return this.iterate();
-        }
-        iterate(entry = this.cwd, options = {}) {
-          // iterating async over the stream is significantly more performant,
-          // especially in the warm-cache scenario, because it buffers up directory
-          // entries in the background instead of waiting for a yield for each one.
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            options = entry;
-            entry = this.cwd;
-          }
-          return this.stream(entry, options)[Symbol.asyncIterator]();
-        }
-        /**
-         * Iterating over a PathScurry performs a synchronous walk.
-         *
-         * Alias for {@link PathScurryBase.iterateSync}
-         */
-        [Symbol.iterator]() {
-          return this.iterateSync();
-        }
-        *iterateSync(entry = this.cwd, opts = {}) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-          }
-          const {
-            withFileTypes = true,
-            follow = false,
-            filter,
-            walkFilter,
-          } = opts;
-          if (!filter || filter(entry)) {
-            yield withFileTypes ? entry : entry.fullpath();
+          canFinalizeResponse = true;
+          handleResponseEnd();
+          // `HTTPError`s always have `error.response.body` defined.
+          // Therefore, we cannot retry if `options.throwHttpErrors` is false.
+          // On the last retry, if `options.throwHttpErrors` is false, we would need to return the body,
+          // but that wouldn't be possible since the body would be already read in `error.response.body`.
+          if (
+            options.isStream &&
+            options.throwHttpErrors &&
+            !isResponseOk(typedResponse)
+          ) {
+            this._beforeError(new HTTPError(typedResponse));
+            return;
           }
-          const dirs = new Set([entry]);
-          for (const dir of dirs) {
-            const entries = dir.readdirSync();
-            for (const e of entries) {
-              if (!filter || filter(e)) {
-                yield withFileTypes ? e : e.fullpath();
-              }
-              let r = e;
-              if (e.isSymbolicLink()) {
-                if (!(follow && (r = e.realpathSync()))) continue;
-                if (r.isUnknown()) r.lstatSync();
-              }
-              if (r.shouldWalk(dirs, walkFilter)) {
-                dirs.add(r);
+          // Store the expected content-length from the native response for validation.
+          // This is the content-length before decompression, which is what actually gets transferred.
+          // Skip storing for responses that shouldn't have bodies per RFC 9110.
+          // When decompression occurs, only store if strictContentLength is enabled.
+          if (!hasNoBody && (!wasDecompressed || options.strictContentLength)) {
+            const contentLengthHeader =
+              nativeResponse.headers["content-length"];
+            if (contentLengthHeader !== undefined) {
+              const expectedLength = Number(contentLengthHeader);
+              if (!Number.isNaN(expectedLength) && expectedLength >= 0) {
+                this._expectedContentLength = expectedLength;
               }
             }
           }
-        }
-        stream(entry = this.cwd, opts = {}) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
+          this.emit("downloadProgress", this.downloadProgress);
+          response.on("readable", () => {
+            if (this._triggerRead) {
+              this._read();
+            }
+          });
+          this.on("resume", () => {
+            response.resume();
+          });
+          this.on("pause", () => {
+            response.pause();
+          });
+          if (this._noPipe) {
+            const captureFromResponse =
+              response.readableEnded ||
+              noPipeCookieJarRawBodyPromise !== undefined;
+            const success = noPipeCookieJarRawBodyPromise
+              ? await noPipeCookieJarRawBodyPromise
+              : await this._setRawBody(captureFromResponse ? response : this);
+            if (captureFromResponse) {
+              handleResponseEnd();
+            }
+            if (success) {
+              this.emit("response", response);
+            }
+            return;
           }
-          const {
-            withFileTypes = true,
-            follow = false,
-            filter,
-            walkFilter,
-          } = opts;
-          const results = new minipass_1.default({ objectMode: true });
-          if (!filter || filter(entry)) {
-            results.write(withFileTypes ? entry : entry.fullpath());
-          }
-          const dirs = new Set();
-          const queue = [entry];
-          let processing = 0;
-          const process = () => {
-            let paused = false;
-            while (!paused) {
-              const dir = queue.shift();
-              if (!dir) {
-                if (processing === 0) results.end();
-                return;
-              }
-              processing++;
-              dirs.add(dir);
-              const onReaddir = (er, entries, didRealpaths = false) => {
-                /* c8 ignore start */
-                if (er) return results.emit("error", er);
-                /* c8 ignore stop */
-                if (follow && !didRealpaths) {
-                  const promises = [];
-                  for (const e of entries) {
-                    if (e.isSymbolicLink()) {
-                      promises.push(
-                        e
-                          .realpath()
-                          .then((r) => (r?.isUnknown() ? r.lstat() : r))
-                      );
-                    }
-                  }
-                  if (promises.length) {
-                    Promise.all(promises).then(() =>
-                      onReaddir(null, entries, true)
-                    );
-                    return;
-                  }
-                }
-                for (const e of entries) {
-                  if (e && (!filter || filter(e))) {
-                    if (!results.write(withFileTypes ? e : e.fullpath())) {
-                      paused = true;
-                    }
-                  }
-                }
-                processing--;
-                for (const e of entries) {
-                  const r = e.realpathCached() || e;
-                  if (r.shouldWalk(dirs, walkFilter)) {
-                    queue.push(r);
-                  }
+          this.emit("response", response);
+          for (const destination of this._pipedServerResponses) {
+            if (destination.headersSent) {
+              continue;
+            }
+            for (const key in response.headers) {
+              if (Object.hasOwn(response.headers, key)) {
+                const value = response.headers[key];
+                // When decompression occurred, skip content-encoding and content-length
+                // as they refer to the compressed data, not the decompressed stream.
+                if (
+                  wasDecompressed &&
+                  (key === "content-encoding" || key === "content-length")
+                ) {
+                  continue;
                 }
-                if (paused && !results.flowing) {
-                  results.once("drain", process);
-                } else if (!sync) {
-                  process();
+                // Skip if value is undefined
+                if (value !== undefined) {
+                  destination.setHeader(key, value);
                 }
-              };
-              // zalgo containment
-              let sync = true;
-              dir.readdirCB(onReaddir, true);
-              sync = false;
+              }
             }
-          };
-          process();
-          return results;
-        }
-        streamSync(entry = this.cwd, opts = {}) {
-          if (typeof entry === "string") {
-            entry = this.cwd.resolve(entry);
-          } else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
+            destination.statusCode = statusCode;
           }
-          const {
-            withFileTypes = true,
-            follow = false,
-            filter,
-            walkFilter,
-          } = opts;
-          const results = new minipass_1.default({ objectMode: true });
-          const dirs = new Set();
-          if (!filter || filter(entry)) {
-            results.write(withFileTypes ? entry : entry.fullpath());
-          }
-          const queue = [entry];
-          let processing = 0;
-          const process = () => {
-            let paused = false;
-            while (!paused) {
-              const dir = queue.shift();
-              if (!dir) {
-                if (processing === 0) results.end();
-                return;
+        }
+        async _setRawBody(from = this) {
+          try {
+            // Errors are emitted via the `error` event
+            const fromArray = await from.toArray();
+            const hasNonStringChunk = fromArray.some(
+              (chunk) => typeof chunk !== "string",
+            );
+            const rawBody = hasNonStringChunk
+              ? concatUint8Arrays(
+                  fromArray.map((chunk) =>
+                    typeof chunk === "string"
+                      ? stringToUint8Array(chunk)
+                      : chunk,
+                  ),
+                )
+              : stringToUint8Array(fromArray.join(""));
+            const shouldUseIncrementalDecodedBody =
+              from === this && this._incrementalDecode !== undefined;
+            // On retry Request is destroyed with no error, therefore the above will successfully resolve.
+            // So in order to check if this was really successful, we need to check if it has been properly ended.
+            if (!this.isAborted && this.response) {
+              this.response.rawBody = rawBody;
+              if (from !== this) {
+                this._downloadedSize = rawBody.byteLength;
               }
-              processing++;
-              dirs.add(dir);
-              const entries = dir.readdirSync();
-              for (const e of entries) {
-                if (!filter || filter(e)) {
-                  if (!results.write(withFileTypes ? e : e.fullpath())) {
-                    paused = true;
+              if (shouldUseIncrementalDecodedBody) {
+                try {
+                  const { decoder, chunks } = this._incrementalDecode;
+                  const finalDecodedChunk = decoder.decode();
+                  if (finalDecodedChunk.length > 0) {
+                    chunks.push(finalDecodedChunk);
                   }
-                }
-              }
-              processing--;
-              for (const e of entries) {
-                let r = e;
-                if (e.isSymbolicLink()) {
-                  if (!(follow && (r = e.realpathSync()))) continue;
-                  if (r.isUnknown()) r.lstatSync();
-                }
-                if (r.shouldWalk(dirs, walkFilter)) {
-                  queue.push(r);
-                }
+                  cacheDecodedBody(this.response, chunks.join(""));
+                } catch {}
               }
+              return true;
             }
-            if (paused && !results.flowing) results.once("drain", process);
-          };
-          process();
-          return results;
-        }
-      }
-      exports.PathScurryBase = PathScurryBase;
-      /**
-       * Windows implementation of {@link PathScurryBase}
-       *
-       * Defaults to case insensitve, uses `'\\'` to generate path strings.  Uses
-       * {@link PathWin32} for Path objects.
-       */
-      class PathScurryWin32 extends PathScurryBase {
-        /**
-         * separator for generating path strings
-         */
-        sep = "\\";
-        constructor(cwd = process.cwd(), opts = {}) {
-          const { nocase = true } = opts;
-          super(cwd, path_1.win32, "\\", { ...opts, nocase });
-          this.nocase = nocase;
-          for (let p = this.cwd; p; p = p.parent) {
-            p.nocase = this.nocase;
+          } catch {
+          } finally {
+            this._incrementalDecode = undefined;
           }
+          return false;
         }
-        /**
-         * @internal
-         */
-        parseRootPath(dir) {
-          // if the path starts with a single separator, it's not a UNC, and we'll
-          // just get separator as the root, and driveFromUNC will return \
-          // In that case, mount \ on the root from the cwd.
-          return path_1.win32.parse(dir).root.toUpperCase();
+        async _onResponse(response) {
+          try {
+            await this._onResponseBase(response);
+          } catch (error) {
+            /* istanbul ignore next: better safe than sorry */
+            this._beforeError(normalizeError(error));
+          }
         }
-        /**
-         * @internal
-         */
-        newRoot(fs) {
-          return new PathWin32(
-            this.rootPath,
-            IFDIR,
-            undefined,
-            this.roots,
-            this.nocase,
-            this.childrenCache(),
-            { fs }
+        _onRequest(request) {
+          const { options } = this;
+          const { timeout, url } = options;
+          // Publish request start event
+          publishRequestStart({
+            requestId: this._requestId,
+            url: getSanitizedUrl(this.options),
+            method: options.method,
+            headers: options.headers,
+          });
+          utils_timer(request);
+          this._cancelTimeouts = timedOut(request, timeout, url);
+          if (this.options.http2) {
+            // Unset stream timeout, as the `timeout` option was used only for connection timeout.
+            // We remove all 'timeout' listeners instead of calling setTimeout(0) because:
+            // 1. setTimeout(0) causes a memory leak (see https://github.com/sindresorhus/got/issues/690)
+            // 2. With HTTP/2 connection reuse, setTimeout(0) accumulates listeners on the socket
+            // 3. removeAllListeners('timeout') properly cleans up without the memory leak
+            request.removeAllListeners("timeout");
+            // For HTTP/2, wait for socket and remove timeout listeners from it
+            request.once("socket", (socket) => {
+              socket.removeAllListeners("timeout");
+            });
+          }
+          let lastRequestError;
+          const responseEventName = options.cache
+            ? "cacheableResponse"
+            : "response";
+          request.once(responseEventName, (response) => {
+            void this._onResponse(response);
+          });
+          const emitRequestError = (error) => {
+            this._aborted = true;
+            // Force clean-up, because some packages (e.g. nock) don't do this.
+            request.destroy();
+            const wrappedError =
+              error instanceof timed_out_TimeoutError
+                ? new TimeoutError(error, this.timings, this)
+                : new RequestError(error.message, error, this);
+            this._beforeError(wrappedError);
+          };
+          request.once("error", (error) => {
+            lastRequestError = error;
+            // Ignore errors from requests superseded by a redirect.
+            if (this._request !== request) {
+              return;
+            }
+            /*
+            Transient write errors (EPIPE, ECONNRESET) often fire during redirects when the
+            server closes the connection after sending the redirect response. Defer by one
+            microtask to let the response event make the request stale.
+            */
+            if (isTransientWriteError(error)) {
+              queueMicrotask(() => {
+                if (this._isRequestStale(request)) {
+                  return;
+                }
+                emitRequestError(error);
+              });
+              return;
+            }
+            emitRequestError(error);
+          });
+          if (!options.cache) {
+            request.once("close", () => {
+              if (
+                this._request !== request ||
+                Boolean(request.res) ||
+                this._stopReading
+              ) {
+                return;
+              }
+              this._beforeError(
+                lastRequestError ??
+                  new ReadError(
+                    {
+                      name: "Error",
+                      message: "The server aborted pending request",
+                      code: "ECONNRESET",
+                    },
+                    this,
+                  ),
+              );
+            });
+          }
+          this._unproxyEvents = proxyEvents(
+            request,
+            this,
+            proxiedRequestEvents,
           );
+          this._request = request;
+          this.emit("uploadProgress", this.uploadProgress);
+          this._sendBody();
+          this.emit("request", request);
         }
-        /**
-         * Return true if the provided path string is an absolute path
-         */
-        isAbsolute(p) {
+        _isRequestStale(request) {
           return (
-            p.startsWith("/") || p.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(p)
-          );
-        }
-      }
-      exports.PathScurryWin32 = PathScurryWin32;
-      /**
-       * {@link PathScurryBase} implementation for all posix systems other than Darwin.
-       *
-       * Defaults to case-sensitive matching, uses `'/'` to generate path strings.
-       *
-       * Uses {@link PathPosix} for Path objects.
-       */
-      class PathScurryPosix extends PathScurryBase {
-        /**
-         * separator for generating path strings
-         */
-        sep = "/";
-        constructor(cwd = process.cwd(), opts = {}) {
-          const { nocase = false } = opts;
-          super(cwd, path_1.posix, "/", { ...opts, nocase });
-          this.nocase = nocase;
-        }
-        /**
-         * @internal
-         */
-        parseRootPath(_dir) {
-          return "/";
-        }
-        /**
-         * @internal
-         */
-        newRoot(fs) {
-          return new PathPosix(
-            this.rootPath,
-            IFDIR,
-            undefined,
-            this.roots,
-            this.nocase,
-            this.childrenCache(),
-            { fs }
+            this._request !== request ||
+            Boolean(request.res) ||
+            request.destroyed ||
+            request.writableEnded
           );
         }
-        /**
-         * Return true if the provided path string is an absolute path
-         */
-        isAbsolute(p) {
-          return p.startsWith("/");
-        }
-      }
-      exports.PathScurryPosix = PathScurryPosix;
-      /**
-       * {@link PathScurryBase} implementation for Darwin (macOS) systems.
-       *
-       * Defaults to case-insensitive matching, uses `'/'` for generating path
-       * strings.
-       *
-       * Uses {@link PathPosix} for Path objects.
-       */
-      class PathScurryDarwin extends PathScurryPosix {
-        constructor(cwd = process.cwd(), opts = {}) {
-          const { nocase = true } = opts;
-          super(cwd, { ...opts, nocase });
-        }
-      }
-      exports.PathScurryDarwin = PathScurryDarwin;
-      /**
-       * Default {@link PathBase} implementation for the current platform.
-       *
-       * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.
-       */
-      exports.Path = process.platform === "win32" ? PathWin32 : PathPosix;
-      /**
-       * Default {@link PathScurryBase} implementation for the current platform.
-       *
-       * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
-       * Darwin (macOS) systems, {@link PathScurryPosix} on all others.
-       */
-      exports.PathScurry =
-        process.platform === "win32"
-          ? PathScurryWin32
-          : process.platform === "darwin"
-          ? PathScurryDarwin
-          : PathScurryPosix;
-      //# sourceMappingURL=index.js.map
-
-      /***/
-    },
-
-    /***/ 758: /***/ (module) => {
-      const perf =
-        typeof performance === "object" &&
-        performance &&
-        typeof performance.now === "function"
-          ? performance
-          : Date;
-
-      const hasAbortController = typeof AbortController === "function";
-
-      // minimal backwards-compatibility polyfill
-      // this doesn't have nearly all the checks and whatnot that
-      // actual AbortController/Signal has, but it's enough for
-      // our purposes, and if used properly, behaves the same.
-      const AC = hasAbortController
-        ? AbortController
-        : class AbortController {
-            constructor() {
-              this.signal = new AS();
-            }
-            abort(reason = new Error("This operation was aborted")) {
-              this.signal.reason = this.signal.reason || reason;
-              this.signal.aborted = true;
-              this.signal.dispatchEvent({
-                type: "abort",
-                target: this.signal,
+        async _asyncWrite(chunk, request = this) {
+          return new Promise((resolve, reject) => {
+            if (request === this) {
+              super.write(chunk, (error) => {
+                if (error) {
+                  reject(error);
+                  return;
+                }
+                resolve();
               });
+              return;
             }
-          };
-
-      const hasAbortSignal = typeof AbortSignal === "function";
-      // Some polyfills put this on the AC class, not global
-      const hasACAbortSignal = typeof AC.AbortSignal === "function";
-      const AS = hasAbortSignal
-        ? AbortSignal
-        : hasACAbortSignal
-        ? AC.AbortController
-        : class AbortSignal {
-            constructor() {
-              this.reason = undefined;
-              this.aborted = false;
-              this._listeners = [];
-            }
-            dispatchEvent(e) {
-              if (e.type === "abort") {
-                this.aborted = true;
-                this.onabort(e);
-                this._listeners.forEach((f) => f(e), this);
+            this._writeRequest(
+              chunk,
+              undefined,
+              (error) => {
+                if (error) {
+                  reject(error);
+                  return;
+                }
+                resolve();
+              },
+              request,
+            );
+          });
+        }
+        _sendBody() {
+          // Send body
+          const { body } = this.options;
+          const currentRequest =
+            this.redirectUrls.length === 0 ? this : (this._request ?? this);
+          if (distribution.nodeStream(body)) {
+            body.pipe(currentRequest);
+          } else if (distribution.buffer(body)) {
+            // Buffer should be sent directly without conversion
+            this._writeBodyInChunks(body, currentRequest);
+          } else if (distribution.typedArray(body)) {
+            // Typed arrays should be treated like buffers, not iterated over
+            // Create a Uint8Array view over the data (Node.js streams accept Uint8Array)
+            const typedArray = body;
+            const uint8View = new Uint8Array(
+              typedArray.buffer,
+              typedArray.byteOffset,
+              typedArray.byteLength,
+            );
+            this._writeBodyInChunks(uint8View, currentRequest);
+          } else if (
+            distribution.asyncIterable(body) ||
+            (distribution.iterable(body) &&
+              !distribution.string(body) &&
+              !isBuffer(body))
+          ) {
+            (async () => {
+              const isInitialRequest = currentRequest === this;
+              try {
+                for await (const chunk of body) {
+                  if (this.options.body !== body) {
+                    return;
+                  }
+                  await this._asyncWrite(chunk, currentRequest);
+                  if (this.options.body !== body) {
+                    return;
+                  }
+                }
+                if (this.options.body === body) {
+                  if (isInitialRequest) {
+                    super.end();
+                    return;
+                  }
+                  await this._endWritableRequest(currentRequest);
+                }
+              } catch (error) {
+                if (this.options.body !== body) {
+                  return;
+                }
+                this._beforeError(normalizeError(error));
               }
+            })();
+          } else if (distribution.undefined(body)) {
+            // No body to send, end the request
+            const cannotHaveBody =
+              methodsWithoutBody.has(this.options.method) &&
+              !(this.options.method === "GET" && this.options.allowGetBody);
+            if (
+              (this._noPipe ?? false) ||
+              cannotHaveBody ||
+              currentRequest !== this
+            ) {
+              currentRequest.end();
             }
-            onabort() {}
-            addEventListener(ev, fn) {
-              if (ev === "abort") {
-                this._listeners.push(fn);
+          } else {
+            // Handles string bodies (from json/form options).
+            this._writeBodyInChunks(stringToUint8Array(body), currentRequest);
+          }
+        }
+        /*
+    Write a body buffer in chunks to enable granular `uploadProgress` events.
+
+    Without chunking, string/Uint8Array/TypedArray bodies are written in a single call, causing `uploadProgress` to only emit 0% and 100% with nothing in between.
+
+    The 64 KB chunk size matches Node.js fs stream defaults.
+    */
+        _writeBodyInChunks(buffer, currentRequest) {
+          const isInitialRequest = currentRequest === this;
+          (async () => {
+            let request;
+            try {
+              request = isInitialRequest ? this._request : currentRequest;
+              const activeRequest = request;
+              if (!activeRequest) {
+                if (isInitialRequest) {
+                  super.end();
+                }
+                return;
               }
-            }
-            removeEventListener(ev, fn) {
-              if (ev === "abort") {
-                this._listeners = this._listeners.filter((f) => f !== fn);
+              if (activeRequest.destroyed) {
+                return;
+              }
+              await this._writeChunksToRequest(buffer, activeRequest);
+              if (this._isRequestStale(activeRequest)) {
+                this._finalizeStaleChunkedWrite(
+                  activeRequest,
+                  isInitialRequest,
+                );
+                return;
+              }
+              if (isInitialRequest) {
+                super.end();
+                return;
+              }
+              await this._endWritableRequest(activeRequest);
+            } catch (error) {
+              const normalizedError = normalizeError(error);
+              // Transient write errors (EPIPE, ECONNRESET) are handled by the request-level
+              // error and close handlers. For initial redirected writes, still finalize
+              // writable state once the stale transition becomes observable.
+              if (isTransientWriteError(normalizedError)) {
+                if (isInitialRequest && request) {
+                  const initialRequest = request;
+                  let didFinalize = false;
+                  const finalizeIfStale = () => {
+                    if (didFinalize || !this._isRequestStale(initialRequest)) {
+                      return;
+                    }
+                    didFinalize = true;
+                    this._finalizeStaleChunkedWrite(initialRequest, true);
+                  };
+                  finalizeIfStale();
+                  if (!didFinalize) {
+                    initialRequest.once("response", finalizeIfStale);
+                    queueMicrotask(finalizeIfStale);
+                  }
+                }
+                return;
+              }
+              if (!isInitialRequest && this._isRequestStale(currentRequest)) {
+                return;
               }
+              this._beforeError(normalizedError);
             }
-          };
-
-      const warned = new Set();
-      const deprecatedOption = (opt, instead) => {
-        const code = `LRU_CACHE_OPTION_${opt}`;
-        if (shouldWarn(code)) {
-          warn(code, `${opt} option`, `options.${instead}`, LRUCache);
+          })();
         }
-      };
-      const deprecatedMethod = (method, instead) => {
-        const code = `LRU_CACHE_METHOD_${method}`;
-        if (shouldWarn(code)) {
-          const { prototype } = LRUCache;
-          const { get } = Object.getOwnPropertyDescriptor(prototype, method);
-          warn(code, `${method} method`, `cache.${instead}()`, get);
+        _finalizeStaleChunkedWrite(request, isInitialRequest) {
+          if (!request.destroyed && !request.writableEnded) {
+            request.destroy();
+          }
+          if (isInitialRequest) {
+            // Finalize writable state without ending the active redirected request.
+            this._skipRequestEndInFinal = true;
+            super.end();
+          }
         }
-      };
-      const deprecatedProperty = (field, instead) => {
-        const code = `LRU_CACHE_PROPERTY_${field}`;
-        if (shouldWarn(code)) {
-          const { prototype } = LRUCache;
-          const { get } = Object.getOwnPropertyDescriptor(prototype, field);
-          warn(code, `${field} property`, `cache.${instead}`, get);
+        _emitUploadComplete(request) {
+          this._bodySize = this._uploadedSize;
+          this.emit("uploadProgress", this.uploadProgress);
+          request.emit("upload-complete");
         }
-      };
-
-      const emitWarning = (...a) => {
-        typeof process === "object" &&
-        process &&
-        typeof process.emitWarning === "function"
-          ? process.emitWarning(...a)
-          : console.error(...a);
-      };
-
-      const shouldWarn = (code) => !warned.has(code);
-
-      const warn = (code, what, instead, fn) => {
-        warned.add(code);
-        const msg = `The ${what} is deprecated. Please use ${instead} instead.`;
-        emitWarning(msg, "DeprecationWarning", code, fn);
-      };
-
-      const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
-
-      /* istanbul ignore next - 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;
-
-      class ZeroArray extends Array {
-        constructor(size) {
-          super(size);
-          this.fill(0);
+        async _endWritableRequest(request) {
+          await new Promise((resolve, reject) => {
+            request.end((error) => {
+              if (error) {
+                reject(error);
+                return;
+              }
+              if (this._request === request && !request.destroyed) {
+                this._emitUploadComplete(request);
+              }
+              resolve();
+            });
+          });
         }
-      }
-
-      class Stack {
-        constructor(max) {
-          if (max === 0) {
-            return [];
+        _stripCrossOriginState(options, urlToClear, bodyAlreadyDropped) {
+          for (const header of crossOriginStripHeaders) {
+            options.deleteInternalHeader(header);
+          }
+          options.username = "";
+          options.password = "";
+          urlToClear.username = "";
+          urlToClear.password = "";
+          if (!bodyAlreadyDropped) {
+            this._dropBody(options);
           }
-          const UintArray = getUintArray(max);
-          this.heap = new UintArray(max);
-          this.length = 0;
-        }
-        push(n) {
-          this.heap[this.length++] = n;
-        }
-        pop() {
-          return this.heap[--this.length];
         }
-      }
-
-      class LRUCache {
-        constructor(options = {}) {
-          const {
-            max = 0,
-            ttl,
-            ttlResolution = 1,
-            ttlAutopurge,
-            updateAgeOnGet,
-            updateAgeOnHas,
-            allowStale,
-            dispose,
-            disposeAfter,
-            noDisposeOnSet,
-            noUpdateTTL,
-            maxSize = 0,
-            maxEntrySize = 0,
-            sizeCalculation,
-            fetchMethod,
-            fetchContext,
-            noDeleteOnFetchRejection,
-            noDeleteOnStaleGet,
-            allowStaleOnFetchRejection,
-            allowStaleOnFetchAbort,
-            ignoreFetchAbort,
-          } = options;
-
-          // deprecated options, don't trigger a warning for getting them if
-          // the thing being passed in is another LRUCache we're copying.
-          const { length, maxAge, stale } =
-            options instanceof LRUCache ? {} : options;
-
-          if (max !== 0 && !isPosInt(max)) {
-            throw new TypeError("max option must be a nonnegative integer");
-          }
-
-          const UintArray = max ? getUintArray(max) : Array;
-          if (!UintArray) {
-            throw new Error("invalid max value: " + max);
-          }
-
-          this.max = max;
-          this.maxSize = maxSize;
-          this.maxEntrySize = maxEntrySize || this.maxSize;
-          this.sizeCalculation = sizeCalculation || length;
-          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");
+        _stripUnchangedCrossOriginState(
+          options,
+          urlToClear,
+          bodyAlreadyDropped,
+          state,
+        ) {
+          const headers = options.getInternalHeaders();
+          for (const header of crossOriginStripHeaders) {
+            if (
+              !state.changedState.has(header) &&
+              headers[header] === state.headers[header]
+            ) {
+              options.deleteInternalHeader(header);
             }
           }
-
-          this.fetchMethod = fetchMethod || null;
-          if (this.fetchMethod && typeof this.fetchMethod !== "function") {
-            throw new TypeError("fetchMethod must be a function if specified");
+          if (!state.preserveUsername) {
+            options.username = "";
+            urlToClear.username = "";
           }
-
-          this.fetchContext = fetchContext;
-          if (!this.fetchMethod && fetchContext !== undefined) {
-            throw new TypeError("cannot set fetchContext without fetchMethod");
+          if (!state.preservePassword) {
+            options.password = "";
+            urlToClear.password = "";
           }
-
-          this.keyMap = new Map();
-          this.keyList = new Array(max).fill(null);
-          this.valList = new Array(max).fill(null);
-          this.next = new UintArray(max);
-          this.prev = new UintArray(max);
-          this.head = 0;
-          this.tail = 0;
-          this.free = new Stack(max);
-          this.initialFill = 1;
-          this.size = 0;
-
-          if (typeof dispose === "function") {
-            this.dispose = dispose;
+          if (
+            !bodyAlreadyDropped &&
+            !state.changedState.has("body") &&
+            !state.changedState.has("json") &&
+            !state.changedState.has("form") &&
+            isBodyUnchanged(options, state)
+          ) {
+            this._dropBody(options);
+          }
+        }
+        _dropBody(updatedOptions) {
+          const { body } = this.options;
+          const hadOptionBody =
+            !distribution.undefined(body) ||
+            !distribution.undefined(this.options.json) ||
+            !distribution.undefined(this.options.form);
+          this.options.clearBody();
+          if (distribution.nodeStream(body)) {
+            body.off("error", this._onBodyError);
+            body.unpipe();
+            body.on("error", core_noop);
+            body.destroy();
+          } else if (
+            distribution.asyncIterable(body) ||
+            (distribution.iterable(body) &&
+              !distribution.string(body) &&
+              !isBuffer(body))
+          ) {
+            const iterableBody = body;
+            // Signal the iterator to clean up, but don't await it:
+            // the for-await loop in _sendBody exits via the options.body sentinel,
+            // and awaiting return() would deadlock when next() is pending.
+            if (typeof iterableBody.return === "function") {
+              try {
+                const result = iterableBody.return();
+                if (result instanceof Promise) {
+                  // eslint-disable-next-line promise/prefer-await-to-then
+                  result.catch(core_noop);
+                }
+              } catch {}
+            }
+          } else if (!hadOptionBody && !this.writableEnded) {
+            this._skipRequestEndInFinal = true;
+            super.end();
           }
-          if (typeof disposeAfter === "function") {
-            this.disposeAfter = disposeAfter;
-            this.disposed = [];
+          updatedOptions.clearBody();
+          this._bodySize = undefined;
+        }
+        _onBodyError = (error) => {
+          if (this._flushed) {
+            this._beforeError(new UploadError(error, this));
           } else {
-            this.disposeAfter = null;
-            this.disposed = null;
-          }
-          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"
-                );
-              }
+            this.flush = async () => {
+              this.flush = async () => {};
+              this._beforeError(new UploadError(error, this));
+            };
+          }
+        };
+        async _writeChunksToRequest(buffer, request) {
+          const chunkSize = 65_536; // 64 KB
+          const isStale = () => this._isRequestStale(request);
+          for (const part of chunk(buffer, chunkSize)) {
+            if (isStale()) {
+              return;
             }
-            if (!isPosInt(this.maxEntrySize)) {
-              throw new TypeError(
-                "maxEntrySize must be a positive integer if specified"
+            // eslint-disable-next-line no-await-in-loop
+            await new Promise((resolve, reject) => {
+              this._writeRequest(
+                part,
+                undefined,
+                (error) => {
+                  if (isStale()) {
+                    resolve();
+                    return;
+                  }
+                  if (error) {
+                    reject(error);
+                  } else {
+                    setImmediate(resolve);
+                  }
+                },
+                request,
               );
-            }
-            this.initializeSizeTracking();
+            });
           }
-
-          this.allowStale = !!allowStale || !!stale;
-          this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
-          this.updateAgeOnGet = !!updateAgeOnGet;
-          this.updateAgeOnHas = !!updateAgeOnHas;
-          this.ttlResolution =
-            isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
-          this.ttlAutopurge = !!ttlAutopurge;
-          this.ttl = ttl || maxAge || 0;
-          if (this.ttl) {
-            if (!isPosInt(this.ttl)) {
-              throw new TypeError(
-                "ttl must be a positive integer if specified"
-              );
-            }
-            this.initializeTTLTracking();
+        }
+        _prepareCache(cache) {
+          if (cacheableStore.has(cache)) {
+            return;
           }
-
-          // 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"
+          const cacheableRequest = new dist((requestOptions, handler) => {
+            /**
+            Wraps the cacheable-request handler to run beforeCache hooks.
+            These hooks control caching behavior by:
+            - Directly mutating the response object (changes apply to what gets cached)
+            - Returning `false` to prevent caching
+            - Returning `void`/`undefined` to use default caching behavior
+
+            Hooks use direct mutation - they can modify response.headers, response.statusCode, etc.
+            Mutations take effect immediately and determine what gets cached.
+            */
+            const wrappedHandler = handler
+              ? (response) => {
+                  const { beforeCacheHooks, gotRequest } = requestOptions;
+                  // Early return if no hooks - cache the original response
+                  if (!beforeCacheHooks || beforeCacheHooks.length === 0) {
+                    handler(response);
+                    return;
+                  }
+                  try {
+                    // Call each beforeCache hook with the response
+                    // Hooks can directly mutate the response - mutations take effect immediately
+                    for (const hook of beforeCacheHooks) {
+                      const result = hook(response);
+                      if (result === false) {
+                        // Prevent caching by adding no-cache headers
+                        // Mutate the response directly to add headers
+                        response.headers["cache-control"] =
+                          "no-cache, no-store, must-revalidate";
+                        response.headers.pragma = "no-cache";
+                        response.headers.expires = "0";
+                        handler(response);
+                        // Don't call remaining hooks - we've decided not to cache
+                        return;
+                      }
+                      if (distribution.promise(result)) {
+                        // BeforeCache hooks must be synchronous because cacheable-request's handler is synchronous
+                        throw new TypeError(
+                          "beforeCache hooks must be synchronous. The hook returned a Promise, but this hook must return synchronously. If you need async logic, use beforeRequest hook instead.",
+                        );
+                      }
+                      if (result !== undefined) {
+                        // Hooks should return false or undefined only
+                        // Mutations work directly - no need to return the response
+                        throw new TypeError(
+                          "beforeCache hook must return false or undefined. To modify the response, mutate it directly.",
+                        );
+                      }
+                      // Else: void/undefined = continue
+                    }
+                  } catch (error) {
+                    const normalizedError = normalizeError(error);
+                    // Convert hook errors to RequestError and propagate
+                    // This is consistent with how other hooks handle errors
+                    if (gotRequest) {
+                      gotRequest._beforeError(
+                        normalizedError instanceof RequestError
+                          ? normalizedError
+                          : new RequestError(
+                              normalizedError.message,
+                              normalizedError,
+                              gotRequest,
+                            ),
+                      );
+                      // Don't call handler when error was propagated successfully
+                      return;
+                    }
+                    // If gotRequest is missing, log the error to aid debugging
+                    // We still call the handler to prevent the request from hanging
+                    console.error(
+                      "Got: beforeCache hook error (request context unavailable):",
+                      normalizedError,
+                    );
+                    // Call handler with response (potentially partially modified)
+                    handler(response);
+                    return;
+                  }
+                  // All hooks ran successfully
+                  // Cache the response with any mutations applied
+                  handler(response);
+                }
+              : handler;
+            const result = requestOptions._request(
+              requestOptions,
+              wrappedHandler,
             );
-          }
-          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 (stale) {
-            deprecatedOption("stale", "allowStale");
-          }
-          if (maxAge) {
-            deprecatedOption("maxAge", "ttl");
-          }
-          if (length) {
-            deprecatedOption("length", "sizeCalculation");
-          }
-        }
-
-        getRemainingTTL(key) {
-          return this.has(key, { updateAgeOnHas: false }) ? Infinity : 0;
-        }
-
-        initializeTTLTracking() {
-          this.ttls = new ZeroArray(this.max);
-          this.starts = new ZeroArray(this.max);
-
-          this.setItemTTL = (index, ttl, start = perf.now()) => {
-            this.starts[index] = ttl !== 0 ? start : 0;
-            this.ttls[index] = ttl;
-            if (ttl !== 0 && this.ttlAutopurge) {
-              const t = setTimeout(() => {
-                if (this.isStale(index)) {
-                  this.delete(this.keyList[index]);
+            // TODO: remove this when `cacheable-request` supports async request functions.
+            if (distribution.promise(result)) {
+              // We only need to implement the error handler in order to support HTTP2 caching.
+              // The result will be a promise anyway.
+              // @ts-expect-error ignore
+              result.once = (event, handler) => {
+                if (event === "error") {
+                  (async () => {
+                    try {
+                      await result;
+                    } catch (error) {
+                      handler(error);
+                    }
+                  })();
+                } else if (event === "abort" || event === "destroy") {
+                  // The empty catch is needed here in case when
+                  // it rejects before it's `await`ed in `_makeRequest`.
+                  (async () => {
+                    try {
+                      const request = await result;
+                      request.once(event, handler);
+                    } catch {}
+                  })();
+                } else {
+                  /* istanbul ignore next: safety check */
+                  throw new Error(`Unknown HTTP2 promise event: ${event}`);
                 }
-              }, ttl + 1);
-              /* istanbul ignore else - unref() not supported on all platforms */
-              if (t.unref) {
-                t.unref();
-              }
-            }
-          };
-
-          this.updateItemAge = (index) => {
-            this.starts[index] = this.ttls[index] !== 0 ? perf.now() : 0;
-          };
-
-          this.statusTTL = (status, index) => {
-            if (status) {
-              status.ttl = this.ttls[index];
-              status.start = this.starts[index];
-              status.now = cachedNow || getNow();
-              status.remainingTTL = status.now + status.ttl - status.start;
-            }
-          };
-
-          // 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);
-              /* istanbul ignore else - not available on all platforms */
-              if (t.unref) {
-                t.unref();
-              }
-            }
-            return n;
-          };
-
-          this.getRemainingTTL = (key) => {
-            const index = this.keyMap.get(key);
-            if (index === undefined) {
-              return 0;
+                return result;
+              };
             }
-            return this.ttls[index] === 0 || this.starts[index] === 0
-              ? Infinity
-              : this.starts[index] + this.ttls[index] - (cachedNow || getNow());
-          };
-
-          this.isStale = (index) => {
-            return (
-              this.ttls[index] !== 0 &&
-              this.starts[index] !== 0 &&
-              (cachedNow || getNow()) - this.starts[index] > this.ttls[index]
-            );
-          };
+            return result;
+          }, cache);
+          cacheableStore.set(cache, cacheableRequest.request());
         }
-        updateItemAge(_index) {}
-        statusTTL(_status, _index) {}
-        setItemTTL(_index, _ttl, _start) {}
-        isStale(_index) {
-          return false;
+        async _createCacheableRequest(url, options) {
+          return new Promise((resolve, reject) => {
+            Object.assign(options, {
+              protocol: url.protocol,
+              hostname:
+                distribution.string(url.hostname) &&
+                url.hostname.startsWith("[")
+                  ? url.hostname.slice(1, -1)
+                  : url.hostname,
+              host: url.host,
+              hash: url.hash === "" ? "" : (url.hash ?? null),
+              search: url.search === "" ? "" : (url.search ?? null),
+              pathname: url.pathname,
+              href: url.href,
+              path: `${url.pathname || ""}${url.search || ""}`,
+              ...(distribution.string(url.port) && url.port.length > 0
+                ? { port: Number(url.port) }
+                : {}),
+              ...(url.username || url.password
+                ? { auth: `${url.username || ""}:${url.password || ""}` }
+                : {}),
+            });
+            let request;
+            // TODO: Fix `cacheable-response`. This is ugly.
+            const cacheRequest = cacheableStore.get(options.cache)(
+              options,
+              (response) => {
+                void (async () => {
+                  response._readableState.autoDestroy = false;
+                  if (request) {
+                    const fix = () => {
+                      // For ResponseLike objects from cache, set complete to true if not already set.
+                      // For real HTTP responses, copy from the underlying response.
+                      if (response.req) {
+                        response.complete = response.req.res.complete;
+                      } else if (response.complete === undefined) {
+                        // ResponseLike from cache should have complete = true
+                        response.complete = true;
+                      }
+                    };
+                    response.prependOnceListener("end", fix);
+                    fix();
+                    (await request).emit("cacheableResponse", response);
+                  }
+                  resolve(response);
+                })();
+              },
+            );
+            cacheRequest.once("error", reject);
+            cacheRequest.once("request", (requestOrPromise) => {
+              request = requestOrPromise;
+              resolve(request);
+            });
+          });
         }
-
-        initializeSizeTracking() {
-          this.calculatedSize = 0;
-          this.sizes = new ZeroArray(this.max);
-          this.removeItemSize = (index) => {
-            this.calculatedSize -= this.sizes[index];
-            this.sizes[index] = 0;
-          };
-          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;
+        async _makeRequest() {
+          const { options } = this;
+          const shouldDeleteGeneratedHeader = (
+            currentHeader,
+            generatedHeader,
+          ) =>
+            currentHeader === generatedHeader ||
+            distribution.undefined(currentHeader);
+          const syncGeneratedHeader = (
+            name,
+            { currentHeader, explicitHeader, nextHeader, staleGeneratedHeader },
+          ) => {
+            if (!distribution.undefined(nextHeader)) {
+              options.setInternalHeader(name, nextHeader);
+            } else if (
+              !distribution.undefined(explicitHeader) &&
+              currentHeader === staleGeneratedHeader
+            ) {
+              options.setInternalHeader(name, explicitHeader);
+            } else if (
+              shouldDeleteGeneratedHeader(currentHeader, staleGeneratedHeader)
+            ) {
+              options.deleteInternalHeader(name);
             }
-            if (!isPosInt(size)) {
-              if (sizeCalculation) {
-                if (typeof sizeCalculation !== "function") {
-                  throw new TypeError("sizeCalculation must be a function");
+          };
+          const getAuthorizationHeader = (
+            username,
+            password,
+            isExplicitlyOmitted,
+          ) =>
+            !isExplicitlyOmitted && (username || password)
+              ? `Basic ${stringToBase64(`${username}:${password}`)}`
+              : undefined;
+          const sanitizeHeaders = () => {
+            const currentHeaders = options.getInternalHeaders();
+            for (const key in currentHeaders) {
+              if (distribution.undefined(currentHeaders[key])) {
+                options.deleteInternalHeader(key);
+              } else if (distribution.null(currentHeaders[key])) {
+                throw new TypeError(
+                  `Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`,
+                );
+              } else if (
+                Array.isArray(currentHeaders[key]) &&
+                key === "transfer-encoding"
+              ) {
+                // Node serializes request header arrays as repeated field lines. Keep framing
+                // unambiguous by allowing only one transfer-encoding value here.
+                if (currentHeaders[key].length !== 1) {
+                  throw new TypeError(
+                    `The \`${key}\` header must be a single value`,
+                  );
                 }
-                size = sizeCalculation(v, k);
-                if (!isPosInt(size)) {
+                options.setInternalHeader(key, currentHeaders[key][0]);
+              } else if (
+                Array.isArray(currentHeaders[key]) &&
+                singleValueRequestHeaders.has(key)
+              ) {
+                // Duplicate credential and content-length lines are not allowed on requests.
+                // Normalize a single-element array to match the long-supported string path.
+                if (currentHeaders[key].length !== 1) {
                   throw new TypeError(
-                    "sizeCalculation return invalid (expect positive integer)"
+                    `The \`${key}\` header must be a single value`,
                   );
                 }
-              } else {
-                throw new TypeError(
-                  "invalid size value (must be positive integer). " +
-                    "When maxSize or maxEntrySize is used, sizeCalculation or size " +
-                    "must be set."
-                );
+                options.setInternalHeader(key, currentHeaders[key][0]);
               }
             }
-            return size;
+            return currentHeaders;
           };
-          this.addItemSize = (index, size, status) => {
-            this.sizes[index] = size;
-            if (this.maxSize) {
-              const maxSize = this.maxSize - this.sizes[index];
-              while (this.calculatedSize > maxSize) {
-                this.evict(true);
-              }
-            }
-            this.calculatedSize += this.sizes[index];
-            if (status) {
-              status.entrySize = size;
-              status.totalCalculatedSize = this.calculatedSize;
+          const getCookieHeader = async (cookieJar) => {
+            if (!cookieJar) {
+              return undefined;
             }
+            const cookieString = await cookieJar.getCookieString(
+              options.url.toString(),
+            );
+            return distribution.nonEmptyString(cookieString)
+              ? cookieString
+              : undefined;
           };
-        }
-        removeItemSize(_index) {}
-        addItemSize(_index, _size) {}
-        requireSize(_k, _v, size, sizeCalculation) {
-          if (size || sizeCalculation) {
-            throw new TypeError(
-              "cannot set size without setting maxSize or maxEntrySize on cache"
+          const headers = sanitizeHeaders();
+          const initialHeaders = options.getInternalHeaders();
+          const authorizationWasInitiallyExplicit =
+            options.isHeaderExplicitlySet("authorization");
+          const explicitAuthorizationHeader = authorizationWasInitiallyExplicit
+            ? initialHeaders.authorization
+            : undefined;
+          const explicitCookieHeader = options.isHeaderExplicitlySet("cookie")
+            ? initialHeaders.cookie
+            : undefined;
+          const authorizationWasInitiallyOmitted =
+            options.isHeaderExplicitlySet("authorization") &&
+            distribution.undefined(initialHeaders.authorization);
+          const cookieWasInitiallyOmitted =
+            options.isHeaderExplicitlySet("cookie") &&
+            distribution.undefined(initialHeaders.cookie);
+          if (
+            options.decompress &&
+            distribution.undefined(headers["accept-encoding"])
+          ) {
+            const encodings = ["gzip", "deflate"];
+            if (supportsBrotli) {
+              encodings.push("br");
+            }
+            if (core_supportsZstd) {
+              encodings.push("zstd");
+            }
+            options.setInternalHeader("accept-encoding", encodings.join(", "));
+          }
+          const { username, password } = options;
+          const cookieJar = options.cookieJar;
+          // Preserve an explicit Authorization header over URL-derived Basic auth. This keeps
+          // normalized single-element arrays aligned with the long-supported string behavior.
+          const generatedAuthorizationHeader = distribution.undefined(
+            explicitAuthorizationHeader,
+          )
+            ? getAuthorizationHeader(
+                username,
+                password,
+                authorizationWasInitiallyOmitted,
+              )
+            : undefined;
+          let generatedCookieHeader;
+          if (!distribution.undefined(generatedAuthorizationHeader)) {
+            options.setInternalHeader(
+              "authorization",
+              generatedAuthorizationHeader,
             );
           }
-        }
-
-        *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];
-              }
+          if (!cookieWasInitiallyOmitted) {
+            generatedCookieHeader = await getCookieHeader(cookieJar);
+            if (!distribution.undefined(generatedCookieHeader)) {
+              options.setInternalHeader("cookie", generatedCookieHeader);
             }
           }
-        }
-
-        *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];
+          let request;
+          let shouldOmitRequestUrlCredentials = false;
+          const changedState = await options.trackStateMutations(
+            async (changedState) => {
+              for (const hook of options.hooks.beforeRequest) {
+                // eslint-disable-next-line no-await-in-loop
+                const result = await hook(options, {
+                  retryCount: this.retryCount,
+                });
+                if (!distribution.undefined(result)) {
+                  // @ts-expect-error Skip the type mismatch to support abstract responses
+                  request = () => result;
+                  break;
+                }
               }
-            }
-          }
-        }
-
-        isValidIndex(index) {
-          return (
-            index !== undefined &&
-            this.keyMap.get(this.keyList[index]) === index
+              return changedState;
+            },
           );
-        }
-
-        *entries() {
-          for (const i of this.indexes()) {
+          if (request === undefined) {
+            const currentHeaders = options.getInternalHeaders();
+            // `headers.authorization = undefined` / `headers.cookie = undefined` is an
+            // explicit opt-out. Respect that instead of regenerating values from URL
+            // credentials or the cookie jar later in request setup.
+            const isHeaderExplicitlyOmitted = (header) =>
+              options.isHeaderExplicitlySet(header) &&
+              Object.hasOwn(currentHeaders, header) &&
+              distribution.undefined(currentHeaders[header]);
+            const currentAuthorizationHeader = currentHeaders.authorization;
+            const currentCookieHeader = currentHeaders.cookie;
+            // Authorization follows a small contract:
+            // - A concrete Authorization header is sent as-is.
+            // - `authorization = undefined` means omit Authorization entirely, including URL auth.
+            // - Deleting an Authorization header that started explicit also means omit it.
+            // - Otherwise, if the request did not start with explicit Authorization, Got may
+            //   generate Basic auth from the current username/password.
+            const authorizationWasExplicitlyOmitted =
+              isHeaderExplicitlyOmitted("authorization") ||
+              (authorizationWasInitiallyExplicit &&
+                distribution.undefined(currentAuthorizationHeader));
+            const cookieWasExplicitlyOmitted =
+              distribution.undefined(currentCookieHeader) &&
+              (cookieWasInitiallyOmitted ||
+                isHeaderExplicitlyOmitted("cookie"));
+            sanitizeHeaders();
             if (
-              this.valList[i] !== undefined &&
-              this.keyList[i] !== undefined &&
-              !this.isBackgroundFetch(this.valList[i])
+              !distribution.undefined(currentHeaders["transfer-encoding"]) &&
+              !distribution.undefined(currentHeaders["content-length"])
             ) {
-              yield [this.keyList[i], this.valList[i]];
+              options.deleteInternalHeader("content-length");
             }
-          }
-        }
-        *rentries() {
-          for (const i of this.rindexes()) {
+            if (authorizationWasExplicitlyOmitted) {
+              shouldOmitRequestUrlCredentials = true;
+              options.deleteInternalHeader("authorization");
+              if (
+                changedState.has("authorization") &&
+                distribution.undefined(explicitAuthorizationHeader) &&
+                !authorizationWasInitiallyOmitted
+              ) {
+                delete options.headers.authorization;
+              }
+            }
+            const authorizationHeader =
+              !authorizationWasInitiallyExplicit &&
+              !authorizationWasInitiallyOmitted &&
+              !authorizationWasExplicitlyOmitted
+                ? getAuthorizationHeader(
+                    options.username,
+                    options.password,
+                    authorizationWasExplicitlyOmitted,
+                  )
+                : undefined;
+            const cookieJar = options.cookieJar;
             if (
-              this.valList[i] !== undefined &&
-              this.keyList[i] !== undefined &&
-              !this.isBackgroundFetch(this.valList[i])
+              changedState.has("authorization") &&
+              !distribution.undefined(currentAuthorizationHeader)
             ) {
-              yield [this.keyList[i], this.valList[i]];
+              // A beforeRequest hook intentionally set the outgoing Authorization header.
+            } else {
+              const restorableAuthorizationHeader =
+                changedState.has("authorization") &&
+                distribution.undefined(currentAuthorizationHeader)
+                  ? undefined
+                  : explicitAuthorizationHeader;
+              syncGeneratedHeader("authorization", {
+                currentHeader: currentAuthorizationHeader,
+                explicitHeader: restorableAuthorizationHeader,
+                nextHeader: authorizationHeader,
+                staleGeneratedHeader: generatedAuthorizationHeader,
+              });
+            }
+            if (cookieWasExplicitlyOmitted) {
+              options.deleteInternalHeader("cookie");
+              if (
+                changedState.has("cookie") &&
+                distribution.undefined(explicitCookieHeader) &&
+                !cookieWasInitiallyOmitted
+              ) {
+                delete options.headers.cookie;
+              }
+            } else if (changedState.has("cookie")) {
+              // A beforeRequest hook intentionally set the outgoing Cookie header.
+            } else {
+              const cookieHeader =
+                !cookieWasInitiallyOmitted && !cookieWasExplicitlyOmitted
+                  ? await getCookieHeader(cookieJar)
+                  : undefined;
+              syncGeneratedHeader("cookie", {
+                currentHeader: currentCookieHeader,
+                explicitHeader: explicitCookieHeader,
+                nextHeader: cookieHeader,
+                staleGeneratedHeader: generatedCookieHeader,
+              });
             }
           }
-        }
-
-        *keys() {
-          for (const i of this.indexes()) {
-            if (
-              this.keyList[i] !== undefined &&
-              !this.isBackgroundFetch(this.valList[i])
-            ) {
-              yield this.keyList[i];
+          request ??= options.getRequestFunction();
+          const url = shouldOmitRequestUrlCredentials
+            ? new URL(stripUrlAuth(options.url))
+            : options.url;
+          this._requestOptions = options.createNativeRequestOptions();
+          if (shouldOmitRequestUrlCredentials) {
+            this._requestOptions.auth = undefined;
+          }
+          if (options.cache) {
+            this._requestOptions._request = request;
+            this._requestOptions.cache = options.cache;
+            this._requestOptions.body = options.body;
+            this._requestOptions.beforeCacheHooks = options.hooks.beforeCache;
+            this._requestOptions.gotRequest = this;
+            try {
+              this._prepareCache(options.cache);
+            } catch (error) {
+              throw new CacheError(normalizeError(error), this);
             }
           }
-        }
-        *rkeys() {
-          for (const i of this.rindexes()) {
-            if (
-              this.keyList[i] !== undefined &&
-              !this.isBackgroundFetch(this.valList[i])
-            ) {
-              yield this.keyList[i];
+          // Cache support
+          const function_ = options.cache
+            ? this._createCacheableRequest
+            : request;
+          try {
+            // We can't do `await fn(...)`,
+            // because stream `error` event can be emitted before `Promise.resolve()`.
+            let requestOrResponse = function_(url, this._requestOptions);
+            if (distribution.promise(requestOrResponse)) {
+              requestOrResponse = await requestOrResponse;
+            }
+            if (is_client_request(requestOrResponse)) {
+              this._onRequest(requestOrResponse);
+            } else if (this.writableEnded) {
+              void this._onResponse(requestOrResponse);
+            } else {
+              this.once("finish", () => {
+                void this._onResponse(requestOrResponse);
+              });
+              this._sendBody();
+            }
+          } catch (error) {
+            if (error instanceof types_CacheError) {
+              throw new CacheError(error, this);
             }
+            throw error;
           }
         }
-
-        *values() {
-          for (const i of this.indexes()) {
+        async _error(error) {
+          try {
+            // Skip calling hooks for HTTP errors when throwHttpErrors is false (Promise API only).
+            // See https://github.com/sindresorhus/got/issues/2103
             if (
-              this.valList[i] !== undefined &&
-              !this.isBackgroundFetch(this.valList[i])
+              this.options &&
+              (!(error instanceof HTTPError) || this.options.throwHttpErrors)
             ) {
-              yield this.valList[i];
+              const hooks = this.options.hooks.beforeError;
+              if (hooks.length > 0) {
+                for (const hook of hooks) {
+                  // eslint-disable-next-line no-await-in-loop
+                  error = await hook(error);
+                  // Validate hook return value
+                  if (!(error instanceof Error)) {
+                    throw new TypeError(
+                      `The \`beforeError\` hook must return an Error instance. Received ${distribution.string(error) ? "string" : String(typeof error)}.`,
+                    );
+                  }
+                }
+                // Mark this error as processed by hooks so _destroy preserves custom error types.
+                // Only mark non-RequestError errors, since RequestErrors are already preserved
+                // by the instanceof check in _destroy (line 642).
+                if (!(error instanceof RequestError)) {
+                  errorsProcessedByHooks.add(error);
+                }
+              }
             }
+          } catch (error_) {
+            const normalizedError = normalizeError(error_);
+            error = new RequestError(
+              normalizedError.message,
+              normalizedError,
+              this,
+            );
+          }
+          // Publish error event
+          publishError({
+            requestId: this._requestId,
+            url: getSanitizedUrl(this.options),
+            error,
+            timings: this.timings,
+          });
+          this.destroy(error);
+          // Manually emit error for Promise API to ensure it receives it.
+          // Node.js streams may not re-emit if an error was already emitted during retry attempts.
+          // Only emit for Promise API (_noPipe = true) to avoid double emissions in stream mode.
+          // Use process.nextTick to defer emission and allow destroy() to complete first.
+          // See https://github.com/sindresorhus/got/issues/1995
+          if (this._noPipe) {
+            external_node_process_namespaceObject.nextTick(() => {
+              this.emit("error", error);
+            });
           }
         }
-        *rvalues() {
-          for (const i of this.rindexes()) {
-            if (
-              this.valList[i] !== undefined &&
-              !this.isBackgroundFetch(this.valList[i])
-            ) {
-              yield this.valList[i];
-            }
+        _writeRequest(chunk, encoding, callback, request = this._request) {
+          if (!request || request.destroyed) {
+            // When there's no request (e.g., using cached response from beforeRequest hook),
+            // we still need to call the callback to allow the stream to finish properly.
+            callback();
+            return;
           }
+          request.write(chunk, encoding, (error) => {
+            // The `!destroyed` check is required to prevent `uploadProgress` being emitted after the stream was destroyed.
+            // The `this._request === request` check prevents stale write callbacks from a pre-redirect request from incrementing `_uploadedSize` after it's been reset.
+            if (!error && !request.destroyed && this._request === request) {
+              // For strings, encode them first to measure the actual bytes that will be sent
+              const bytes =
+                typeof chunk === "string"
+                  ? external_node_buffer_.Buffer.from(chunk, encoding)
+                  : chunk;
+              this._uploadedSize += byteLength(bytes);
+              const progress = this.uploadProgress;
+              if (progress.percent < 1) {
+                this.emit("uploadProgress", progress);
+              }
+            }
+            callback(error);
+          });
         }
-
-        [Symbol.iterator]() {
-          return this.entries();
+        /**
+    The remote IP address.
+    */
+        get ip() {
+          return this.socket?.remoteAddress;
         }
-
-        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);
-            }
-          }
+        /**
+    Indicates whether the request has been aborted or not.
+    */
+        get isAborted() {
+          return this._aborted;
         }
-
-        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);
-          }
+        get socket() {
+          return this._request?.socket ?? undefined;
         }
-
-        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);
-          }
+        /**
+    Progress event for downloading (receiving a response).
+    */
+        get downloadProgress() {
+          return makeProgress(this._downloadedSize, this._responseSize);
         }
-
-        get prune() {
-          deprecatedMethod("prune", "purgeStale");
-          return this.purgeStale;
+        /**
+    Progress event for uploading (sending a request).
+    */
+        get uploadProgress() {
+          return makeProgress(this._uploadedSize, this._bodySize);
         }
+        /**
+    The object contains the following properties:
 
-        purgeStale() {
-          let deleted = false;
-          for (const i of this.rindexes({ allowStale: true })) {
-            if (this.isStale(i)) {
-              this.delete(this.keyList[i]);
-              deleted = true;
-            }
-          }
-          return deleted;
-        }
+    - `start` - Time when the request started.
+    - `socket` - Time when a socket was assigned to the request.
+    - `lookup` - Time when the DNS lookup finished.
+    - `connect` - Time when the socket successfully connected.
+    - `secureConnect` - Time when the socket securely connected.
+    - `upload` - Time when the request finished uploading.
+    - `response` - Time when the request fired `response` event.
+    - `end` - Time when the response fired `end` event.
+    - `error` - Time when the request fired `error` event.
+    - `abort` - Time when the request fired `abort` event.
+    - `phases`
+        - `wait` - `timings.socket - timings.start`
+        - `dns` - `timings.lookup - timings.socket`
+        - `tcp` - `timings.connect - timings.lookup`
+        - `tls` - `timings.secureConnect - timings.connect`
+        - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
+        - `firstByte` - `timings.response - timings.upload`
+        - `download` - `timings.end - timings.response`
+        - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
 
-        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) continue;
-            const entry = { value };
-            if (this.ttls) {
-              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]);
-          }
-          return arr;
-        }
-
-        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.
-              // 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);
-          }
-        }
+    If something has not been measured yet, it will be `undefined`.
 
-        dispose(_v, _k, _reason) {}
+    __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
+    */
+        get timings() {
+          return this._request?.timings;
+        }
+        /**
+    Whether the response was retrieved from the cache.
+    */
+        get isFromCache() {
+          return this.response?.isFromCache;
+        }
+        get reusedSocket() {
+          return this._request?.reusedSocket;
+        }
+        /**
+    Whether the stream is read-only. Returns `true` when `body`, `json`, or `form` options are provided.
+    */
+        get isReadonly() {
+          return (
+            !distribution.undefined(this.options?.body) ||
+            !distribution.undefined(this.options?.json) ||
+            !distribution.undefined(this.options?.form)
+          );
+        }
+      } // CONCATENATED MODULE: ./node_modules/got/dist/source/as-promise/index.js
 
-        set(
-          k,
-          v,
-          {
-            ttl = this.ttl,
-            start,
-            noDisposeOnSet = this.noDisposeOnSet,
-            size = 0,
-            sizeCalculation = this.sizeCalculation,
-            noUpdateTTL = this.noUpdateTTL,
-            status,
-          } = {}
-        ) {
-          size = this.requireSize(k, v, size, 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 a background fetch is there already.
-            // in non-async cases, this is a no-op
-            this.delete(k);
-            return this;
-          }
-          let index = this.size === 0 ? undefined : this.keyMap.get(k);
-          if (index === undefined) {
-            // addition
-            index = this.newIndex();
-            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 {
-            // update
-            this.moveToTail(index);
-            const oldVal = this.valList[index];
-            if (v !== oldVal) {
-              if (this.isBackgroundFetch(oldVal)) {
-                oldVal.__abortController.abort(new Error("replaced"));
-              } else {
-                if (!noDisposeOnSet) {
-                  this.dispose(oldVal, k, "set");
-                  if (this.disposeAfter) {
-                    this.disposed.push([oldVal, k, "set"]);
+      const compressedEncodings = new Set(["gzip", "deflate", "br", "zstd"]);
+      const as_promise_proxiedRequestEvents = [
+        "request",
+        "response",
+        "redirect",
+        "uploadProgress",
+        "downloadProgress",
+      ];
+      function asPromise(firstRequest) {
+        let globalRequest;
+        let globalResponse;
+        const emitter = new external_node_events_.EventEmitter();
+        let promiseSettled = false;
+        const promise = new Promise((resolve, reject) => {
+          const makeRequest = (retryCount, defaultOptions) => {
+            const request =
+              firstRequest ?? new Request(undefined, undefined, defaultOptions);
+            request.retryCount = retryCount;
+            request._noPipe = true;
+            globalRequest = request;
+            request.once("response", (response) => {
+              void (async () => {
+                // Parse body
+                const contentEncoding = (
+                  response.headers["content-encoding"] ?? ""
+                ).toLowerCase();
+                const isCompressed = compressedEncodings.has(contentEncoding);
+                const { options } = request;
+                if (isCompressed && !options.decompress) {
+                  response.body = response.rawBody;
+                } else {
+                  try {
+                    response.body = parseBody(
+                      response,
+                      options.responseType,
+                      options.parseJson,
+                      options.encoding,
+                    );
+                  } catch (error) {
+                    // Fall back to `utf8`
+                    try {
+                      response.body = decodeUint8Array(response.rawBody);
+                    } catch (error) {
+                      request._beforeError(
+                        new ParseError(normalizeError(error), response),
+                      );
+                      return;
+                    }
+                    if (isResponseOk(response)) {
+                      request._beforeError(normalizeError(error));
+                      return;
+                    }
+                  }
+                }
+                try {
+                  const hooks = options.hooks.afterResponse;
+                  for (const [index, hook] of hooks.entries()) {
+                    const previousUrl = options.url
+                      ? new URL(options.url)
+                      : undefined;
+                    const previousState = previousUrl
+                      ? snapshotCrossOriginState(options)
+                      : undefined;
+                    const requestOptions = response.request.options;
+                    const responseSnapshot = response;
+                    // @ts-expect-error TS doesn't notice that RequestPromise is a Promise
+                    // eslint-disable-next-line no-await-in-loop
+                    response = await requestOptions.trackStateMutations(
+                      async (changedState) =>
+                        hook(responseSnapshot, async (updatedOptions) => {
+                          const preserveHooks =
+                            updatedOptions.preserveHooks ?? false;
+                          const reusesRequestOptions =
+                            updatedOptions === requestOptions;
+                          const hasExplicitBody = reusesRequestOptions
+                            ? changedState.has("body") ||
+                              changedState.has("json") ||
+                              changedState.has("form")
+                            : (Object.hasOwn(updatedOptions, "body") &&
+                                updatedOptions.body !== undefined) ||
+                              (Object.hasOwn(updatedOptions, "json") &&
+                                updatedOptions.json !== undefined) ||
+                              (Object.hasOwn(updatedOptions, "form") &&
+                                updatedOptions.form !== undefined);
+                          const clearsCookieJar =
+                            Object.hasOwn(updatedOptions, "cookieJar") &&
+                            updatedOptions.cookieJar === undefined;
+                          if (hasExplicitBody && !reusesRequestOptions) {
+                            options.clearBody();
+                          }
+                          if (!reusesRequestOptions && clearsCookieJar) {
+                            options.cookieJar = undefined;
+                          }
+                          if (!reusesRequestOptions) {
+                            options.merge(updatedOptions);
+                            options.syncCookieHeaderAfterMerge(
+                              previousState,
+                              updatedOptions.headers,
+                            );
+                          }
+                          options.clearUnchangedCookieHeader(
+                            previousState,
+                            reusesRequestOptions ? changedState : undefined,
+                          );
+                          if (updatedOptions.url) {
+                            const nextUrl = reusesRequestOptions
+                              ? options.url
+                              : applyUrlOverride(
+                                  options,
+                                  updatedOptions.url,
+                                  updatedOptions,
+                                );
+                            if (previousUrl) {
+                              if (
+                                reusesRequestOptions &&
+                                !isSameOrigin(previousUrl, nextUrl)
+                              ) {
+                                options.stripUnchangedCrossOriginState(
+                                  previousState,
+                                  changedState,
+                                  { clearBody: !hasExplicitBody },
+                                );
+                              } else {
+                                options.stripSensitiveHeaders(
+                                  previousUrl,
+                                  nextUrl,
+                                  updatedOptions,
+                                );
+                                if (
+                                  !isSameOrigin(previousUrl, nextUrl) &&
+                                  !hasExplicitBody
+                                ) {
+                                  options.clearBody();
+                                }
+                              }
+                            }
+                          }
+                          // Remove any further hooks for that request, because we'll call them anyway.
+                          // The loop continues. We don't want duplicates (asPromise recursion).
+                          // Unless preserveHooks is true, in which case we keep the remaining hooks.
+                          if (!preserveHooks) {
+                            options.hooks.afterResponse =
+                              options.hooks.afterResponse.slice(0, index);
+                          }
+                          throw new RetryError(request);
+                        }),
+                    );
+                    if (
+                      !(
+                        distribution.object(response) &&
+                        distribution.number(response.statusCode) &&
+                        "body" in response
+                      )
+                    ) {
+                      throw new TypeError(
+                        "The `afterResponse` hook returned an invalid value",
+                      );
+                    }
+                  }
+                } catch (error) {
+                  request._beforeError(normalizeError(error));
+                  return;
+                }
+                globalResponse = response;
+                if (!isResponseOk(response)) {
+                  request._beforeError(new HTTPError(response));
+                  return;
+                }
+                request.destroy();
+                promiseSettled = true;
+                resolve(
+                  request.options.resolveBodyOnly ? response.body : response,
+                );
+              })();
+            });
+            let handledFinalError = false;
+            const onError = (error) => {
+              // Route errors emitted directly on the stream (e.g., EPIPE from Node.js)
+              // through retry logic first, then handle them here after retries are exhausted.
+              // See https://github.com/sindresorhus/got/issues/1995
+              if (!request._stopReading) {
+                request._beforeError(error);
+                return;
+              }
+              // Allow the manual re-emission from Request to land only once.
+              if (handledFinalError) {
+                return;
+              }
+              handledFinalError = true;
+              promiseSettled = true;
+              const { options } = request;
+              if (error instanceof HTTPError && !options.throwHttpErrors) {
+                const { response } = error;
+                request.destroy();
+                resolve(
+                  request.options.resolveBodyOnly ? response.body : response,
+                );
+                return;
+              }
+              reject(error);
+            };
+            // Use .on() instead of .once() to keep the listener active across retries.
+            // When _stopReading is false, we return early and the error gets re-emitted
+            // after retry logic completes, so we need this listener to remain active.
+            // See https://github.com/sindresorhus/got/issues/1995
+            request.on("error", onError);
+            const previousBody = request.options?.body;
+            request.once("retry", (newRetryCount, error) => {
+              firstRequest = undefined;
+              // If promise already settled, don't retry
+              // This prevents the race condition in #1489 where a late error
+              // (e.g., ECONNRESET after successful response) triggers retry
+              // after the promise has already resolved/rejected
+              if (promiseSettled) {
+                return;
+              }
+              const newBody = request.options.body;
+              if (
+                previousBody === newBody &&
+                (distribution.nodeStream(newBody) ||
+                  newBody instanceof ReadableStream)
+              ) {
+                error.message = "Cannot retry with consumed body stream";
+                onError(error);
+                return;
+              }
+              // This is needed! We need to reuse `request.options` because they can get modified!
+              // For example, by calling `promise.json()`.
+              makeRequest(newRetryCount, request.options);
+            });
+            proxyEvents(request, emitter, as_promise_proxiedRequestEvents);
+            if (distribution.undefined(firstRequest)) {
+              void request.flush();
+            }
+          };
+          makeRequest(0);
+        });
+        promise.on = function (event, function_) {
+          emitter.on(event, function_);
+          return this;
+        };
+        promise.once = function (event, function_) {
+          emitter.once(event, function_);
+          return this;
+        };
+        promise.off = function (event, function_) {
+          emitter.off(event, function_);
+          return this;
+        };
+        const shortcut = (promiseToAwait, responseType) => {
+          const newPromise = (async () => {
+            // Wait until downloading has ended
+            await promiseToAwait;
+            const { options } = globalResponse.request;
+            if (responseType === "text") {
+              const text = decodeUint8Array(
+                globalResponse.rawBody,
+                options.encoding,
+              );
+              return isUtf8Encoding(options.encoding)
+                ? text.replace(/^\u{FEFF}/v, "")
+                : text;
+            }
+            return parseBody(
+              globalResponse,
+              responseType,
+              options.parseJson,
+              options.encoding,
+            );
+          })();
+          // eslint-disable-next-line @typescript-eslint/no-floating-promises
+          Object.defineProperties(
+            newPromise,
+            Object.getOwnPropertyDescriptors(promiseToAwait),
+          );
+          return newPromise;
+        };
+        // Note: These use `function` syntax (not arrows) to access `this` context.
+        // When custom handlers wrap the promise to transform errors, these methods
+        // are copied to the handler's promise. Using `this` ensures we await the
+        // handler's wrapped promise, not the original, so errors propagate correctly.
+        promise.json = function () {
+          if (globalRequest.options) {
+            const { headers } = globalRequest.options;
+            if (!globalRequest.writableFinished && !("accept" in headers)) {
+              headers.accept = "application/json";
+            }
+          }
+          return shortcut(this, "json");
+        };
+        promise.buffer = function () {
+          return shortcut(this, "buffer");
+        };
+        promise.text = function () {
+          return shortcut(this, "text");
+        };
+        return promise;
+      } // CONCATENATED MODULE: ./node_modules/got/dist/source/create.js
+
+      const isGotInstance = (value) => distribution.function(value);
+      const aliases = ["get", "post", "put", "patch", "head", "delete"];
+      const optionsObjectUrlErrorMessage =
+        "The `url` option is not supported in options objects. Pass it as the first argument instead.";
+      const assertNoUrlInOptionsObject = (options) => {
+        if (Object.hasOwn(options, "url")) {
+          throw new TypeError(optionsObjectUrlErrorMessage);
+        }
+      };
+      const cloneWithProperty = (value, property, propertyValue) => {
+        const clone = Object.create(
+          Object.getPrototypeOf(value),
+          Object.getOwnPropertyDescriptors(value),
+        );
+        Object.defineProperty(clone, property, {
+          value: propertyValue,
+          enumerable: true,
+          configurable: true,
+          writable: true,
+        });
+        return clone;
+      };
+      const create = (defaults) => {
+        defaults = {
+          options: new Options(undefined, undefined, defaults.options),
+          handlers: [...defaults.handlers],
+          mutableDefaults: defaults.mutableDefaults,
+        };
+        Object.defineProperty(defaults, "mutableDefaults", {
+          enumerable: true,
+          configurable: false,
+          writable: false,
+        });
+        const makeRequest = (url, options, defaultOptions, isStream) => {
+          if (distribution.plainObject(url)) {
+            assertNoUrlInOptionsObject(url);
+          }
+          if (distribution.plainObject(options)) {
+            assertNoUrlInOptionsObject(options);
+          }
+          // `isStream` is skipped by `merge()`, so set it via the direct setter after construction.
+          // Avoid a synthetic second merge only for the single-options-object stream form.
+          const requestUrl =
+            isStream && distribution.plainObject(url)
+              ? cloneWithProperty(url, "isStream", true)
+              : url;
+          const requestOptions =
+            isStream && !distribution.plainObject(url) && options
+              ? cloneWithProperty(options, "isStream", true)
+              : options;
+          const request = new Request(
+            requestUrl,
+            requestOptions,
+            defaultOptions,
+          );
+          if (isStream && request.options) {
+            request.options.isStream = true;
+          }
+          let promise;
+          const lastHandler = (normalized) => {
+            // Note: `options` is `undefined` when `new Options(...)` fails
+            request.options = normalized;
+            const shouldReturnStream = normalized?.isStream ?? isStream;
+            request._noPipe = !shouldReturnStream;
+            void request.flush();
+            if (shouldReturnStream) {
+              return request;
+            }
+            promise ??= asPromise(request);
+            return promise;
+          };
+          let iteration = 0;
+          const iterateHandlers = (newOptions) => {
+            const handler = defaults.handlers[iteration++] ?? lastHandler;
+            const result = handler(newOptions, iterateHandlers);
+            if (distribution.promise(result) && !request.options?.isStream) {
+              promise ??= asPromise(request);
+              if (result !== promise) {
+                const descriptors = Object.getOwnPropertyDescriptors(promise);
+                for (const key in descriptors) {
+                  if (key in result) {
+                    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
+                    delete descriptors[key];
                   }
                 }
+                // eslint-disable-next-line @typescript-eslint/no-floating-promises
+                Object.defineProperties(result, descriptors);
               }
-              this.removeItemSize(index);
-              this.valList[index] = v;
-              this.addItemSize(index, size, status);
-              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";
-            }
-          }
-          if (ttl !== 0 && this.ttl === 0 && !this.ttls) {
-            this.initializeTTLTracking();
-          }
-          if (!noUpdateTTL) {
-            this.setItemTTL(index, ttl, start);
-          }
-          this.statusTTL(status, index);
-          if (this.disposeAfter) {
-            while (this.disposed.length) {
-              this.disposeAfter(...this.disposed.shift());
-            }
-          }
-          return this;
-        }
-
-        newIndex() {
-          if (this.size === 0) {
-            return this.tail;
-          }
-          if (this.size === this.max && this.max !== 0) {
-            return this.evict(false);
-          }
-          if (this.free.length !== 0) {
-            return this.free.pop();
-          }
-          // initial fill, just keep writing down the list
-          return this.initialFill++;
-        }
-
-        pop() {
-          if (this.size) {
-            const val = this.valList[this.head];
-            this.evict(true);
-            return val;
-          }
-        }
-
-        evict(free) {
-          const head = this.head;
-          const k = this.keyList[head];
-          const v = this.valList[head];
-          if (this.isBackgroundFetch(v)) {
-            v.__abortController.abort(new Error("evicted"));
-          } else {
-            this.dispose(v, k, "evict");
-            if (this.disposeAfter) {
-              this.disposed.push([v, k, "evict"]);
             }
-          }
-          this.removeItemSize(head);
-          // if we aren't about to use the index, then null these out
-          if (free) {
-            this.keyList[head] = null;
-            this.valList[head] = null;
-            this.free.push(head);
-          }
-          this.head = this.next[head];
-          this.keyMap.delete(k);
-          this.size--;
-          return head;
-        }
-
-        has(k, { updateAgeOnHas = this.updateAgeOnHas, status } = {}) {
-          const index = this.keyMap.get(k);
-          if (index !== undefined) {
-            if (!this.isStale(index)) {
-              if (updateAgeOnHas) {
-                this.updateItemAge(index);
+            return result;
+          };
+          return iterateHandlers(request.options);
+        };
+        // Got interface
+        const got = (url, options, defaultOptions = defaults.options) =>
+          makeRequest(url, options, defaultOptions, false);
+        got.extend = (...instancesOrOptions) => {
+          const options = new Options(undefined, undefined, defaults.options);
+          const handlers = [...defaults.handlers];
+          let mutableDefaults;
+          for (const value of instancesOrOptions) {
+            if (isGotInstance(value)) {
+              options.merge(value.defaults.options);
+              handlers.push(...value.defaults.handlers);
+              mutableDefaults = value.defaults.mutableDefaults;
+            } else {
+              assertNoUrlInOptionsObject(value);
+              options.merge(value);
+              if (value.handlers) {
+                handlers.push(...value.handlers);
               }
-              if (status) status.has = "hit";
-              this.statusTTL(status, index);
-              return true;
-            } else if (status) {
-              status.has = "stale";
-              this.statusTTL(status, index);
+              mutableDefaults = value.mutableDefaults;
             }
-          } else if (status) {
-            status.has = "miss";
-          }
-          return false;
-        }
-
-        // like get(), but without any LRU updating or TTL expiration
-        peek(k, { allowStale = this.allowStale } = {}) {
-          const index = this.keyMap.get(k);
-          if (index !== undefined && (allowStale || !this.isStale(index))) {
-            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;
+          return create({
+            options,
+            handlers,
+            mutableDefaults: Boolean(mutableDefaults),
+          });
+        };
+        // Pagination
+        const paginateEach = async function* (url, options) {
+          if (distribution.plainObject(url)) {
+            assertNoUrlInOptionsObject(url);
           }
-          const ac = new AC();
-          if (options.signal) {
-            options.signal.addEventListener("abort", () =>
-              ac.abort(options.signal.reason)
-            );
+          if (distribution.plainObject(options)) {
+            assertNoUrlInOptionsObject(options);
           }
-          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);
+          let normalizedOptions = new Options(url, options, defaults.options);
+          normalizedOptions.resolveBodyOnly = false;
+          const { pagination } = normalizedOptions;
+          assert.function(pagination.transform);
+          assert.function(pagination.shouldContinue);
+          assert.function(pagination.filter);
+          assert.function(pagination.paginate);
+          assert.number(pagination.countLimit);
+          assert.number(pagination.requestLimit);
+          assert.number(pagination.backoff);
+          const allItems = [];
+          let { countLimit } = pagination;
+          let numberOfRequests = 0;
+          while (numberOfRequests < pagination.requestLimit) {
+            if (numberOfRequests !== 0) {
+              // eslint-disable-next-line no-await-in-loop
+              await (0, promises_namespaceObject.setTimeout)(
+                pagination.backoff,
+              );
             }
-            // either we didn't abort, and are still here, or we did, and ignored
-            if (this.valList[index] === p) {
-              if (v === undefined) {
-                if (p.__staleWhileFetching) {
-                  this.valList[index] = p.__staleWhileFetching;
-                } else {
-                  this.delete(k);
+            // eslint-disable-next-line no-await-in-loop
+            const response = await got(undefined, undefined, normalizedOptions);
+            // eslint-disable-next-line no-await-in-loop
+            const parsed = await pagination.transform(response);
+            const currentItems = [];
+            assert.array(parsed);
+            for (const item of parsed) {
+              if (pagination.filter({ item, currentItems, allItems })) {
+                if (
+                  !pagination.shouldContinue({ item, currentItems, allItems })
+                ) {
+                  return;
+                }
+                yield item;
+                if (pagination.stackAllItems) {
+                  allItems.push(item);
+                }
+                currentItems.push(item);
+                if (--countLimit <= 0) {
+                  return;
                 }
-              } 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;
-            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 || p.__staleWhileFetching === undefined;
-              if (del) {
-                this.delete(k);
-              } 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] = p.__staleWhileFetching;
-              }
-            }
-            if (allowStale) {
-              if (options.status && p.__staleWhileFetching !== undefined) {
-                options.status.returnedStale = true;
-              }
-              return p.__staleWhileFetching;
-            } else if (p.__returned === p) {
-              throw er;
+            const requestOptions = response.request.options;
+            const previousUrl = requestOptions.url
+              ? new URL(requestOptions.url)
+              : undefined;
+            const previousState = previousUrl
+              ? snapshotCrossOriginState(requestOptions)
+              : undefined;
+            // eslint-disable-next-line no-await-in-loop
+            const [optionsToMerge, changedState] =
+              await requestOptions.trackStateMutations(async (changedState) => [
+                pagination.paginate({
+                  response,
+                  currentItems,
+                  allItems,
+                }),
+                changedState,
+              ]);
+            if (optionsToMerge === false) {
+              return;
             }
-          };
-          const pcall = (res, rej) => {
-            this.fetchMethod(k, v, fetchOpts).then((v) => res(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();
-                // when it eventually resolves, update the cache.
-                if (options.allowStaleOnFetchAbort) {
-                  res = (v) => cb(v, true);
+            if (optionsToMerge === response.request.options) {
+              normalizedOptions = response.request.options;
+              normalizedOptions.clearUnchangedCookieHeader(
+                previousState,
+                changedState,
+              );
+              if (previousUrl) {
+                const nextUrl = normalizedOptions.url;
+                if (nextUrl && !isSameOrigin(previousUrl, nextUrl)) {
+                  normalizedOptions.prefixUrl = "";
+                  normalizedOptions.stripUnchangedCrossOriginState(
+                    previousState,
+                    changedState,
+                  );
                 }
               }
-            });
-          };
-          if (options.status) options.status.fetchDispatched = true;
-          const p = new Promise(pcall).then(cb, eb);
-          p.__abortController = ac;
-          p.__staleWhileFetching = v;
-          p.__returned = null;
-          if (index === undefined) {
-            // internal, don't expose status.
-            this.set(k, p, { ...fetchOpts.options, status: undefined });
-            index = this.keyMap.get(k);
-          } else {
-            this.valList[index] = p;
-          }
-          return p;
-        }
-
-        isBackgroundFetch(p) {
-          return (
-            p &&
-            typeof p === "object" &&
-            typeof p.then === "function" &&
-            Object.prototype.hasOwnProperty.call(p, "__staleWhileFetching") &&
-            Object.prototype.hasOwnProperty.call(p, "__returned") &&
-            (p.__returned === p || p.__returned === null)
-          );
-        }
-
-        // this takes the union of get() and set() opts, because it does both
-        async fetch(
-          k,
-          {
-            // 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,
-            fetchContext = this.fetchContext,
-            forceRefresh = false,
-            status,
-            signal,
-          } = {}
-        ) {
-          if (!this.fetchMethod) {
-            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, fetchContext);
-            return (p.__returned = p);
-          } 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;
+            } else {
+              const hasExplicitBody =
+                (Object.hasOwn(optionsToMerge, "body") &&
+                  optionsToMerge.body !== undefined) ||
+                (Object.hasOwn(optionsToMerge, "json") &&
+                  optionsToMerge.json !== undefined) ||
+                (Object.hasOwn(optionsToMerge, "form") &&
+                  optionsToMerge.form !== undefined);
+              const clearsCookieJar =
+                Object.hasOwn(optionsToMerge, "cookieJar") &&
+                optionsToMerge.cookieJar === undefined;
+              if (hasExplicitBody) {
+                normalizedOptions.clearBody();
               }
-              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 (clearsCookieJar) {
+                normalizedOptions.cookieJar = undefined;
               }
-              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, fetchContext);
-            const hasStale = p.__staleWhileFetching !== undefined;
-            const staleVal = hasStale && allowStale;
-            if (status) {
-              status.fetch = hasStale && isStale ? "stale" : "refresh";
-              if (staleVal && isStale) status.returnedStale = true;
-            }
-            return staleVal ? p.__staleWhileFetching : (p.__returned = p);
-          }
-        }
-
-        get(
-          k,
-          {
-            allowStale = this.allowStale,
-            updateAgeOnGet = this.updateAgeOnGet,
-            noDeleteOnStaleGet = this.noDeleteOnStaleGet,
-            status,
-          } = {}
-        ) {
-          const index = this.keyMap.get(k);
-          if (index !== undefined) {
-            const value = this.valList[index];
-            const fetching = this.isBackgroundFetch(value);
-            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);
-                }
-                if (status) status.returnedStale = allowStale;
-                return allowStale ? value : undefined;
-              } else {
-                if (status) {
-                  status.returnedStale =
-                    allowStale && value.__staleWhileFetching !== undefined;
+              normalizedOptions.merge(optionsToMerge);
+              normalizedOptions.syncCookieHeaderAfterMerge(
+                previousState,
+                optionsToMerge.headers,
+              );
+              try {
+                assert.any(
+                  [
+                    distribution.string,
+                    distribution.urlInstance,
+                    distribution.undefined,
+                  ],
+                  optionsToMerge.url,
+                );
+              } catch (error) {
+                if (error instanceof Error) {
+                  error.message = `Option 'pagination.paginate.url': ${error.message}`;
                 }
-                return allowStale ? value.__staleWhileFetching : undefined;
+                throw error;
               }
-            } 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;
-            }
-          } else if (status) {
-            status.get = "miss";
-          }
-        }
-
-        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;
-          }
-        }
-
-        get del() {
-          deprecatedMethod("del", "delete");
-          return this.delete;
-        }
-
-        delete(k) {
-          let deleted = false;
-          if (this.size !== 0) {
-            const index = this.keyMap.get(k);
-            if (index !== undefined) {
-              deleted = true;
-              if (this.size === 1) {
-                this.clear();
-              } else {
-                this.removeItemSize(index);
-                const v = this.valList[index];
-                if (this.isBackgroundFetch(v)) {
-                  v.__abortController.abort(new Error("deleted"));
-                } else {
-                  this.dispose(v, k, "delete");
-                  if (this.disposeAfter) {
-                    this.disposed.push([v, k, "delete"]);
+              if (optionsToMerge.url !== undefined) {
+                const nextUrl = applyUrlOverride(
+                  normalizedOptions,
+                  optionsToMerge.url,
+                  optionsToMerge,
+                );
+                if (previousUrl) {
+                  normalizedOptions.stripSensitiveHeaders(
+                    previousUrl,
+                    nextUrl,
+                    optionsToMerge,
+                  );
+                  if (!isSameOrigin(previousUrl, nextUrl) && !hasExplicitBody) {
+                    normalizedOptions.clearBody();
                   }
                 }
-                this.keyMap.delete(k);
-                this.keyList[index] = null;
-                this.valList[index] = null;
-                if (index === this.tail) {
-                  this.tail = this.prev[index];
-                } else if (index === this.head) {
-                  this.head = this.next[index];
-                } else {
-                  this.next[this.prev[index]] = this.next[index];
-                  this.prev[this.next[index]] = this.prev[index];
-                }
-                this.size--;
-                this.free.push(index);
-              }
-            }
-          }
-          if (this.disposed) {
-            while (this.disposed.length) {
-              this.disposeAfter(...this.disposed.shift());
-            }
-          }
-          return deleted;
-        }
-
-        clear() {
-          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];
-              this.dispose(v, k, "delete");
-              if (this.disposeAfter) {
-                this.disposed.push([v, k, "delete"]);
               }
             }
+            numberOfRequests++;
           }
-
-          this.keyMap.clear();
-          this.valList.fill(null);
-          this.keyList.fill(null);
-          if (this.ttls) {
-            this.ttls.fill(0);
-            this.starts.fill(0);
-          }
-          if (this.sizes) {
-            this.sizes.fill(0);
-          }
-          this.head = 0;
-          this.tail = 0;
-          this.initialFill = 1;
-          this.free.length = 0;
-          this.calculatedSize = 0;
-          this.size = 0;
-          if (this.disposed) {
-            while (this.disposed.length) {
-              this.disposeAfter(...this.disposed.shift());
-            }
-          }
-        }
-
-        get reset() {
-          deprecatedMethod("reset", "clear");
-          return this.clear;
-        }
-
-        get length() {
-          deprecatedProperty("length", "size");
-          return this.size;
-        }
-
-        static get AbortController() {
-          return AC;
+        };
+        got.paginate = paginateEach;
+        got.paginate.all = async (url, options) =>
+          Array.fromAsync(paginateEach(url, options));
+        // For those who like very descriptive names
+        got.paginate.each = paginateEach;
+        // Stream API
+        got.stream = (url, options) =>
+          makeRequest(url, options, defaults.options, true);
+        // Shortcuts
+        for (const method of aliases) {
+          got[method] = (url, options) => got(url, { ...options, method });
+          got.stream[method] = (url, options) =>
+            makeRequest(url, { ...options, method }, defaults.options, true);
         }
-        static get AbortSignal() {
-          return AS;
+        if (!defaults.mutableDefaults) {
+          Object.freeze(defaults.handlers);
+          defaults.options.freeze();
         }
-      }
+        Object.defineProperty(got, "defaults", {
+          value: defaults,
+          writable: false,
+          configurable: false,
+          enumerable: true,
+        });
+        return got;
+      };
+      /* harmony default export */ const source_create = create; // CONCATENATED MODULE: ./node_modules/got/dist/source/index.js
 
-      module.exports = LRUCache;
+      const defaults = {
+        options: new Options(),
+        handlers: [],
+        mutableDefaults: false,
+      };
+      const got = source_create(defaults);
+      /* harmony default export */ const dist_source = got;
 
       /***/
     },
 
     /******/
-  }; // The module cache
+  };
   /************************************************************************/
-  /******/ /******/ var __webpack_module_cache__ = {}; // The require function
+  /******/ // The module cache
+  /******/ var __webpack_module_cache__ = {};
   /******/
-  /******/ /******/ function __nccwpck_require__(moduleId) {
+  /******/ // 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] = {
+    }
+    /******/ // Create a new module (and put it into the cache)
+    /******/ var module = (__webpack_module_cache__[moduleId] = {
       /******/ // no module.id needed
       /******/ // no module.loaded needed
       /******/ exports: {},
       /******/
-    }); // Execute the module function
+    });
     /******/
-    /******/ /******/ var threw = true;
+    /******/ // Execute the module function
+    /******/ var threw = true;
     /******/ try {
-      /******/ __webpack_modules__[moduleId].call(
-        module.exports,
+      /******/ __webpack_modules__[moduleId](
         module,
         module.exports,
-        __nccwpck_require__
+        __nccwpck_require__,
       );
       /******/ threw = false;
       /******/
     } finally {
       /******/ if (threw) delete __webpack_module_cache__[moduleId];
       /******/
-    } // Return the exports of the module
+    }
     /******/
-    /******/ /******/ return module.exports;
+    /******/ // Return the exports of the module
+    /******/ return module.exports;
     /******/
-  } /* webpack/runtime/compat */
+  }
   /******/
   /************************************************************************/
-  /******/ /******/
+  /******/ /* 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/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/compat */
+  /******/
   /******/ if (typeof __nccwpck_require__ !== "undefined")
     __nccwpck_require__.ab = __dirname + "/";
   /******/
   /************************************************************************/
   var __webpack_exports__ = {};
-  // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
-  (() => {
-    const core = __nccwpck_require__(2186);
-    const fs = __nccwpck_require__(7147);
-    const glob = __nccwpck_require__(5029);
-    const chromeWebstoreUpload = __nccwpck_require__(7459);
-
-    /*
+  // @actions/core v3+ is ESM-only (no CommonJS `require` export), so it is
+  // loaded via dynamic import inside run() before any use. ncc bundles the
+  // dynamically-imported module into dist/index.js.
+  let core;
+  const chrome_extension_upload_fs = __nccwpck_require__(9896);
+  const glob = __nccwpck_require__(8941);
+  const chromeWebstoreUpload = __nccwpck_require__(1725);
+
+  /*
   Forked from https://github.com/mnao305/chrome-extension-upload
   It uses a broken token fetch workflow after version 2.0, through this dependency -
   https://github.com/fregante/chrome-webstore-upload
 */
 
-    function uploadFile(webStore, filePath, publishFlg, publishTarget) {
-      const myZipFile = fs.createReadStream(filePath);
-
-      webStore.fetchToken().then((token) => {
-        webStore
-          .uploadExisting(myZipFile, token)
-          .then((uploadRes) => {
-            console.log("Uploading bundle");
-            console.log(uploadRes);
-            core.debug(uploadRes);
-            if (publishFlg === "true") {
-              webStore
-                .publish(publishTarget, token)
-                .then((publishRes) => {
-                  console.log("Publishing bundle");
-                  core.debug(publishRes);
-                  process.exitCode = 0;
-                  return;
-                })
-                .catch((e) => {
-                  core.error(e);
-                  core.setFailed(
-                    "publish error - You will need to access the Chrome Web Store Developer Dashboard and publish manually."
-                  );
-                });
-            }
-          })
-          .catch((e) => {
-            console.log(e);
-            core.error(e);
-            core.setFailed(
-              "upload error - You will need to go to the Chrome Web Store Developer Dashboard and upload it manually."
-            );
-          });
-      });
-    }
-
-    async function run() {
-      try {
-        const filePath = core.getInput("file-path", { required: true });
-        const extensionId = core.getInput("extension-id", { required: true });
-        const clientId = core.getInput("client-id", { required: true });
-        const clientSecret = core.getInput("client-secret", { required: true });
-        const refreshToken = core.getInput("refresh-token", { required: true });
-        const globFlg = core.getInput("glob");
-        const publishFlg = core.getInput("publish");
-        const publishTarget = core.getInput("publish-target");
-
-        const webStore = chromeWebstoreUpload({
-          extensionId,
-          clientId,
-          clientSecret,
-          refreshToken,
+  function uploadFile(webStore, filePath, publishFlg, publishTarget) {
+    const myZipFile = chrome_extension_upload_fs.createReadStream(filePath);
+
+    webStore.fetchToken().then((token) => {
+      webStore
+        .uploadExisting(myZipFile, token)
+        .then((uploadRes) => {
+          console.log("Uploading bundle");
+          console.log(uploadRes);
+          core.debug(uploadRes);
+          if (publishFlg === "true") {
+            webStore
+              .publish(publishTarget, token)
+              .then((publishRes) => {
+                console.log("Publishing bundle");
+                core.debug(publishRes);
+                process.exitCode = 0;
+                return;
+              })
+              .catch((e) => {
+                core.error(e);
+                core.setFailed(
+                  "publish error - You will need to access the Chrome Web Store Developer Dashboard and publish manually.",
+                );
+              });
+          }
+        })
+        .catch((e) => {
+          console.log(e);
+          core.error(e);
+          core.setFailed(
+            "upload error - You will need to go to the Chrome Web Store Developer Dashboard and upload it manually.",
+          );
         });
+    });
+  }
 
-        if (globFlg === "true") {
-          const files = glob.sync(filePath);
-          if (files.length > 0) {
-            uploadFile(webStore, files[0], publishFlg, publishTarget);
-          } else {
-            core.setFailed("No files to match.");
-          }
+  async function run() {
+    try {
+      core = await Promise.resolve(/* import() eager */).then(
+        __nccwpck_require__.bind(__nccwpck_require__, 9433),
+      );
+
+      const filePath = core.getInput("file-path", { required: true });
+      const extensionId = core.getInput("extension-id", { required: true });
+      const clientId = core.getInput("client-id", { required: true });
+      const clientSecret = core.getInput("client-secret", { required: true });
+      const refreshToken = core.getInput("refresh-token", { required: true });
+      const globFlg = core.getInput("glob");
+      const publishFlg = core.getInput("publish");
+      const publishTarget = core.getInput("publish-target");
+
+      const webStore = chromeWebstoreUpload({
+        extensionId,
+        clientId,
+        clientSecret,
+        refreshToken,
+      });
+
+      if (globFlg === "true") {
+        const files = glob.sync(filePath);
+        if (files.length > 0) {
+          uploadFile(webStore, files[0], publishFlg, publishTarget);
         } else {
-          uploadFile(webStore, filePath, publishFlg, publishTarget);
+          core.setFailed("No files to match.");
         }
-      } catch (error) {
+      } else {
+        uploadFile(webStore, filePath, publishFlg, publishTarget);
+      }
+    } catch (error) {
+      if (core) {
         core.setFailed(error.message);
+      } else {
+        console.error(error);
+        process.exitCode = 1;
       }
     }
+  }
 
-    run();
-  })();
+  run();
 
   module.exports = __webpack_exports__;
   /******/
diff --git a/.github/actions/chrome-extension-upload/index.js b/.github/actions/chrome-extension-upload/index.js
index f1e61f39fd..bd7aad0c1c 100644
--- a/.github/actions/chrome-extension-upload/index.js
+++ b/.github/actions/chrome-extension-upload/index.js
@@ -1,4 +1,7 @@
-const core = require("@actions/core");
+// @actions/core v3+ is ESM-only (no CommonJS `require` export), so it is
+// loaded via dynamic import inside run() before any use. ncc bundles the
+// dynamically-imported module into dist/index.js.
+let core;
 const fs = require("fs");
 const glob = require("glob");
 const chromeWebstoreUpload = require("./chrome-extension-upload");
@@ -31,7 +34,7 @@ function uploadFile(webStore, filePath, publishFlg, publishTarget) {
             .catch((e) => {
               core.error(e);
               core.setFailed(
-                "publish error - You will need to access the Chrome Web Store Developer Dashboard and publish manually."
+                "publish error - You will need to access the Chrome Web Store Developer Dashboard and publish manually.",
               );
             });
         }
@@ -40,7 +43,7 @@ function uploadFile(webStore, filePath, publishFlg, publishTarget) {
         console.log(e);
         core.error(e);
         core.setFailed(
-          "upload error - You will need to go to the Chrome Web Store Developer Dashboard and upload it manually."
+          "upload error - You will need to go to the Chrome Web Store Developer Dashboard and upload it manually.",
         );
       });
   });
@@ -48,6 +51,8 @@ function uploadFile(webStore, filePath, publishFlg, publishTarget) {
 
 async function run() {
   try {
+    core = await import(/* webpackMode: "eager" */ "@actions/core");
+
     const filePath = core.getInput("file-path", { required: true });
     const extensionId = core.getInput("extension-id", { required: true });
     const clientId = core.getInput("client-id", { required: true });
@@ -75,7 +80,12 @@ async function run() {
       uploadFile(webStore, filePath, publishFlg, publishTarget);
     }
   } catch (error) {
-    core.setFailed(error.message);
+    if (core) {
+      core.setFailed(error.message);
+    } else {
+      console.error(error);
+      process.exitCode = 1;
+    }
   }
 }
 
diff --git a/@shared/api/package.json b/@shared/api/package.json
index afda5bcf6b..01f5b3bffe 100644
--- a/@shared/api/package.json
+++ b/@shared/api/package.json
@@ -6,7 +6,7 @@
   "dependencies": {
     "@blockaid/client": "1.4.0",
     "@stellar/js-xdr": "4.0.0",
-    "bignumber.js": "11.1.4",
+    "bignumber.js": "9.3.0",
     "prettier": "3.8.4",
     "stellar-sdk": "npm:@stellar/stellar-sdk@16.0.0-rc.1",
     "stellar-sdk-next": "npm:@stellar/stellar-sdk@16.0.0-rc.1",
diff --git a/@shared/helpers/package.json b/@shared/helpers/package.json
index 6ebfd2444b..8dd53f14da 100644
--- a/@shared/helpers/package.json
+++ b/@shared/helpers/package.json
@@ -3,7 +3,7 @@
   "prettier": "../../.prettierrc.yaml",
   "version": "1.0.0",
   "dependencies": {
-    "bignumber.js": "11.1.4",
+    "bignumber.js": "9.3.0",
     "stellar-sdk": "npm:@stellar/stellar-sdk@16.0.0-rc.1",
     "stellar-sdk-next": "npm:@stellar/stellar-sdk@16.0.0-rc.1",
     "typescript": "6.0.3"
diff --git a/@stellar/freighter-api/tsconfig.json b/@stellar/freighter-api/tsconfig.json
index b2d97b9a76..3ae1d4ef26 100644
--- a/@stellar/freighter-api/tsconfig.json
+++ b/@stellar/freighter-api/tsconfig.json
@@ -6,10 +6,11 @@
     "declaration": true,
     "declarationDir": "build/",
     "outDir": "build/",
+    "rootDir": "../..",
     "paths": {
       "@shared/*": ["../../../@shared/*"]
     },
-    "types": ["@testing-library/jest-dom"]
+    "types": ["@testing-library/jest-dom", "node"]
   },
   "include": ["src"],
   "exclude": ["build", "node_modules", "src/**/*.test.js"]
diff --git a/docs/package.json b/docs/package.json
index 72aea90f5b..f84b2e88ac 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -28,7 +28,7 @@
   "dependencies": {
     "@docusaurus/core": "3.10.1",
     "@docusaurus/preset-classic": "3.10.1",
-    "@stellar/freighter-api": "latest",
+    "@stellar/freighter-api": "6.0.1",
     "clsx": "2.1.1",
     "react": "19.2.7",
     "react-dom": "19.2.7",
diff --git a/eslint.config.js b/eslint.config.js
index d0681fa7ac..dc7a93c7c0 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -87,6 +87,12 @@ export default [
 
       semi: ["error", "always"],
       "no-unsafe-optional-chaining": "off",
+
+      // Newly added to eslint's `recommended` set in ESLint 10. Kept off here to
+      // preserve the pre-upgrade lint baseline; adopting them (and fixing the
+      // ~42 existing violations) is tracked as a separate follow-up.
+      "no-useless-assignment": "off",
+      "preserve-caught-error": "off",
     },
   },
 ];
diff --git a/extension/package.json b/extension/package.json
index 3e48664636..4e7e2ce46c 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -32,7 +32,7 @@
     "@testing-library/react": "16.3.2",
     "@testing-library/user-event": "14.6.1",
     "@types/chrome": "0.1.43",
-    "@types/jsdom": "28.0.3",
+    "@types/jsdom": "21.1.7",
     "@types/lodash": "4.17.24",
     "@types/node": "26.0.1",
     "@types/qrcode.react": "3.0.0",
@@ -44,7 +44,7 @@
     "@types/redux": "3.6.31",
     "@types/webextension-polyfill": "0.12.5",
     "@types/yup": "0.32.0",
-    "bignumber.js": "11.1.4",
+    "bignumber.js": "9.3.0",
     "buffer": "6.0.3",
     "classnames": "2.5.1",
     "concurrently": "10.0.3",
@@ -60,7 +60,7 @@
     "i18next-resources-to-backend": "1.2.1",
     "i18next-scanner-webpack": "1.0.0",
     "jest-canvas-mock": "2.5.2",
-    "jest-environment-jsdom": "30.4.1",
+    "jest-environment-jsdom": "29.7.0",
     "js-yaml": "5.2.0",
     "jsonschema": "1.5.0",
     "lodash": "4.18.1",
diff --git a/extension/src/custom.d.ts b/extension/src/custom.d.ts
index 7613b7cd64..17b8594333 100644
--- a/extension/src/custom.d.ts
+++ b/extension/src/custom.d.ts
@@ -3,6 +3,12 @@ declare module "*.svg" {
   export default content;
 }
 
+// TypeScript 6 requires side-effect imports (e.g. `import "./styles.scss"`)
+// to resolve to a declared module; these are handled by webpack loaders.
+declare module "*.scss";
+
+declare module "*.css";
+
 declare module "qrcode.react";
 
 declare module "react-identicons";
diff --git a/package.json b/package.json
index 76a4ca129e..e162bda0fb 100644
--- a/package.json
+++ b/package.json
@@ -62,15 +62,16 @@
   },
   "dependencies": {
     "@actions/core": "3.0.1",
-    "@babel/core": "8.0.1",
-    "@babel/eslint-parser": "8.0.1",
+    "@babel/core": "7.29.7",
+    "@babel/eslint-parser": "7.29.7",
     "@babel/plugin-proposal-optional-chaining": "7.21.0",
-    "@babel/preset-env": "8.0.2",
-    "@babel/preset-react": "8.0.1",
-    "@babel/preset-typescript": "8.0.1",
+    "@babel/preset-env": "7.29.7",
+    "@babel/preset-react": "7.29.7",
+    "@babel/preset-typescript": "7.29.7",
+    "@eslint/js": "10.0.1",
     "@testing-library/dom": "10.4.1",
     "@testing-library/jest-dom": "6.9.1",
-    "@types/jest": "30.0.0",
+    "@types/jest": "29.5.14",
     "@types/react": "19.2.17",
     "@types/react-dom": "19.2.3",
     "@types/styled-components": "5.1.4",
@@ -78,7 +79,7 @@
     "@typescript-eslint/parser": "8.61.0",
     "@vercel/ncc": "0.44.0",
     "babel-eslint": "10.x",
-    "babel-jest": "30.4.1",
+    "babel-jest": "29.7.0",
     "babel-loader": "10.1.1",
     "babel-plugin-dynamic-import-node": "2.3.3",
     "babel-polyfill": "6.26.0",
@@ -97,9 +98,9 @@
     "got": "15.0.6",
     "husky": "9.1.7",
     "isomorphic-unfetch": "4.0.2",
-    "jest": "30.4.2",
+    "jest": "29.7.0",
     "jest-localstorage-mock": "2.4.26",
-    "jsdom": "29.1.1",
+    "jsdom": "26.0.0",
     "jsdom-global": "3.0.2",
     "lint-staged": "17.0.8",
     "npm-run-all": "4.1.5",
@@ -125,11 +126,13 @@
       "@lavamoat/preinstall-always-fail": false,
       "@testing-library/dom>aria-query>@babel/runtime-corejs3>core-js-pure": false,
       "babel-polyfill>core-js": false,
+      "eslint-import-resolver-typescript>unrs-resolver": false,
       "webpack-dev-server>chokidar>fsevents": true,
       "webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": true
     }
   },
   "resolutions": {
+    "@stellar/freighter-api": "workspace:*",
     "chalk@5.6.1": "5.6.2",
     "strip-ansi@7.1.1": "7.1.2",
     "color-convert@3.1.1": "3.1.0",
diff --git a/tsconfig.json b/tsconfig.json
index 6e7d3ad0ba..d7d15220f6 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,5 +1,6 @@
 {
   "compilerOptions": {
+    "ignoreDeprecations": "6.0",
     "sourceMap": true,
     "importHelpers": true,
     "target": "ES2019",
diff --git a/yarn.lock b/yarn.lock
index 7623b7ec04..33976a5658 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -285,20 +285,20 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@amplitude/analytics-browser@npm:^2.37.0":
-  version: 2.44.1
-  resolution: "@amplitude/analytics-browser@npm:2.44.1"
-  dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
-    "@amplitude/plugin-autocapture-browser": "npm:1.27.4"
-    "@amplitude/plugin-custom-enrichment-browser": "npm:0.1.11"
-    "@amplitude/plugin-event-property-attribution-browser": "npm:0.2.3"
-    "@amplitude/plugin-network-capture-browser": "npm:1.10.3"
-    "@amplitude/plugin-page-url-enrichment-browser": "npm:0.7.13"
-    "@amplitude/plugin-page-view-tracking-browser": "npm:2.11.3"
-    "@amplitude/plugin-web-vitals-browser": "npm:1.1.35"
+"@amplitude/analytics-browser@npm:^2.44.3":
+  version: 2.44.4
+  resolution: "@amplitude/analytics-browser@npm:2.44.4"
+  dependencies:
+    "@amplitude/analytics-core": "npm:2.52.0"
+    "@amplitude/plugin-autocapture-browser": "npm:1.28.2"
+    "@amplitude/plugin-custom-enrichment-browser": "npm:0.1.13"
+    "@amplitude/plugin-event-property-attribution-browser": "npm:0.2.5"
+    "@amplitude/plugin-network-capture-browser": "npm:1.10.5"
+    "@amplitude/plugin-page-url-enrichment-browser": "npm:0.7.15"
+    "@amplitude/plugin-page-view-tracking-browser": "npm:2.11.5"
+    "@amplitude/plugin-web-vitals-browser": "npm:1.1.37"
     tslib: "npm:^2.4.1"
-  checksum: 10c0/44ea504d40afac743f2afb7bd8bb7519ccf6c0917716d6df382431f41cea19ca50dda2bde993b32b2dcb8f901dcc1f116786137ed4a889c37df13d3eac2b106b
+  checksum: 10c0/51a5332a8f187da95255a2a00fd4089ea85da694175bd582ddb469806cdadde9cf2aae5936e8694019838e5b8faf319c804d9584ab207bca80be912abe1b86ab
   languageName: node
   linkType: hard
 
@@ -309,109 +309,119 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@amplitude/analytics-core@npm:2.50.0":
-  version: 2.50.0
-  resolution: "@amplitude/analytics-core@npm:2.50.0"
+"@amplitude/analytics-core@npm:2.52.0":
+  version: 2.52.0
+  resolution: "@amplitude/analytics-core@npm:2.52.0"
   dependencies:
     "@amplitude/analytics-connector": "npm:^1.6.4"
     "@types/zen-observable": "npm:0.8.3"
     safe-json-stringify: "npm:1.2.0"
     tslib: "npm:^2.4.1"
     zen-observable: "npm:0.10.0"
-  checksum: 10c0/cf09d7de24bbda9f939e95075819f39766f63af41997ae7dea5fb2281ed4f4bc9673debbac7c465f3a7f59d6227afadd9c41b3c8b006509f61773ac085c803dd
+  checksum: 10c0/1d82785b6331de26871b33947c4e2de09a131ee78c7cee07c0611cc386986f150d7cc72c9f3258a40da6549ec03566397bca35ea12d928b65c65e37752fd34b8
   languageName: node
   linkType: hard
 
-"@amplitude/experiment-core@npm:^0.13.1":
-  version: 0.13.1
-  resolution: "@amplitude/experiment-core@npm:0.13.1"
+"@amplitude/element-selector@npm:0.2.0":
+  version: 0.2.0
+  resolution: "@amplitude/element-selector@npm:0.2.0"
+  dependencies:
+    tslib: "npm:^2.4.1"
+  checksum: 10c0/63c65f5650f64f06dc94d50889c63b27caf5504d34d205b4fb4c3679cc12221bdcf381c3d10db65f07ec14bb3b37562ef5caf8a717664219f727e34c47cd4814
+  languageName: node
+  linkType: hard
+
+"@amplitude/experiment-core@npm:^0.13.2":
+  version: 0.13.3
+  resolution: "@amplitude/experiment-core@npm:0.13.3"
   dependencies:
     js-base64: "npm:^3.7.5"
-  checksum: 10c0/c80354c7f8ddfd463e43300302b0d4d2a44f773b256d9cc62d8af4c55e054d677d25996c3a95299fd1a731072ace923b36a7d1ca5c01e1315ee5b1cbdc0e0e4c
+  checksum: 10c0/f9e95bd568a6a1f0d0c6f872d7dae85fedbe310ba92e4303541444a0d54e24f031e7857f5a3213ced9cf760ebae1550969bb187220d0e24466a02fb0d34580d5
   languageName: node
   linkType: hard
 
-"@amplitude/experiment-js-client@npm:^1.20.3":
-  version: 1.21.1
-  resolution: "@amplitude/experiment-js-client@npm:1.21.1"
+"@amplitude/experiment-js-client@npm:^1.21.1":
+  version: 1.21.2
+  resolution: "@amplitude/experiment-js-client@npm:1.21.2"
   dependencies:
     "@amplitude/analytics-connector": "npm:^1.6.4"
-    "@amplitude/experiment-core": "npm:^0.13.1"
+    "@amplitude/experiment-core": "npm:^0.13.2"
     "@amplitude/ua-parser-js": "npm:^0.7.31"
     base64-js: "npm:1.5.1"
     unfetch: "npm:4.1.0"
-  checksum: 10c0/f9b784a2a869ec9daacf66ab13128486c559dec0225a1f35964784f428095627631cc74f2030cdf45f0bf0ab3481fc44450e06b7f9045986408ffbb346714f3b
+  checksum: 10c0/bda0734236b4c21d10cf98c7fdf7f5873b4c624c2b74cbf70d8fbefc80c66e64966e5d2a37e7cc6b47d3dff0616a15200696d200723e144e56fe8f9c439a88dc
   languageName: node
   linkType: hard
 
-"@amplitude/plugin-autocapture-browser@npm:1.27.4":
-  version: 1.27.4
-  resolution: "@amplitude/plugin-autocapture-browser@npm:1.27.4"
+"@amplitude/plugin-autocapture-browser@npm:1.28.2":
+  version: 1.28.2
+  resolution: "@amplitude/plugin-autocapture-browser@npm:1.28.2"
   dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
+    "@amplitude/analytics-core": "npm:2.52.0"
+    "@amplitude/element-selector": "npm:0.2.0"
     tslib: "npm:^2.4.1"
-  checksum: 10c0/7c3108da3695739e4ec249380502d5b1494f1ee5648b23b898947ea5a5b2a67b8fac67bd02808af187b709e1085ccfa837c5907575f54061181798d68fe56809
+  checksum: 10c0/0e91da0c6ae21cebe6630f4181657c2ec0f1d0f7bfa2af800e13ac40ba788f1a66544eacffda6550428cb6a09322a55412fd9868f572a2101f31f455d33ab5d7
   languageName: node
   linkType: hard
 
-"@amplitude/plugin-custom-enrichment-browser@npm:0.1.11":
-  version: 0.1.11
-  resolution: "@amplitude/plugin-custom-enrichment-browser@npm:0.1.11"
+"@amplitude/plugin-custom-enrichment-browser@npm:0.1.13":
+  version: 0.1.13
+  resolution: "@amplitude/plugin-custom-enrichment-browser@npm:0.1.13"
   dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
+    "@amplitude/analytics-core": "npm:2.52.0"
     tslib: "npm:^2.4.1"
-  checksum: 10c0/f0a079abc88cc662861d0ad0fb9a0e635bcd1b737cb1158ac1d648258bbed3a290a4c31abe2a5ec0d24ed440dc5fb8c65031c90d0dd8dd6628a7104a646a945b
+  checksum: 10c0/d2f8679cc61d8359d3638a9fabf2223250341b4dab7e5b5404e7feecdcb9b271eb41acd93d2628cb9d04e7cfd3a6b106ad0521c8e582756d9fe7ca8f1cd65ccb
   languageName: node
   linkType: hard
 
-"@amplitude/plugin-event-property-attribution-browser@npm:0.2.3":
-  version: 0.2.3
-  resolution: "@amplitude/plugin-event-property-attribution-browser@npm:0.2.3"
+"@amplitude/plugin-event-property-attribution-browser@npm:0.2.5":
+  version: 0.2.5
+  resolution: "@amplitude/plugin-event-property-attribution-browser@npm:0.2.5"
   dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
+    "@amplitude/analytics-core": "npm:2.52.0"
     tslib: "npm:^2.4.1"
-  checksum: 10c0/21548db119f82f3d90c0c157e91242c97d06e3bb6919cc9cbb15e95676b9c773502edac42ebd1a23bd1f4f36e1185dbc76fae97cc0a143c68959b38fae6704d0
+  checksum: 10c0/9cc8ce5b0bd66f7ebb7e43dc823b86fe690989c1a5ab40a2c2602a7057ce9ad645293eb3cf1a542dc5282e359d3efb6caf2e57cbe0de87674f67ab417f635493
   languageName: node
   linkType: hard
 
-"@amplitude/plugin-network-capture-browser@npm:1.10.3":
-  version: 1.10.3
-  resolution: "@amplitude/plugin-network-capture-browser@npm:1.10.3"
+"@amplitude/plugin-network-capture-browser@npm:1.10.5":
+  version: 1.10.5
+  resolution: "@amplitude/plugin-network-capture-browser@npm:1.10.5"
   dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
+    "@amplitude/analytics-core": "npm:2.52.0"
     tslib: "npm:^2.4.1"
-  checksum: 10c0/2be01d2d6a583c3b9b03861deb97555dbeec5a7454a8a2cd04210b5604955d96a8182e3b38948785d62af7da9c6b67327a18c5d0c4c3205ad5b3abc69e24c050
+  checksum: 10c0/71eef8e7c2a1907f74bb8fb93662c55747a69718a5c522a5c7b93c48a283830e4de6b5e7ec0c3524fa0c970ce6000456f2e467543258c4e8a22817396263d188
   languageName: node
   linkType: hard
 
-"@amplitude/plugin-page-url-enrichment-browser@npm:0.7.13":
-  version: 0.7.13
-  resolution: "@amplitude/plugin-page-url-enrichment-browser@npm:0.7.13"
+"@amplitude/plugin-page-url-enrichment-browser@npm:0.7.15":
+  version: 0.7.15
+  resolution: "@amplitude/plugin-page-url-enrichment-browser@npm:0.7.15"
   dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
+    "@amplitude/analytics-core": "npm:2.52.0"
     tslib: "npm:^2.4.1"
-  checksum: 10c0/f81bdc4f1f499e745dfb79bb48a9a9da8e487ef4fc5a2e6f39788af18a6c245d4ad84407b40696e6c064046599bb02759dfc1a0bd2f93326427b8085ad546dc5
+  checksum: 10c0/1ab16ee1471835cd65b266c3ec1e7f5c87a7760a90a1194511273a75583140efbdff9bdf31575811d5f29a805d96a67f16c22f75ccd75a90277722b520a3d5d0
   languageName: node
   linkType: hard
 
-"@amplitude/plugin-page-view-tracking-browser@npm:2.11.3":
-  version: 2.11.3
-  resolution: "@amplitude/plugin-page-view-tracking-browser@npm:2.11.3"
+"@amplitude/plugin-page-view-tracking-browser@npm:2.11.5":
+  version: 2.11.5
+  resolution: "@amplitude/plugin-page-view-tracking-browser@npm:2.11.5"
   dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
+    "@amplitude/analytics-core": "npm:2.52.0"
     tslib: "npm:^2.4.1"
-  checksum: 10c0/2a5548a2138cd0817b2af6740f129ca820343bd6a54975219c941accfaad126cde24a5295e54b3a30ea61f457ee545f4d5dcddb6912c524a4a2c132f8c071729
+  checksum: 10c0/ee83fb577d2cf06c9dbcfe1d277503e483207766f13db1887f0db1e9e33fea22db2430ed0e042289d3406344a5e7efb24104d3dd7631905f4688a5364adeaa6c
   languageName: node
   linkType: hard
 
-"@amplitude/plugin-web-vitals-browser@npm:1.1.35":
-  version: 1.1.35
-  resolution: "@amplitude/plugin-web-vitals-browser@npm:1.1.35"
+"@amplitude/plugin-web-vitals-browser@npm:1.1.37":
+  version: 1.1.37
+  resolution: "@amplitude/plugin-web-vitals-browser@npm:1.1.37"
   dependencies:
-    "@amplitude/analytics-core": "npm:2.50.0"
+    "@amplitude/analytics-core": "npm:2.52.0"
     tslib: "npm:^2.4.1"
     web-vitals: "npm:5.1.0"
-  checksum: 10c0/0724dc7bb8b6f4787af568d87d23e5af7f0bf570c7cd166da437caf1f81fa6e33c88cfafb49114213365a2de2cd3d514f705988cbbb2006f6b904268d0c0633f
+  checksum: 10c0/e06160461b9e4798640a586a7db386d5b0f1278f17219f1595e53b44bf503ea4eab0368cd709005bae7dc03f0a6aca4ce546269ecaec8c54389bfc8828e9d422
   languageName: node
   linkType: hard
 
@@ -435,47 +445,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@asamuzakjp/css-color@npm:^5.1.11":
-  version: 5.1.11
-  resolution: "@asamuzakjp/css-color@npm:5.1.11"
-  dependencies:
-    "@asamuzakjp/generational-cache": "npm:^1.0.1"
-    "@csstools/css-calc": "npm:^3.2.0"
-    "@csstools/css-color-parser": "npm:^4.1.0"
-    "@csstools/css-parser-algorithms": "npm:^4.0.0"
-    "@csstools/css-tokenizer": "npm:^4.0.0"
-  checksum: 10c0/32720bdff8daea6a8847aba6cdfae55baa3b4a2690b51d21db7f0382bbd183f3d9f2d5126df50afd889062635684b2819e47113629ee2e80c99389e75f48d060
-  languageName: node
-  linkType: hard
-
-"@asamuzakjp/dom-selector@npm:^7.1.1":
-  version: 7.1.1
-  resolution: "@asamuzakjp/dom-selector@npm:7.1.1"
-  dependencies:
-    "@asamuzakjp/generational-cache": "npm:^1.0.1"
-    "@asamuzakjp/nwsapi": "npm:^2.3.9"
-    bidi-js: "npm:^1.0.3"
-    css-tree: "npm:^3.2.1"
-    is-potential-custom-element-name: "npm:^1.0.1"
-  checksum: 10c0/8cec1c618781c94de5836a215bbe5aafb4d8b835b18c51faf8547f4574afa39f92def3951e40123860062467613dd825f1e1600ff32e8045cc099a91796dcfb8
-  languageName: node
-  linkType: hard
-
-"@asamuzakjp/generational-cache@npm:^1.0.1":
-  version: 1.0.1
-  resolution: "@asamuzakjp/generational-cache@npm:1.0.1"
-  checksum: 10c0/1de62de43764e13fca3b9a31b7ea9b1bf0780fe053d266e40378a19ff8c66b543e011e6a0df02d410cd59bf981126706f176cdbb938985165202c4a079fe1057
-  languageName: node
-  linkType: hard
-
-"@asamuzakjp/nwsapi@npm:^2.3.9":
-  version: 2.3.9
-  resolution: "@asamuzakjp/nwsapi@npm:2.3.9"
-  checksum: 10c0/869b81382e775499c96c45c6dbe0d0766a6da04bcf0abb79f5333535c4e19946851acaa43398f896e2ecc5a1de9cf3db7cf8c4b1afac1ee3d15e21584546d74d
-  languageName: node
-  linkType: hard
-
-"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.27.1, @babel/code-frame@npm:^7.29.7":
+"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/code-frame@npm:7.29.7"
   dependencies:
@@ -486,16 +456,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/code-frame@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/code-frame@npm:8.0.0"
-  dependencies:
-    "@babel/helper-validator-identifier": "npm:^8.0.0"
-    js-tokens: "npm:^10.0.0"
-  checksum: 10c0/2ea8614018bcd8c86358ab6aa930508115d2205e5e111f736d355b150453818bdf487850f6dec5ec92a10bf27ba4536f4b3b8ad9204514e43d8d68ff2e542443
-  languageName: node
-  linkType: hard
-
 "@babel/compat-data@npm:^7.28.6, @babel/compat-data@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/compat-data@npm:7.29.7"
@@ -503,38 +463,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/compat-data@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/compat-data@npm:8.0.0"
-  checksum: 10c0/8d934415a308cf6c893d815b1dbb79faf7678c1e489934e81025c61673bf98ef88770b42297492bbd4c014978688012aa635e855bf8553b96ec8287bddfbae89
-  languageName: node
-  linkType: hard
-
-"@babel/core@npm:8.0.1":
-  version: 8.0.1
-  resolution: "@babel/core@npm:8.0.1"
-  dependencies:
-    "@babel/code-frame": "npm:^8.0.0"
-    "@babel/generator": "npm:^8.0.0"
-    "@babel/helper-compilation-targets": "npm:^8.0.0"
-    "@babel/helpers": "npm:^8.0.0"
-    "@babel/parser": "npm:^8.0.0"
-    "@babel/template": "npm:^8.0.0"
-    "@babel/traverse": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-    "@types/gensync": "npm:^1.0.5"
-    convert-source-map: "npm:^2.0.0"
-    empathic: "npm:^2.0.1"
-    gensync: "npm:^1.0.0-beta.2"
-    import-meta-resolve: "npm:^4.2.0"
-    json5: "npm:^2.2.3"
-    obug: "npm:^2.1.1"
-    semver: "npm:^7.7.3"
-  checksum: 10c0/e7fd9266d22906132fb052383a624358f54268dade31d50264416afeab6e5648cd23c7e845a89a501d270b80601d6e89abc67de0a9f1f55133f4abd8ac745be7
-  languageName: node
-  linkType: hard
-
-"@babel/core@npm:^7.18.5, @babel/core@npm:^7.21.3, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.4, @babel/core@npm:^7.25.9, @babel/core@npm:^7.27.4, @babel/core@npm:^7.28.0":
+"@babel/core@npm:7.29.7, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.18.5, @babel/core@npm:^7.21.3, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.4, @babel/core@npm:^7.25.9, @babel/core@npm:^7.28.0":
   version: 7.29.7
   resolution: "@babel/core@npm:7.29.7"
   dependencies:
@@ -557,21 +486,21 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/eslint-parser@npm:8.0.1":
-  version: 8.0.1
-  resolution: "@babel/eslint-parser@npm:8.0.1"
+"@babel/eslint-parser@npm:7.29.7":
+  version: 7.29.7
+  resolution: "@babel/eslint-parser@npm:7.29.7"
   dependencies:
-    eslint-scope: "npm:^9.1.0"
-    eslint-visitor-keys: "npm:^5.0.0"
-    semver: "npm:^7.7.3"
+    "@nicolo-ribaudo/eslint-scope-5-internals": "npm:5.1.1-v1"
+    eslint-visitor-keys: "npm:^2.1.0"
+    semver: "npm:^6.3.1"
   peerDependencies:
-    "@babel/core": ^8.0.0
-    eslint: ^9.0.0 || ^10.0.0
-  checksum: 10c0/dc8b848a11918069c112be60ba8f42dd963581bcd9664edbda184393b9a1a5a8424596e9b17b6691ac2f7d223a01dd300f5a574e58a46fa13dac6ade6d77b272
+    "@babel/core": ^7.11.0
+    eslint: ^7.5.0 || ^8.0.0 || ^9.0.0
+  checksum: 10c0/c24dcd941b0a149b197a9e9c3297a01d621775ac71cdf2e1134b1097c1691b46ce969355e1be3676d83b88f62c43ed33cf3a499da21ea11a5eb07339ce64ac20
   languageName: node
   linkType: hard
 
-"@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.27.5, @babel/generator@npm:^7.29.7":
+"@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.29.7, @babel/generator@npm:^7.7.2":
   version: 7.29.7
   resolution: "@babel/generator@npm:7.29.7"
   dependencies:
@@ -584,20 +513,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/generator@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/generator@npm:8.0.0"
-  dependencies:
-    "@babel/parser": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-    "@jridgewell/gen-mapping": "npm:^0.3.12"
-    "@jridgewell/trace-mapping": "npm:^0.3.28"
-    "@types/jsesc": "npm:^2.5.0"
-    jsesc: "npm:^3.0.2"
-  checksum: 10c0/2b2d171beaedcacca62164f0f39bc8962df5f9700a54c5515174276ea20b3a53933e9804e0b35c2be1059108a764447d99d0c5beb63ecbbf8c66035ca6c003c4
-  languageName: node
-  linkType: hard
-
 "@babel/helper-annotate-as-pure@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-annotate-as-pure@npm:7.29.7"
@@ -607,15 +522,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-annotate-as-pure@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-annotate-as-pure@npm:8.0.0"
-  dependencies:
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/3705ef8d1e95d86f3bb3380a9fb45a92be03eb77dfc5a684295dbdeb65e93c681516e98f5a6cbdc5f67186a68e3dae3e0528012ad4e626ed46853ad1e0bfd1c7
-  languageName: node
-  linkType: hard
-
 "@babel/helper-compilation-targets@npm:^7.28.6, @babel/helper-compilation-targets@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-compilation-targets@npm:7.29.7"
@@ -629,19 +535,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-compilation-targets@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-compilation-targets@npm:8.0.0"
-  dependencies:
-    "@babel/compat-data": "npm:^8.0.0"
-    "@babel/helper-validator-option": "npm:^8.0.0"
-    browserslist: "npm:^4.24.0"
-    lru-cache: "npm:^11.0.0"
-    semver: "npm:^7.7.3"
-  checksum: 10c0/871876b4a9de1a2be68f2ec6c7576933dd9a8452bfb3c02ebcc16939791b8f2ab7467686e40060c6abfbb44bd76f898972e53034c3e7626a686a656f3a8d3bc9
-  languageName: node
-  linkType: hard
-
 "@babel/helper-create-class-features-plugin@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-create-class-features-plugin@npm:7.29.7"
@@ -659,23 +552,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-create-class-features-plugin@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/helper-create-class-features-plugin@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    "@babel/helper-member-expression-to-functions": "npm:^8.0.0"
-    "@babel/helper-optimise-call-expression": "npm:^8.0.0"
-    "@babel/helper-replace-supers": "npm:^8.0.1"
-    "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0"
-    "@babel/traverse": "npm:^8.0.0"
-    semver: "npm:^7.7.3"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/ead1f980e3f400a87cd1f77e29789d3a85f6b322df51e59c20d21eb42745699561b6ffec6aa42877ad08c59a5e5bf5fc3d660b3a8518178d2a4e246d8bad4c4b
-  languageName: node
-  linkType: hard
-
 "@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-create-regexp-features-plugin@npm:7.29.7"
@@ -689,19 +565,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-create-regexp-features-plugin@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/helper-create-regexp-features-plugin@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    regexpu-core: "npm:^6.3.1"
-    semver: "npm:^7.7.3"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/6eaebface05ff519808d559f2915efd84c9894304b0b6ec0e6702561dcc0283a44c2dbf5c176028cd0af8f29f117d5169dfd88ea3df69b7116fe5c66582076e8
-  languageName: node
-  linkType: hard
-
 "@babel/helper-define-polyfill-provider@npm:^0.6.5, @babel/helper-define-polyfill-provider@npm:^0.6.8":
   version: 0.6.8
   resolution: "@babel/helper-define-polyfill-provider@npm:0.6.8"
@@ -717,19 +580,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-define-polyfill-provider@npm:^1.0.0":
-  version: 1.0.0
-  resolution: "@babel/helper-define-polyfill-provider@npm:1.0.0"
-  dependencies:
-    "@babel/helper-compilation-targets": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.0"
-    lodash.debounce: "npm:^4.0.8"
-  peerDependencies:
-    "@babel/core": ^7.4.0 || ^8.0.0
-  checksum: 10c0/9a422f6b8c5f3fb2cb862d189c19b521f4bae6f555e196e6635f6b7f870178f5dee14e2b8e51695bd5351ae2f6073f4ff1161dc873d45e9462534ce7240c6ad3
-  languageName: node
-  linkType: hard
-
 "@babel/helper-globals@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-globals@npm:7.29.7"
@@ -737,13 +587,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-globals@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-globals@npm:8.0.0"
-  checksum: 10c0/c53a9fcf451df5c8d3aa72f282d1f058e2874e2ccbbdbb5572a805595d75a9355461822d01a6cac3128f5d9ab9a3a99538c6be4ebd728068afb20a65a4d1d986
-  languageName: node
-  linkType: hard
-
 "@babel/helper-member-expression-to-functions@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-member-expression-to-functions@npm:7.29.7"
@@ -754,16 +597,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-member-expression-to-functions@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-member-expression-to-functions@npm:8.0.0"
-  dependencies:
-    "@babel/traverse": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/7cf5d0344a014c8315136689f4db8e23d96c90fceb86beab695e79c5cb5fd69f8400b84547d4ee1cf43d8c88c90092828f278e3f8c8e1e2adb8abb92b971c9d0
-  languageName: node
-  linkType: hard
-
 "@babel/helper-module-imports@npm:^7.27.1, @babel/helper-module-imports@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-module-imports@npm:7.29.7"
@@ -774,16 +607,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-module-imports@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-module-imports@npm:8.0.0"
-  dependencies:
-    "@babel/traverse": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/32ea7bb4eaecb23674cf21bd2acf7ae5c6fbbc5decaedb461e811b543b47b3eb95918aa1f2bed6586ba13a7c60fb2c9b88a399958e00320d7d1b67f8b2ef6590
-  languageName: node
-  linkType: hard
-
 "@babel/helper-module-transforms@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-module-transforms@npm:7.29.7"
@@ -797,19 +620,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-module-transforms@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/helper-module-transforms@npm:8.0.1"
-  dependencies:
-    "@babel/helper-module-imports": "npm:^8.0.0"
-    "@babel/helper-validator-identifier": "npm:^8.0.0"
-    "@babel/traverse": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/2701c23bf2edf679182e0998c938792127adb952765fb07c1096e0ec772a04fb3b54b761d9c69f63c6745a6322f303a45b5eae652868b764771c0550146aec5f
-  languageName: node
-  linkType: hard
-
 "@babel/helper-optimise-call-expression@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-optimise-call-expression@npm:7.29.7"
@@ -819,15 +629,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-optimise-call-expression@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-optimise-call-expression@npm:8.0.0"
-  dependencies:
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/8871c1a17ed816f6728b3ec4941c1922a7bcf8e1b293a592a90ff62525460b05b82405938ca9d2c9adcc66b7f28eaf138e43388d807395a14317b7ba1b55c9fe
-  languageName: node
-  linkType: hard
-
 "@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.27.1, @babel/helper-plugin-utils@npm:^7.28.6, @babel/helper-plugin-utils@npm:^7.29.7, @babel/helper-plugin-utils@npm:^7.8.0":
   version: 7.29.7
   resolution: "@babel/helper-plugin-utils@npm:7.29.7"
@@ -835,15 +636,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-plugin-utils@npm:^8.0.0, @babel/helper-plugin-utils@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/helper-plugin-utils@npm:8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/ec56d98187a58dfbc2ce9d75fd5f880d6acacefb314e32fe40c57293c6c65c659fa116c665e430aff8b153b7d0ea63f16ca290e9d2283196e3c7a3dd61bffa94
-  languageName: node
-  linkType: hard
-
 "@babel/helper-remap-async-to-generator@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-remap-async-to-generator@npm:7.29.7"
@@ -857,19 +649,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-remap-async-to-generator@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/helper-remap-async-to-generator@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    "@babel/helper-wrap-function": "npm:^8.0.0"
-    "@babel/traverse": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/263135f5ddec7f249d7d91f7532fdbeb8e34bd1f44bb01ba7b02fb05d18a670c41c5098c532f4901241ec1904dd4fe3aafdaa6b5940c9f678c9926256eb0bd3a
-  languageName: node
-  linkType: hard
-
 "@babel/helper-replace-supers@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-replace-supers@npm:7.29.7"
@@ -883,19 +662,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-replace-supers@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/helper-replace-supers@npm:8.0.1"
-  dependencies:
-    "@babel/helper-member-expression-to-functions": "npm:^8.0.0"
-    "@babel/helper-optimise-call-expression": "npm:^8.0.0"
-    "@babel/traverse": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/1289ab0f58c6f5150f5d5caf627de9a1e20b32d08bf1b9c90569aca7b0c32779482fadb1c38142b50f98a3794c9ac175fd4184a5fccc2edc76769f16c4dbaf14
-  languageName: node
-  linkType: hard
-
 "@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.29.7"
@@ -906,16 +672,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-skip-transparent-expression-wrappers@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:8.0.0"
-  dependencies:
-    "@babel/traverse": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/b66b8db1438efd7754eeb5d1198f2a6c34f19c06f76af057c480ae354c5f4d1488f6ca92c581d957f28d16881f931a1092b5a70c893924a1158258384d9f6597
-  languageName: node
-  linkType: hard
-
 "@babel/helper-string-parser@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-string-parser@npm:7.29.7"
@@ -923,13 +679,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-string-parser@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-string-parser@npm:8.0.0"
-  checksum: 10c0/b2272a9eaa63a1bc9ce2673d580e69620fd79786f3e3cf1891f406801f8211810f194f2739fef920f01a97ae06ae465b2dfd238ab8037a3182d0869939ca9a5d
-  languageName: node
-  linkType: hard
-
 "@babel/helper-validator-identifier@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-validator-identifier@npm:7.29.7"
@@ -937,13 +686,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-validator-identifier@npm:^8.0.0":
-  version: 8.0.2
-  resolution: "@babel/helper-validator-identifier@npm:8.0.2"
-  checksum: 10c0/629eda2a0a99442a1628bbef5f9fd8e26c1aa21ddbf02760d1c482b737932b1bb21fb1f89aacf9c3cf0642b481b810e39f94b8ae9aa44fc4f5516ebec6798b7b
-  languageName: node
-  linkType: hard
-
 "@babel/helper-validator-option@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-validator-option@npm:7.29.7"
@@ -951,13 +693,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-validator-option@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-validator-option@npm:8.0.0"
-  checksum: 10c0/eb466b464479f75c15ba06f6c53862f10d90740350c9203b3d81c6f33d4193bf0a7b7b89de901f256fb639a1346475b48616734af89906d6b4fcf9a856d9f1f1
-  languageName: node
-  linkType: hard
-
 "@babel/helper-wrap-function@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helper-wrap-function@npm:7.29.7"
@@ -969,17 +704,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helper-wrap-function@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helper-wrap-function@npm:8.0.0"
-  dependencies:
-    "@babel/template": "npm:^8.0.0"
-    "@babel/traverse": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/c290ab9e2bc9d22134ed9870e26854425cd9ba9a3795dc5a0fcc01746970302ad6162cf87d57a3e8708117d71c0ffa0fdb2df1d20af0534431837052603909a5
-  languageName: node
-  linkType: hard
-
 "@babel/helpers@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/helpers@npm:7.29.7"
@@ -990,17 +714,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/helpers@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/helpers@npm:8.0.0"
-  dependencies:
-    "@babel/template": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/5d649bf2cfc37b76b8c9dd7d2992fa0503a6081c2439cd4de16b56abb778f3bb391441d687594f3e08af5ef3f59c8b93a77ae81f9e5f831989ebfd3443851189
-  languageName: node
-  linkType: hard
-
-"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.29.7, @babel/parser@npm:^7.7.0":
+"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.29.7, @babel/parser@npm:^7.7.0":
   version: 7.29.7
   resolution: "@babel/parser@npm:7.29.7"
   dependencies:
@@ -1011,17 +725,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/parser@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/parser@npm:8.0.0"
-  dependencies:
-    "@babel/types": "npm:^8.0.0"
-  bin:
-    parser: ./bin/babel-parser.js
-  checksum: 10c0/f10665bf3289f4bdc43bc58c482d6baa9fc4e306460d1bc57b059486dc9f23ed4463e746f62d721396466e2a2e0b32d856648b8c30dedbf6b69787b430f21e75
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.29.7"
@@ -1034,17 +737,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/b08dde23715b5970e73319316d2357e1675702acdf92a4670df3c9b2d23b3003a5cc6f0b5c8fd8ea550fe9f78f5d41eb2e9ad6ea3eaf9a33e14eb0a7e380cde5
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.29.7"
@@ -1056,17 +748,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/85211197d91adb8c0bdccf2dcd7c4deb683a7f0586de40433247a77f3ca8ac01b6fe643fca267a1dd71117cc616670d313e01d3e0402d32288bd5d7f11f99128
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.29.7"
@@ -1078,17 +759,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/cefca5cacfa4fc5c0b2aa4f457f285d59bd6a828f1ba08800b40c1799438f754469b24e4228ab6e8f17fee0c068a123cd1b5f9c6828791bf7b23819f7c124415
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:7.29.7"
@@ -1101,18 +771,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/48ac670a9aae75899afb5122aad31de60871bf252643c45f277de9bac2e3ba61e6bd16dc7b0099a2a583190dafe0d15f25baf98ac93b8f1dce382e16c9e26437
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.29.7"
@@ -1126,19 +784,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0"
-    "@babel/plugin-transform-optional-chaining": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/a9bd4acab80291b833e64403060ba50ca1ddae30e017d17433b4be58528b8a4cb13fcb29de30c075147bbeb65a9c154d540db92236c0c19d9ae0f88b3ea214e5
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.29.7"
@@ -1151,17 +796,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/885b3f574dae871c9c95a00b47e3f41eb4fd5db55633534c3f7d696158512e772be9b469dad57508446e5df1982b19fdc8b211946d8fccfbf3d45cf9f61fe4f9
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-proposal-optional-chaining@npm:7.21.0":
   version: 7.21.0
   resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0"
@@ -1283,7 +917,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-syntax-jsx@npm:^7.27.1, @babel/plugin-syntax-jsx@npm:^7.29.7":
+"@babel/plugin-syntax-jsx@npm:^7.29.7, @babel/plugin-syntax-jsx@npm:^7.7.2":
   version: 7.29.7
   resolution: "@babel/plugin-syntax-jsx@npm:7.29.7"
   dependencies:
@@ -1294,17 +928,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-syntax-jsx@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-syntax-jsx@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/24662fe43e67430504785472776839eb75e74ccabe21cdbf29ca2e1763e394be632b9d336f66fccc9f422de8638e179410e5b0b0796e85276fb8a8d7a7aab036
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4":
   version: 7.10.4
   resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4"
@@ -1393,7 +1016,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-syntax-typescript@npm:^7.27.1, @babel/plugin-syntax-typescript@npm:^7.29.7":
+"@babel/plugin-syntax-typescript@npm:^7.29.7, @babel/plugin-syntax-typescript@npm:^7.7.2":
   version: 7.29.7
   resolution: "@babel/plugin-syntax-typescript@npm:7.29.7"
   dependencies:
@@ -1404,17 +1027,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-syntax-typescript@npm:^8.0.1":
-  version: 8.0.3
-  resolution: "@babel/plugin-syntax-typescript@npm:8.0.3"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/d8c78e59d63efff9b26c6679238dd926a3f1ff68b97a473c9d4dbb60046cafad3858b6a8eba26c3c33bc66afbb6da5f16a5c70f4662137edf389a32c9995c225
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6":
   version: 7.18.6
   resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6"
@@ -1438,17 +1050,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-arrow-functions@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-arrow-functions@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/60ae1fc3e049b50bd94971fa4733ca79fb84573cedaf81e5bebf2682596eb46d9fcc28a6ee5115ce9376a6f644e0a192b59b343b016387e13474c769bdac3d66
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-async-generator-functions@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-async-generator-functions@npm:7.29.7"
@@ -1462,19 +1063,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-async-generator-functions@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-async-generator-functions@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-remap-async-to-generator": "npm:^8.0.1"
-    "@babel/traverse": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/964e222c2c449908c27f883a24c745b1437f11fd05719abace1239b14a039a0ae9cfb01128b08be6c622079ff28186e0b765848d6cf7a5549fc7c1b1d86d61ee
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-async-to-generator@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-async-to-generator@npm:7.29.7"
@@ -1488,19 +1076,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-async-to-generator@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-async-to-generator@npm:8.0.1"
-  dependencies:
-    "@babel/helper-module-imports": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-remap-async-to-generator": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/b23365e1486683cfef1fa83b67131990faa0984529bcb032714c0d0885a11ce94d0e85eb5ff6d94a5975e2a32c49b5abef67b19c4bff38199779b6495f5e4bf9
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-block-scoped-functions@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.29.7"
@@ -1512,17 +1087,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-block-scoped-functions@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-block-scoped-functions@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/507e9ddd59f25c449a29b2b64dea5cb2deddd429cb99c8ef0e6fd139ad4c91783a9ada596c5de769d7763df2a344c0288264cdde836ae53b28bc8b59b35cb744
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-block-scoping@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-block-scoping@npm:7.29.7"
@@ -1534,17 +1098,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-block-scoping@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-block-scoping@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/593cbddb8535778d8bbc2ce2782ddde021d944eb790c0076b91798e9381f90d1f4ace7dc0fe81bcf763e5b5a033bef7369132abc3cf2338c3e3893b20c9b5f6a
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-class-properties@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-class-properties@npm:7.29.7"
@@ -1557,18 +1110,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-class-properties@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-class-properties@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-class-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/cbb877d4a6b293a2b4e13c25c443955f5840eff05f86c5d7e65986f9b84d6725d68855098277775b065b0c3f8c976fa5a8b238c57680003d3f1c48d5872825a1
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-class-static-block@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-class-static-block@npm:7.29.7"
@@ -1581,21 +1122,9 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-class-static-block@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-class-static-block@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-class-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/aaf976ac4e8615362d37dd144feb8f071b612cd354b7a7e36fa5ca43fa73311aba377b070f3bd4e47ac05201afc1b3d40a5c005ef6f12687b9a15c1952002f4e
-  languageName: node
-  linkType: hard
-
-"@babel/plugin-transform-classes@npm:^7.29.7":
-  version: 7.29.7
-  resolution: "@babel/plugin-transform-classes@npm:7.29.7"
+"@babel/plugin-transform-classes@npm:^7.29.7":
+  version: 7.29.7
+  resolution: "@babel/plugin-transform-classes@npm:7.29.7"
   dependencies:
     "@babel/helper-annotate-as-pure": "npm:^7.29.7"
     "@babel/helper-compilation-targets": "npm:^7.29.7"
@@ -1609,22 +1138,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-classes@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-classes@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    "@babel/helper-compilation-targets": "npm:^8.0.0"
-    "@babel/helper-globals": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-replace-supers": "npm:^8.0.1"
-    "@babel/traverse": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/730767a5389bcf89b2ff9deef098f2934cb6670d87f87d828c9ef564d2f2d5ac82006f2b01395daf4a0f3a5523c848fc06bf61f18dd1a0a586fe739474228740
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-computed-properties@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-computed-properties@npm:7.29.7"
@@ -1637,17 +1150,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-computed-properties@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-computed-properties@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/a8b1190b986ac9a57a74e85dfdf376811a0dca8a4d0f5a7f7e7c006bdbfb3fadc1ec7cd639f7258ef15de69fd2c9bf88f3d14dad1f9228cadb30bf4fa44a44e1
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-destructuring@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-destructuring@npm:7.29.7"
@@ -1660,17 +1162,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-destructuring@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-destructuring@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/0cc3c9bfdedf46a4e480776b904d60857361cf5df66a31842fd6dbf84c219eb13d661e588b84f6efcbc07226706a0ed4e212f2f502102f39d61e7561e5c6f250
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-dotall-regex@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-dotall-regex@npm:7.29.7"
@@ -1683,18 +1174,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-dotall-regex@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-dotall-regex@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/18fb3c764a14c88649e8439a611b1d6ed00abcf1b92ced241da500a8fda38edef429607d9692f8954218f4b621f4d84847cc2ab0189586071f3d6b333280c108
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-duplicate-keys@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-duplicate-keys@npm:7.29.7"
@@ -1706,17 +1185,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-duplicate-keys@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-duplicate-keys@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/bf563c83a546bf2b854627e1765a7dae4a52aa49af4c9dc0abdbcc1e552d64c91c6ebae5e88aab29c09cefadab050979a8186d4b312042c38a3f100bb4e22a63
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.29.7"
@@ -1729,18 +1197,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/220b756a9bfbf36b74341684681baa77b4bec62fb4d9ee95e09eda82690cbd1be62c60f694fc4d4dc2c90feadec2260bf9c7a2a1b5506a07d40e0fbc98d64539
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-dynamic-import@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-dynamic-import@npm:7.29.7"
@@ -1752,17 +1208,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-dynamic-import@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-dynamic-import@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/fe94ccf78911a3a0c597bfe8440bb2d0fc2c2203af969d543fd32da562bda8cd25029921a1f21a4efd332faf71db9c8b0fca58b41b704bc9ec96313edd7619ae
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-explicit-resource-management@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-explicit-resource-management@npm:7.29.7"
@@ -1775,18 +1220,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-explicit-resource-management@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-explicit-resource-management@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/plugin-transform-destructuring": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/3f77e11eef61da2cd663727a6e1474016a834fc1b7a64b7a10c4a535930da6e4217af5d09964fb05c3a677423063785ad0b7f27bb46488f681550242ec5e4a6d
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-exponentiation-operator@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.29.7"
@@ -1798,17 +1231,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-exponentiation-operator@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-exponentiation-operator@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/ec6347ac1cc41597ce34a61063f5053fc94a33baf56c121da53b2d832457072a266fdb344b90c372ee0b010355216534574614e2a07b31382cac4ec89eb8afa4
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-export-namespace-from@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-export-namespace-from@npm:7.29.7"
@@ -1820,17 +1242,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-export-namespace-from@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-export-namespace-from@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/c497acc33cfa66887bc47ed034d373f33ef2d5f7fb57259de3b239f7c1b3e3203a6ad99ceb3b96a4a52d422dc45bd02472dbf6b61d990916810f5e328667c69d
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-for-of@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-for-of@npm:7.29.7"
@@ -1843,18 +1254,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-for-of@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-for-of@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/791651692c0c37b91c9f92aba70a146a02402cf0ccd94eaee66ddde1c37c939c6b7e5123d255fa1ea1d3588df3733d50e71de548559cb531d90870227abb85bf
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-function-name@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-function-name@npm:7.29.7"
@@ -1868,18 +1267,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-function-name@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-function-name@npm:8.0.1"
-  dependencies:
-    "@babel/helper-compilation-targets": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/cd45cb47bd7d6d95909d0e2f57723a9d44e21040678026743350da46f61d547ed6a8f7668ccab879438b1a8cb451e62de8287bd3ccbaa73de8114f020c627e8f
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-json-strings@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-json-strings@npm:7.29.7"
@@ -1891,17 +1278,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-json-strings@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-json-strings@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/5d122a6b4bf3b40f3da589fd351458290db39662a85505f14bc447e4bcdd61dcdc78ffc5cb63fdf9b358e4ab9fa9d22e3cfece919d52cd555e1094352fc09ec9
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-literals@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-literals@npm:7.29.7"
@@ -1913,17 +1289,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-literals@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-literals@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/c4b85c7752963f545068433cd6e467f4e0784709e80ff78f5750ae3000f8c942f295b8e23fbbfda1df7ac4bc47cea3d98864980452df3462d3835d2bb1096622
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-logical-assignment-operators@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.29.7"
@@ -1935,17 +1300,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-logical-assignment-operators@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-logical-assignment-operators@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/df3f06a08a076d7b71bf66cfeab28aff8f506eb98a5b95cc516f511c3d9f7e97423e72a3f562f8416dfd3b9f7f18067f6c0e8f333e7ae36376974bc9c2c2ea4e
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-member-expression-literals@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-member-expression-literals@npm:7.29.7"
@@ -1957,17 +1311,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-member-expression-literals@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-member-expression-literals@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/eab189b12f02ce474e705cd62e4ce4ef53441c1c4c5d875b103216041715450b1a1731549c9359cb153c5ab18725945708bef630ed49956121cca0562a7b0fa0
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-modules-amd@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-modules-amd@npm:7.29.7"
@@ -1980,18 +1323,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-modules-amd@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-modules-amd@npm:8.0.1"
-  dependencies:
-    "@babel/helper-module-transforms": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/ea54feb68ae44ef157e7f399700741ad788961e0e8f378574956294d08e1d8909459732978384b0f61ee8072b3bf5a327ce2e8e68c24d81b97a01f69d623a606
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-modules-commonjs@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-modules-commonjs@npm:7.29.7"
@@ -2004,18 +1335,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-modules-commonjs@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-modules-commonjs@npm:8.0.1"
-  dependencies:
-    "@babel/helper-module-transforms": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/60589053e7f9e78573d87743ac68180e839771542dc52d03433129709dc44421c46101188f6cffc40ff3bf9ecc92e5a19fcf1acfa982b8230f635e01cfe63257
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-modules-systemjs@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-modules-systemjs@npm:7.29.7"
@@ -2030,19 +1349,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-modules-systemjs@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-modules-systemjs@npm:8.0.1"
-  dependencies:
-    "@babel/helper-module-transforms": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-validator-identifier": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/d6fa526e668491424137d58e1643a63beb7bfeb82235f89e3c90b6a162067dc11225d9c88c1698485d265ce2b7b3b6fc20f2608d1fec56696a19ca99931bddf1
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-modules-umd@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-modules-umd@npm:7.29.7"
@@ -2055,18 +1361,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-modules-umd@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-modules-umd@npm:8.0.1"
-  dependencies:
-    "@babel/helper-module-transforms": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/0dcf6be6a3537dc2aa1b6090b20e56a3f06e6a3231f9e40aae5e540a4aa3c20eca756eb11888d863a324e67ed5cd6f7b5bb3a8d4fb3d8c67acf180e92766a880
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.29.7"
@@ -2079,18 +1373,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-named-capturing-groups-regex@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/ac4cf186dcbacbba326a2e31ab09b2ea28359a455a7a98f9a9abf0070dc254dac2ae08e603d2349a1378154a1428be6e299e168b86140e4a2ed5496a9f1a9fb4
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-new-target@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-new-target@npm:7.29.7"
@@ -2102,17 +1384,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-new-target@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-new-target@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/9d224a64b29d6b02aa9ea86ce0cf8c8d4953c17e24e9ad3ba832f63ad4b87dc7690f3baabf3ef3b9e4b510a7d2e50ff3ab1493f89fe1f9180aa3d204dd9dadb7
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-nullish-coalescing-operator@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.29.7"
@@ -2124,17 +1395,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-nullish-coalescing-operator@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/509e2b556eda34892fec191b56b8e44ea4ee8bfbccd0d5255e6c2408c31f9ad45422212ecc94ad7993343cf185899e37ecd5523c51cda4e772166d71246571da
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-numeric-separator@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-numeric-separator@npm:7.29.7"
@@ -2146,17 +1406,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-numeric-separator@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-numeric-separator@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/9c29d41f27a4e31d0ebabbcb412bdfb9de6389766ba84cfaf02932629b2aa4b2d4d9fcbda42be5bd51b0177ec6d178766d87ecb1c6c60f60cf580149893c1126
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-object-rest-spread@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-object-rest-spread@npm:7.29.7"
@@ -2172,20 +1421,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-object-rest-spread@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-object-rest-spread@npm:8.0.1"
-  dependencies:
-    "@babel/helper-compilation-targets": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/plugin-transform-destructuring": "npm:^8.0.1"
-    "@babel/plugin-transform-parameters": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/c7eb0a5b3a8b8c8f357542d1f999af65c2d7b01afd92600d15ce741a867183b936cd4c74706b4b2100a8034d9b0bc5008f2988974e15a6470f54dfdcb0979ce7
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-object-super@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-object-super@npm:7.29.7"
@@ -2198,18 +1433,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-object-super@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-object-super@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-replace-supers": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/375a87effc7dd37690b406af5a3f7e25c333b9dd6703718782efb69a45d13c921cd51c09ada25856f50c55a81eb840a777f7e3a277fe8dadc2c2a5f48bcf2640
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-optional-catch-binding@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.29.7"
@@ -2221,17 +1444,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-optional-catch-binding@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-optional-catch-binding@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/62a1b6959ac396d237c7c5f3572cf816418f81a45ffc4ea5fbdd7350a95ec49fdd77c63d1ef4a926a976e64e2a65d8fdaaa01cbb2fd653e679ae780fdc2525d0
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-optional-chaining@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-optional-chaining@npm:7.29.7"
@@ -2244,18 +1456,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-optional-chaining@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-optional-chaining@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/eaf10f54405e0a9f1cc75578ff933235e324dcb221281c292b22e2184aa3e5393ded60af8505ecd0d63e503ca9f0340f146a24be7ccec01937fc76e2d12a4bf0
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-parameters@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-parameters@npm:7.29.7"
@@ -2267,17 +1467,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-parameters@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-parameters@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/80c2abab30cc936ae1e324c687451b4f58405415890d0710a07a620a6b4c9da77b2f565e7f4c38782183089487f555e44cefdedff92e6ded0c967aa9a2b38356
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-private-methods@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-private-methods@npm:7.29.7"
@@ -2290,18 +1479,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-private-methods@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-private-methods@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-class-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/990b5f83f5d57a5221ce914d0baaf9330aa470ab3def681b1a3342a09c49318491cbfa6bfc3a985ed5d5b6119de9d52d8f89cfe65509f436070d39f967ec3ec3
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-private-property-in-object@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-private-property-in-object@npm:7.29.7"
@@ -2315,19 +1492,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-private-property-in-object@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-private-property-in-object@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    "@babel/helper-create-class-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/6261f8ff2e4fc59a0895fbfc67002668a2d4bd6f1a82b94bc6216cba38d0b6909f369be17653130def12cbc6f4e5f3280774fdcf2f7b51f5c440288070044ca3
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-property-literals@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-property-literals@npm:7.29.7"
@@ -2339,17 +1503,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-property-literals@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-property-literals@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/0153537fd57a00eccf489417a1308276278191be7156d24d32a1dd57d366239e9af4e91dc5c94d00a6d54f3fd451b45914afa6e3f5be38b0192a4648bbb9a0ad
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-react-constant-elements@npm:^7.21.3":
   version: 7.27.1
   resolution: "@babel/plugin-transform-react-constant-elements@npm:7.27.1"
@@ -2372,17 +1525,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-react-display-name@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-react-display-name@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/b06c7a36b2ee2f1d2362fdf8efcb51f3a308ad6513bd69c2f3e75bfb6a6f9ed243e6c5edf3040b6f61ce80eea31c1b19d0a9e279c35f45d9658810aef5405728
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-react-jsx-development@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-react-jsx-development@npm:7.29.7"
@@ -2394,17 +1536,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-react-jsx-development@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-react-jsx-development@npm:8.0.1"
-  dependencies:
-    "@babel/plugin-transform-react-jsx": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/2a3f038753acf1bfd36969a811572aa89f8bd2866e19aefa77be77effc24314f7d83652acd89369ca41896d4229422137a67b2f1bec6488245670bb54ef8c38f
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-react-jsx@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-react-jsx@npm:7.29.7"
@@ -2420,21 +1551,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-react-jsx@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-react-jsx@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    "@babel/helper-module-imports": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/plugin-syntax-jsx": "npm:^8.0.1"
-    "@babel/types": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/8e6759b46e17e3fa1fe65a5ebe65298404eb440a156a78c901d33648a58670a16b364b3e9faf0b6ab57834840e91c5c42167b8eb7e51b85642113f33eb8a97a0
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-react-pure-annotations@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.29.7"
@@ -2447,18 +1563,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-react-pure-annotations@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-react-pure-annotations@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/77803cc2a343c56c2dd0d7b8edf464eee2285e4b2380f62c878eeec51ef05dce2df800297fd67a9597b52b8e45a10a4eb48bd6dd56ab348ee861542b56339492
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-regenerator@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-regenerator@npm:7.29.7"
@@ -2470,17 +1574,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-regenerator@npm:^8.0.2":
-  version: 8.0.2
-  resolution: "@babel/plugin-transform-regenerator@npm:8.0.2"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/8c25e3ead0507c3b7e587156b09d23015d4456bb8942a75df0db046b8cc60b328ed39f40d7d2eb689f69f78a4424fd1e48d1770aeae8ef0f6a8e6ab23773a677
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-regexp-modifiers@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-regexp-modifiers@npm:7.29.7"
@@ -2493,18 +1586,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-regexp-modifiers@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-regexp-modifiers@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/4d30d3b14eab4e6a359706d96e108dbdd37b41ebe3ae736dfe92fec97d32b36699d96a56eb781548b5cb62d6fe610159542dc892d17d360aee958f5ac34e6394
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-reserved-words@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-reserved-words@npm:7.29.7"
@@ -2516,17 +1597,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-reserved-words@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-reserved-words@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/0ced20be5fb05950492e4ba6b7b7b05ff70770fd0f9133cc25f412b951a446f79456cd775aa9b99657834427278638617ee913ef9507957a9fb748c699a6483c
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-runtime@npm:^7.25.9":
   version: 7.28.3
   resolution: "@babel/plugin-transform-runtime@npm:7.28.3"
@@ -2554,17 +1624,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-shorthand-properties@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-shorthand-properties@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/c33247ef9b53b85ff089405f7abdd992cee6cd2daaf375980c9e68d681874d32942db5b3b6a5ea0afe25df8a37385e51dcb0db0216d0156909ba3af345b5993d
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-spread@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-spread@npm:7.29.7"
@@ -2577,18 +1636,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-spread@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-spread@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/459cc77d3a4c062194cdbb37493de3204512d2ea4d6689a7f4b2bd945ef9e77088b6a8f98a9f92b69513b9839ce3eb95a5a99b4bf17ef71bbbef5f9cfce3c9d6
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-sticky-regex@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-sticky-regex@npm:7.29.7"
@@ -2600,36 +1647,14 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-sticky-regex@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-sticky-regex@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/1cd2f4fce70ea6d3f2405e05e091c202d6f64cdd5102a7fdf2ae6f73b162baa9c0d8cb813e08ae68efb1e8368e213da732b8293834048b098d7c33df7c1f1b41
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-template-literals@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-template-literals@npm:7.29.7"
   dependencies:
     "@babel/helper-plugin-utils": "npm:^7.29.7"
   peerDependencies:
-    "@babel/core": ^7.0.0-0
-  checksum: 10c0/961c2b42eb6d88042c2c213ed3b11ee1d92783ba63e1afe7e1a3392ec1a810556b5eec369fc5097a4a81f73ef92fa5d245bcf8b15d442e62a086bb1f64b50c95
-  languageName: node
-  linkType: hard
-
-"@babel/plugin-transform-template-literals@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-template-literals@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/4b2c02dabd2d7ee3f0b5952b79a11b408520ca9625d633c41869fcc06cdbdd06da6164d7631fe62a6d2462ba89dd492d041b8b6d3f1113c20b1cc23643c0baab
+    "@babel/core": ^7.0.0-0
+  checksum: 10c0/961c2b42eb6d88042c2c213ed3b11ee1d92783ba63e1afe7e1a3392ec1a810556b5eec369fc5097a4a81f73ef92fa5d245bcf8b15d442e62a086bb1f64b50c95
   languageName: node
   linkType: hard
 
@@ -2644,17 +1669,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-typeof-symbol@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-typeof-symbol@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/9989057ca8a8bb6aa39f99146f5549a604687a97d17abf947f097500dcf2f4b316deb2a766fbcb203e5f66f509d22c2ba34b543f179636b5526be48a24bc61a4
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-typescript@npm:^7.28.0, @babel/plugin-transform-typescript@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-typescript@npm:7.29.7"
@@ -2670,21 +1684,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-typescript@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-typescript@npm:8.0.1"
-  dependencies:
-    "@babel/helper-annotate-as-pure": "npm:^8.0.0"
-    "@babel/helper-create-class-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-skip-transparent-expression-wrappers": "npm:^8.0.0"
-    "@babel/plugin-syntax-typescript": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/2e62fc7d1261de748b4343d4a15d77af3ebd0dc5f4395f6afea50a0b5425ac110b681736cb38d7e9469c91b5bae9be27a87159c8f43420ac52710a933cca8547
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-unicode-escapes@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-unicode-escapes@npm:7.29.7"
@@ -2696,17 +1695,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-unicode-escapes@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-unicode-escapes@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/a3d49ddad1f7d13484f030eeb57a518bfc8991f83d40f23eae7430360b0d4377c43e3d94f1af24b8f86de7a778a854b47e4ee055b1d9b9bc94e056b39eb8c0e0
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-unicode-property-regex@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.29.7"
@@ -2719,18 +1707,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-unicode-property-regex@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-unicode-property-regex@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/8ac894309524b0bba15fa5950344dc904ced7349ea0d46ced7cafa97afef89d62d943e9e55688cacd6ef8d6fba76b1cb2df644ecbaa261546f4eb8977d272034
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-unicode-regex@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-unicode-regex@npm:7.29.7"
@@ -2743,18 +1719,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-unicode-regex@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-unicode-regex@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/62a4ed84da5bfa9afde0523437604282dcfe8929027a74e7dd5fe363298203e3d6107d064079d0eca0cf0707ae78a3805d03c6ccea455e12e7f71b2c66e65eed
-  languageName: node
-  linkType: hard
-
 "@babel/plugin-transform-unicode-sets-regex@npm:^7.29.7":
   version: 7.29.7
   resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.29.7"
@@ -2767,94 +1731,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/plugin-transform-unicode-sets-regex@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "@babel/plugin-transform-unicode-sets-regex@npm:8.0.1"
-  dependencies:
-    "@babel/helper-create-regexp-features-plugin": "npm:^8.0.1"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/e37bea4d1d1e92412ec94586a5c694df501f8488d26859775ef8472eeda80511ed6e1b5960c878ff86036be9babb9f562b31949bdc09797e81cf9c989d349839
-  languageName: node
-  linkType: hard
-
-"@babel/preset-env@npm:8.0.2":
-  version: 8.0.2
-  resolution: "@babel/preset-env@npm:8.0.2"
-  dependencies:
-    "@babel/compat-data": "npm:^8.0.0"
-    "@babel/helper-compilation-targets": "npm:^8.0.0"
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-validator-option": "npm:^8.0.0"
-    "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^8.0.1"
-    "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^8.0.1"
-    "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^8.0.1"
-    "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "npm:^8.0.1"
-    "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^8.0.1"
-    "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^8.0.1"
-    "@babel/plugin-transform-arrow-functions": "npm:^8.0.1"
-    "@babel/plugin-transform-async-generator-functions": "npm:^8.0.1"
-    "@babel/plugin-transform-async-to-generator": "npm:^8.0.1"
-    "@babel/plugin-transform-block-scoped-functions": "npm:^8.0.1"
-    "@babel/plugin-transform-block-scoping": "npm:^8.0.1"
-    "@babel/plugin-transform-class-properties": "npm:^8.0.1"
-    "@babel/plugin-transform-class-static-block": "npm:^8.0.1"
-    "@babel/plugin-transform-classes": "npm:^8.0.1"
-    "@babel/plugin-transform-computed-properties": "npm:^8.0.1"
-    "@babel/plugin-transform-destructuring": "npm:^8.0.1"
-    "@babel/plugin-transform-dotall-regex": "npm:^8.0.1"
-    "@babel/plugin-transform-duplicate-keys": "npm:^8.0.1"
-    "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^8.0.1"
-    "@babel/plugin-transform-dynamic-import": "npm:^8.0.1"
-    "@babel/plugin-transform-explicit-resource-management": "npm:^8.0.1"
-    "@babel/plugin-transform-exponentiation-operator": "npm:^8.0.1"
-    "@babel/plugin-transform-export-namespace-from": "npm:^8.0.1"
-    "@babel/plugin-transform-for-of": "npm:^8.0.1"
-    "@babel/plugin-transform-function-name": "npm:^8.0.1"
-    "@babel/plugin-transform-json-strings": "npm:^8.0.1"
-    "@babel/plugin-transform-literals": "npm:^8.0.1"
-    "@babel/plugin-transform-logical-assignment-operators": "npm:^8.0.1"
-    "@babel/plugin-transform-member-expression-literals": "npm:^8.0.1"
-    "@babel/plugin-transform-modules-amd": "npm:^8.0.1"
-    "@babel/plugin-transform-modules-commonjs": "npm:^8.0.1"
-    "@babel/plugin-transform-modules-systemjs": "npm:^8.0.1"
-    "@babel/plugin-transform-modules-umd": "npm:^8.0.1"
-    "@babel/plugin-transform-named-capturing-groups-regex": "npm:^8.0.1"
-    "@babel/plugin-transform-new-target": "npm:^8.0.1"
-    "@babel/plugin-transform-nullish-coalescing-operator": "npm:^8.0.1"
-    "@babel/plugin-transform-numeric-separator": "npm:^8.0.1"
-    "@babel/plugin-transform-object-rest-spread": "npm:^8.0.1"
-    "@babel/plugin-transform-object-super": "npm:^8.0.1"
-    "@babel/plugin-transform-optional-catch-binding": "npm:^8.0.1"
-    "@babel/plugin-transform-optional-chaining": "npm:^8.0.1"
-    "@babel/plugin-transform-parameters": "npm:^8.0.1"
-    "@babel/plugin-transform-private-methods": "npm:^8.0.1"
-    "@babel/plugin-transform-private-property-in-object": "npm:^8.0.1"
-    "@babel/plugin-transform-property-literals": "npm:^8.0.1"
-    "@babel/plugin-transform-regenerator": "npm:^8.0.2"
-    "@babel/plugin-transform-regexp-modifiers": "npm:^8.0.1"
-    "@babel/plugin-transform-reserved-words": "npm:^8.0.1"
-    "@babel/plugin-transform-shorthand-properties": "npm:^8.0.1"
-    "@babel/plugin-transform-spread": "npm:^8.0.1"
-    "@babel/plugin-transform-sticky-regex": "npm:^8.0.1"
-    "@babel/plugin-transform-template-literals": "npm:^8.0.1"
-    "@babel/plugin-transform-typeof-symbol": "npm:^8.0.1"
-    "@babel/plugin-transform-unicode-escapes": "npm:^8.0.1"
-    "@babel/plugin-transform-unicode-property-regex": "npm:^8.0.1"
-    "@babel/plugin-transform-unicode-regex": "npm:^8.0.1"
-    "@babel/plugin-transform-unicode-sets-regex": "npm:^8.0.1"
-    "@babel/preset-modules": "npm:^0.2.0"
-    babel-plugin-polyfill-corejs3: "npm:^1.0.0"
-    core-js-compat: "npm:^3.48.0"
-    semver: "npm:^7.7.3"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/95afc8262b23e7714d6dc0cca5ee7eaf69efc7dc705ac926fd507e89829e87c5b1019e78b3e89eac617fe432bec156f5902d92f292b7007ba21eb92a66bd8ef1
-  languageName: node
-  linkType: hard
-
-"@babel/preset-env@npm:^7.20.2, @babel/preset-env@npm:^7.25.9":
+"@babel/preset-env@npm:7.29.7, @babel/preset-env@npm:^7.20.2, @babel/preset-env@npm:^7.25.9":
   version: 7.29.7
   resolution: "@babel/preset-env@npm:7.29.7"
   dependencies:
@@ -2948,38 +1825,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/preset-modules@npm:^0.2.0":
-  version: 0.2.0
-  resolution: "@babel/preset-modules@npm:0.2.0"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/plugin-transform-dotall-regex": "npm:^8.0.1"
-    "@babel/plugin-transform-unicode-property-regex": "npm:^8.0.1"
-    "@babel/types": "npm:^8.0.0"
-    esutils: "npm:^2.0.2"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/03f8533661c61a469b4872385f339d1b4aef2e8e39abe53b1a6fadf840d7786c92843160152c0596cb4b539b810e3750299e621c18f5592eb386e38d292b67aa
-  languageName: node
-  linkType: hard
-
-"@babel/preset-react@npm:8.0.1":
-  version: 8.0.1
-  resolution: "@babel/preset-react@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-validator-option": "npm:^8.0.0"
-    "@babel/plugin-transform-react-display-name": "npm:^8.0.1"
-    "@babel/plugin-transform-react-jsx": "npm:^8.0.1"
-    "@babel/plugin-transform-react-jsx-development": "npm:^8.0.1"
-    "@babel/plugin-transform-react-pure-annotations": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/98fe0453db7dcf2f0c213971e559eab78d2a7d9f942eb81e88c814fd6122ee3fa3e99645cadeb56e92486d92f78a5ff59bd22ed8d54eb450553fe0bf497e8747
-  languageName: node
-  linkType: hard
-
-"@babel/preset-react@npm:^7.18.6, @babel/preset-react@npm:^7.25.9":
+"@babel/preset-react@npm:7.29.7, @babel/preset-react@npm:^7.18.6, @babel/preset-react@npm:^7.25.9":
   version: 7.29.7
   resolution: "@babel/preset-react@npm:7.29.7"
   dependencies:
@@ -2995,21 +1841,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/preset-typescript@npm:8.0.1":
-  version: 8.0.1
-  resolution: "@babel/preset-typescript@npm:8.0.1"
-  dependencies:
-    "@babel/helper-plugin-utils": "npm:^8.0.1"
-    "@babel/helper-validator-option": "npm:^8.0.0"
-    "@babel/plugin-transform-modules-commonjs": "npm:^8.0.1"
-    "@babel/plugin-transform-typescript": "npm:^8.0.1"
-  peerDependencies:
-    "@babel/core": ^8.0.0
-  checksum: 10c0/9c73f06fdde4161895001dab863bfac367f5281ecaa089c931189a04d5955749589e26202e84b2cc2ee0ac55259f24e9aaa2113b646c3bae19d5c4a7a68f979f
-  languageName: node
-  linkType: hard
-
-"@babel/preset-typescript@npm:^7.21.0, @babel/preset-typescript@npm:^7.25.9, @babel/preset-typescript@npm:^7.27.1":
+"@babel/preset-typescript@npm:7.29.7, @babel/preset-typescript@npm:^7.21.0, @babel/preset-typescript@npm:^7.25.9, @babel/preset-typescript@npm:^7.27.1":
   version: 7.29.7
   resolution: "@babel/preset-typescript@npm:7.29.7"
   dependencies:
@@ -3038,7 +1870,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/template@npm:^7.29.7":
+"@babel/template@npm:^7.29.7, @babel/template@npm:^7.3.3":
   version: 7.29.7
   resolution: "@babel/template@npm:7.29.7"
   dependencies:
@@ -3049,17 +1881,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/template@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/template@npm:8.0.0"
-  dependencies:
-    "@babel/code-frame": "npm:^8.0.0"
-    "@babel/parser": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-  checksum: 10c0/8a5e5687299517cc6b0efff3a6342cf4c4256aeeffa14753cc8d08106aaf0ba1916707c0e1f385b511a7b42c6c87806fecaecd4fe06316207475e0d4d1148e2c
-  languageName: node
-  linkType: hard
-
 "@babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.29.7, @babel/traverse@npm:^7.7.0":
   version: 7.29.7
   resolution: "@babel/traverse@npm:7.29.7"
@@ -3075,22 +1896,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/traverse@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/traverse@npm:8.0.0"
-  dependencies:
-    "@babel/code-frame": "npm:^8.0.0"
-    "@babel/generator": "npm:^8.0.0"
-    "@babel/helper-globals": "npm:^8.0.0"
-    "@babel/parser": "npm:^8.0.0"
-    "@babel/template": "npm:^8.0.0"
-    "@babel/types": "npm:^8.0.0"
-    obug: "npm:^2.1.1"
-  checksum: 10c0/de5e5c144c72a2949d75ea8baf5dd2926a6410512397ac28692719df45e31e70e26415e10cacfe2c1c1dd73e7276c6a8fc832754c8b14202627d64e1aa1a9393
-  languageName: node
-  linkType: hard
-
-"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.27.3, @babel/types@npm:^7.28.2, @babel/types@npm:^7.29.7, @babel/types@npm:^7.4.4, @babel/types@npm:^7.7.0":
+"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.28.2, @babel/types@npm:^7.29.7, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.7.0":
   version: 7.29.7
   resolution: "@babel/types@npm:7.29.7"
   dependencies:
@@ -3100,16 +1906,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@babel/types@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "@babel/types@npm:8.0.0"
-  dependencies:
-    "@babel/helper-string-parser": "npm:^8.0.0"
-    "@babel/helper-validator-identifier": "npm:^8.0.0"
-  checksum: 10c0/f4130b88818cf9fd0fb653dd35459f58794018416bc0cee0eccefd364c2d146ae90611ae3ae19d91c2f0bbd1e0e440840832baf9a3d5eb5fed077a52f0bcc001
-  languageName: node
-  linkType: hard
-
 "@bcoe/v8-coverage@npm:^0.2.3":
   version: 0.2.3
   resolution: "@bcoe/v8-coverage@npm:0.2.3"
@@ -3126,17 +1922,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@bramus/specificity@npm:^2.4.2":
-  version: 2.4.2
-  resolution: "@bramus/specificity@npm:2.4.2"
-  dependencies:
-    css-tree: "npm:^3.0.0"
-  bin:
-    specificity: bin/cli.js
-  checksum: 10c0/c5f4e04e0bca0d2202598207a5eb0733c8109d12a68a329caa26373bec598d99db5bb785b8865fefa00fc01b08c6068138807ceb11a948fe15e904ed6cf4ba72
-  languageName: node
-  linkType: hard
-
 "@colors/colors@npm:1.5.0":
   version: 1.5.0
   resolution: "@colors/colors@npm:1.5.0"
@@ -3161,13 +1946,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@csstools/color-helpers@npm:^6.1.0":
-  version: 6.1.0
-  resolution: "@csstools/color-helpers@npm:6.1.0"
-  checksum: 10c0/ebb71eebcd6dde16a89d687c30d4c7f315f9079ec803497ebac0528d0a9ef09847eaf167b4565c4919f156e32e7ca2167199ac2d2020f184f7888551a3b4712b
-  languageName: node
-  linkType: hard
-
 "@csstools/css-calc@npm:^2.1.3, @csstools/css-calc@npm:^2.1.4":
   version: 2.1.4
   resolution: "@csstools/css-calc@npm:2.1.4"
@@ -3178,16 +1956,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@csstools/css-calc@npm:^3.2.0, @csstools/css-calc@npm:^3.2.1":
-  version: 3.2.1
-  resolution: "@csstools/css-calc@npm:3.2.1"
-  peerDependencies:
-    "@csstools/css-parser-algorithms": ^4.0.0
-    "@csstools/css-tokenizer": ^4.0.0
-  checksum: 10c0/0191c8d1cd4dffa0d3b6bfd1e78a721934b1d7a6c972966e4fdaa72208c6789e8ff443ee81764a32f1e6107825695b5524ef2b4dc1681b5b29230f2a1277e5df
-  languageName: node
-  linkType: hard
-
 "@csstools/css-color-parser@npm:^3.0.9, @csstools/css-color-parser@npm:^3.1.0":
   version: 3.1.0
   resolution: "@csstools/css-color-parser@npm:3.1.0"
@@ -3201,19 +1969,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@csstools/css-color-parser@npm:^4.1.0":
-  version: 4.1.9
-  resolution: "@csstools/css-color-parser@npm:4.1.9"
-  dependencies:
-    "@csstools/color-helpers": "npm:^6.1.0"
-    "@csstools/css-calc": "npm:^3.2.1"
-  peerDependencies:
-    "@csstools/css-parser-algorithms": ^4.0.0
-    "@csstools/css-tokenizer": ^4.0.0
-  checksum: 10c0/d9330a1d5b207230e97a522c9b73c1b625dbfbca7a91ac8888e05917efb01c6aa4075153e5af6ce028c3848660d3f24cf7b0f0760a080361089e1a3841e586c7
-  languageName: node
-  linkType: hard
-
 "@csstools/css-parser-algorithms@npm:^3.0.4, @csstools/css-parser-algorithms@npm:^3.0.5":
   version: 3.0.5
   resolution: "@csstools/css-parser-algorithms@npm:3.0.5"
@@ -3223,27 +1978,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@csstools/css-parser-algorithms@npm:^4.0.0":
-  version: 4.0.0
-  resolution: "@csstools/css-parser-algorithms@npm:4.0.0"
-  peerDependencies:
-    "@csstools/css-tokenizer": ^4.0.0
-  checksum: 10c0/94558c2428d6ef0ddef542e86e0a8376aa1263a12a59770abb13ba50d7b83086822c75433f32aa2e7fef00555e1cc88292f9ca5bce79aed232bb3fed73b1528d
-  languageName: node
-  linkType: hard
-
-"@csstools/css-syntax-patches-for-csstree@npm:^1.1.3":
-  version: 1.1.6
-  resolution: "@csstools/css-syntax-patches-for-csstree@npm:1.1.6"
-  peerDependencies:
-    css-tree: ^3.2.1
-  peerDependenciesMeta:
-    css-tree:
-      optional: true
-  checksum: 10c0/4f1322833df87dfb19ec5b23cba5475ceeff8391940dd0eeaf9b28df362f23c354c31f704c4bdef9bd749ae5f0825ded022df3fea1fab39af9b6aab42370ba53
-  languageName: node
-  linkType: hard
-
 "@csstools/css-tokenizer@npm:^3.0.3, @csstools/css-tokenizer@npm:^3.0.4":
   version: 3.0.4
   resolution: "@csstools/css-tokenizer@npm:3.0.4"
@@ -3251,13 +1985,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@csstools/css-tokenizer@npm:^4.0.0":
-  version: 4.0.0
-  resolution: "@csstools/css-tokenizer@npm:4.0.0"
-  checksum: 10c0/669cf3d0f9c8e1ffdf8c9955ad8beba0c8cfe03197fe29a4fcbd9ee6f7a18856cfa42c62670021a75183d9ab37f5d14a866e6a9df753a6c07f59e36797a9ea9f
-  languageName: node
-  linkType: hard
-
 "@csstools/media-query-list-parser@npm:^4.0.3":
   version: 4.0.3
   resolution: "@csstools/media-query-list-parser@npm:4.0.3"
@@ -4819,6 +3546,18 @@ __metadata:
   languageName: node
   linkType: hard
 
+"@eslint/js@npm:10.0.1":
+  version: 10.0.1
+  resolution: "@eslint/js@npm:10.0.1"
+  peerDependencies:
+    eslint: ^10.0.0
+  peerDependenciesMeta:
+    eslint:
+      optional: true
+  checksum: 10c0/9f3fcaf71ba7fdf65d82e8faad6ecfe97e11801cc3c362b306a88ea1ed1344ae0d35330dddb0e8ad18f010f6687a70b75491b9e01c8af57acd7987cee6b3ec6c
+  languageName: node
+  linkType: hard
+
 "@eslint/object-schema@npm:^3.0.5":
   version: 3.0.5
   resolution: "@eslint/object-schema@npm:3.0.5"
@@ -4836,18 +3575,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@exodus/bytes@npm:^1.11.0, @exodus/bytes@npm:^1.15.0, @exodus/bytes@npm:^1.6.0":
-  version: 1.15.1
-  resolution: "@exodus/bytes@npm:1.15.1"
-  peerDependencies:
-    "@noble/hashes": ^1.8.0 || ^2.0.0
-  peerDependenciesMeta:
-    "@noble/hashes":
-      optional: true
-  checksum: 10c0/333056a6953bbf875d9f3b86c32314de29458d842e5f56f6ef8034b18c2d9660184550093d1bae5de0064043d5e23f54cc03148798d9d29cf5167ac03f2e9f8c
-  languageName: node
-  linkType: hard
-
 "@floating-ui/core@npm:^1.7.3":
   version: 1.7.3
   resolution: "@floating-ui/core@npm:1.7.3"
@@ -5001,205 +3728,152 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@jest/console@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/console@npm:30.4.1"
+"@jest/console@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/console@npm:29.7.0"
   dependencies:
-    "@jest/types": "npm:30.4.1"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    chalk: "npm:^4.1.2"
-    jest-message-util: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
+    chalk: "npm:^4.0.0"
+    jest-message-util: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
     slash: "npm:^3.0.0"
-  checksum: 10c0/f782722ef5754ab864b996000cf1f0545f7be9db6ba8f89cb2381dfab9910a52c59a830e5ea069a76840023e40806493d9900d8eb7e9821d23a11a498f32739e
+  checksum: 10c0/7be408781d0a6f657e969cbec13b540c329671819c2f57acfad0dae9dbfe2c9be859f38fe99b35dba9ff1536937dc6ddc69fdcd2794812fa3c647a1619797f6c
   languageName: node
   linkType: hard
 
-"@jest/core@npm:30.4.2":
-  version: 30.4.2
-  resolution: "@jest/core@npm:30.4.2"
+"@jest/core@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/core@npm:29.7.0"
   dependencies:
-    "@jest/console": "npm:30.4.1"
-    "@jest/pattern": "npm:30.4.0"
-    "@jest/reporters": "npm:30.4.1"
-    "@jest/test-result": "npm:30.4.1"
-    "@jest/transform": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
+    "@jest/console": "npm:^29.7.0"
+    "@jest/reporters": "npm:^29.7.0"
+    "@jest/test-result": "npm:^29.7.0"
+    "@jest/transform": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    ansi-escapes: "npm:^4.3.2"
-    chalk: "npm:^4.1.2"
-    ci-info: "npm:^4.2.0"
-    exit-x: "npm:^0.2.2"
-    fast-json-stable-stringify: "npm:^2.1.0"
-    graceful-fs: "npm:^4.2.11"
-    jest-changed-files: "npm:30.4.1"
-    jest-config: "npm:30.4.2"
-    jest-haste-map: "npm:30.4.1"
-    jest-message-util: "npm:30.4.1"
-    jest-regex-util: "npm:30.4.0"
-    jest-resolve: "npm:30.4.1"
-    jest-resolve-dependencies: "npm:30.4.2"
-    jest-runner: "npm:30.4.2"
-    jest-runtime: "npm:30.4.2"
-    jest-snapshot: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
-    jest-validate: "npm:30.4.1"
-    jest-watcher: "npm:30.4.1"
-    pretty-format: "npm:30.4.1"
+    ansi-escapes: "npm:^4.2.1"
+    chalk: "npm:^4.0.0"
+    ci-info: "npm:^3.2.0"
+    exit: "npm:^0.1.2"
+    graceful-fs: "npm:^4.2.9"
+    jest-changed-files: "npm:^29.7.0"
+    jest-config: "npm:^29.7.0"
+    jest-haste-map: "npm:^29.7.0"
+    jest-message-util: "npm:^29.7.0"
+    jest-regex-util: "npm:^29.6.3"
+    jest-resolve: "npm:^29.7.0"
+    jest-resolve-dependencies: "npm:^29.7.0"
+    jest-runner: "npm:^29.7.0"
+    jest-runtime: "npm:^29.7.0"
+    jest-snapshot: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    jest-validate: "npm:^29.7.0"
+    jest-watcher: "npm:^29.7.0"
+    micromatch: "npm:^4.0.4"
+    pretty-format: "npm:^29.7.0"
     slash: "npm:^3.0.0"
+    strip-ansi: "npm:^6.0.0"
   peerDependencies:
     node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
   peerDependenciesMeta:
     node-notifier:
       optional: true
-  checksum: 10c0/4237ec79d5403b82ba89e3be6e4318d9f37c3a11281bd76cfbdd4ff08d8c89850555607c4d494dab3526e01a90db3539e549017883967dd392b5084f1be0d5b2
-  languageName: node
-  linkType: hard
-
-"@jest/diff-sequences@npm:30.4.0":
-  version: 30.4.0
-  resolution: "@jest/diff-sequences@npm:30.4.0"
-  checksum: 10c0/b4358b1b885098b905cb777f58788ddd45f90c4ebc3ce2c04fb1d4c9516f35ac2d9daef8263cd21c537bd7a52ab320f03e4ba9521677959ae20e3d405356b420
-  languageName: node
-  linkType: hard
-
-"@jest/environment-jsdom-abstract@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/environment-jsdom-abstract@npm:30.4.1"
-  dependencies:
-    "@jest/environment": "npm:30.4.1"
-    "@jest/fake-timers": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
-    "@types/jsdom": "npm:^21.1.7"
-    "@types/node": "npm:*"
-    jest-mock: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
-  peerDependencies:
-    canvas: ^3.0.0
-    jsdom: "*"
-  peerDependenciesMeta:
-    canvas:
-      optional: true
-  checksum: 10c0/a06c832ea500690a2877aaff199c788c29a888cfc0db1e05e30ea4fcf1c272c357dfc6b6151d4fb5528ffa1691a4cdb8d8fff424a58c436093500df8597b7614
+  checksum: 10c0/934f7bf73190f029ac0f96662c85cd276ec460d407baf6b0dbaec2872e157db4d55a7ee0b1c43b18874602f662b37cb973dda469a4e6d88b4e4845b521adeeb2
   languageName: node
   linkType: hard
 
-"@jest/environment@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/environment@npm:30.4.1"
+"@jest/environment@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/environment@npm:29.7.0"
   dependencies:
-    "@jest/fake-timers": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
+    "@jest/fake-timers": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    jest-mock: "npm:30.4.1"
-  checksum: 10c0/704987ff8650c91a8ed13796ce47e9c55da3c12a01902d9e384330cead18eb4d34ce665a8d9962dddf2736fac006f92efc1039b8da424adf8fdc16f8d81aff6c
+    jest-mock: "npm:^29.7.0"
+  checksum: 10c0/c7b1b40c618f8baf4d00609022d2afa086d9c6acc706f303a70bb4b67275868f620ad2e1a9efc5edd418906157337cce50589a627a6400bbdf117d351b91ef86
   languageName: node
   linkType: hard
 
-"@jest/expect-utils@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/expect-utils@npm:30.4.1"
+"@jest/expect-utils@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/expect-utils@npm:29.7.0"
   dependencies:
-    "@jest/get-type": "npm:30.1.0"
-  checksum: 10c0/6dea9e11ebcc7be68fea5950ae5a1b7ff9fd1490101ee8af0aede336b9934ab24a28bcafe2f1171dac0f95982406386c609ca2659b9132e1a9d419e8d69b9cd4
+    jest-get-type: "npm:^29.6.3"
+  checksum: 10c0/60b79d23a5358dc50d9510d726443316253ecda3a7fb8072e1526b3e0d3b14f066ee112db95699b7a43ad3f0b61b750c72e28a5a1cac361d7a2bb34747fa938a
   languageName: node
   linkType: hard
 
-"@jest/expect@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/expect@npm:30.4.1"
+"@jest/expect@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/expect@npm:29.7.0"
   dependencies:
-    expect: "npm:30.4.1"
-    jest-snapshot: "npm:30.4.1"
-  checksum: 10c0/2133183e735982879408036237b115abc2e57fa52bb7324be0a1f2ab6941a57da93b2e6f498dc110b7d007dd20463013fbcc5b24377cf65e6a8518d3b2ff76bd
+    expect: "npm:^29.7.0"
+    jest-snapshot: "npm:^29.7.0"
+  checksum: 10c0/b41f193fb697d3ced134349250aed6ccea075e48c4f803159db102b826a4e473397c68c31118259868fd69a5cba70e97e1c26d2c2ff716ca39dc73a2ccec037e
   languageName: node
   linkType: hard
 
-"@jest/fake-timers@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/fake-timers@npm:30.4.1"
+"@jest/fake-timers@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/fake-timers@npm:29.7.0"
   dependencies:
-    "@jest/types": "npm:30.4.1"
-    "@sinonjs/fake-timers": "npm:^15.4.0"
+    "@jest/types": "npm:^29.6.3"
+    "@sinonjs/fake-timers": "npm:^10.0.2"
     "@types/node": "npm:*"
-    jest-message-util: "npm:30.4.1"
-    jest-mock: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
-  checksum: 10c0/4a10e4eb64bb5ea2531cdcc79f3058731f5c14faf2a74f498fcb37f6690c3c0f9b12a9856736d26e34631eb38db12e12812da71de27b9d332df44dda9f460fbe
-  languageName: node
-  linkType: hard
-
-"@jest/get-type@npm:30.1.0":
-  version: 30.1.0
-  resolution: "@jest/get-type@npm:30.1.0"
-  checksum: 10c0/3e65fd5015f551c51ec68fca31bbd25b466be0e8ee8075d9610fa1c686ea1e70a942a0effc7b10f4ea9a338c24337e1ad97ff69d3ebacc4681b7e3e80d1b24ac
-  languageName: node
-  linkType: hard
-
-"@jest/globals@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/globals@npm:30.4.1"
-  dependencies:
-    "@jest/environment": "npm:30.4.1"
-    "@jest/expect": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
-    jest-mock: "npm:30.4.1"
-  checksum: 10c0/7961eefdc9e69ba7754d11a1bae4bc2960f33e03d9c1d6c73f27895b8cf92a9118a234330f31dc8efe16e835fe70ef9cc6c26f60121f6b6e9fac71c8b1bcd709
+    jest-message-util: "npm:^29.7.0"
+    jest-mock: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+  checksum: 10c0/cf0a8bcda801b28dc2e2b2ba36302200ee8104a45ad7a21e6c234148932f826cb3bc57c8df3b7b815aeea0861d7b6ca6f0d4778f93b9219398ef28749e03595c
   languageName: node
   linkType: hard
 
-"@jest/pattern@npm:30.4.0":
-  version: 30.4.0
-  resolution: "@jest/pattern@npm:30.4.0"
+"@jest/globals@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/globals@npm:29.7.0"
   dependencies:
-    "@types/node": "npm:*"
-    jest-regex-util: "npm:30.4.0"
-  checksum: 10c0/05bc0799f84f3750bbbff0f9a546979efd0dbcee86c1be98b9e2811a68885809ec7b5cca39b8dda1497cb7cf17b7be936019fba8dfbcd9c53b181e03e67f4f82
+    "@jest/environment": "npm:^29.7.0"
+    "@jest/expect": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    jest-mock: "npm:^29.7.0"
+  checksum: 10c0/a385c99396878fe6e4460c43bd7bb0a5cc52befb462cc6e7f2a3810f9e7bcce7cdeb51908fd530391ee452dc856c98baa2c5f5fa8a5b30b071d31ef7f6955cea
   languageName: node
   linkType: hard
 
-"@jest/reporters@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/reporters@npm:30.4.1"
+"@jest/reporters@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/reporters@npm:29.7.0"
   dependencies:
     "@bcoe/v8-coverage": "npm:^0.2.3"
-    "@jest/console": "npm:30.4.1"
-    "@jest/test-result": "npm:30.4.1"
-    "@jest/transform": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
-    "@jridgewell/trace-mapping": "npm:^0.3.25"
+    "@jest/console": "npm:^29.7.0"
+    "@jest/test-result": "npm:^29.7.0"
+    "@jest/transform": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    "@jridgewell/trace-mapping": "npm:^0.3.18"
     "@types/node": "npm:*"
-    chalk: "npm:^4.1.2"
-    collect-v8-coverage: "npm:^1.0.2"
-    exit-x: "npm:^0.2.2"
-    glob: "npm:^10.5.0"
-    graceful-fs: "npm:^4.2.11"
+    chalk: "npm:^4.0.0"
+    collect-v8-coverage: "npm:^1.0.0"
+    exit: "npm:^0.1.2"
+    glob: "npm:^7.1.3"
+    graceful-fs: "npm:^4.2.9"
     istanbul-lib-coverage: "npm:^3.0.0"
     istanbul-lib-instrument: "npm:^6.0.0"
     istanbul-lib-report: "npm:^3.0.0"
-    istanbul-lib-source-maps: "npm:^5.0.0"
+    istanbul-lib-source-maps: "npm:^4.0.0"
     istanbul-reports: "npm:^3.1.3"
-    jest-message-util: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
-    jest-worker: "npm:30.4.1"
+    jest-message-util: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    jest-worker: "npm:^29.7.0"
     slash: "npm:^3.0.0"
-    string-length: "npm:^4.0.2"
+    string-length: "npm:^4.0.1"
+    strip-ansi: "npm:^6.0.0"
     v8-to-istanbul: "npm:^9.0.1"
   peerDependencies:
     node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
   peerDependenciesMeta:
     node-notifier:
       optional: true
-  checksum: 10c0/cf5220462c6242fa564bbeb6d5988ebfd814e0351f3bddae07323b55c68c7ebd4aa4c23e717231ab4b2d63c4fc7fa4615b9dad8584be534bd44622981242dceb
-  languageName: node
-  linkType: hard
-
-"@jest/schemas@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/schemas@npm:30.4.1"
-  dependencies:
-    "@sinclair/typebox": "npm:^0.34.0"
-  checksum: 10c0/96f388ebfc1974457fcbde2ad36c40a0b549cba3f624fe8d9d6e5903a152dc75e4043f4ac9ac7668622f2ecb0f9a4dcb9a38edf3bc0d52b82045b2bb2b69b72a
+  checksum: 10c0/a754402a799541c6e5aff2c8160562525e2a47e7d568f01ebfc4da66522de39cbb809bbb0a841c7052e4270d79214e70aec3c169e4eae42a03bc1a8a20cb9fa2
   languageName: node
   linkType: hard
 
@@ -5212,87 +3886,61 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@jest/snapshot-utils@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/snapshot-utils@npm:30.4.1"
-  dependencies:
-    "@jest/types": "npm:30.4.1"
-    chalk: "npm:^4.1.2"
-    graceful-fs: "npm:^4.2.11"
-    natural-compare: "npm:^1.4.0"
-  checksum: 10c0/81da9079719eece02b89c45cb97162b5b7d794981652c8d8fe2846843ac81ce219ea4bc21bde7cf76c9032006435f82bd9aee8d6139d90b77078ddad4865af02
-  languageName: node
-  linkType: hard
-
-"@jest/source-map@npm:30.0.1":
-  version: 30.0.1
-  resolution: "@jest/source-map@npm:30.0.1"
+"@jest/source-map@npm:^29.6.3":
+  version: 29.6.3
+  resolution: "@jest/source-map@npm:29.6.3"
   dependencies:
-    "@jridgewell/trace-mapping": "npm:^0.3.25"
-    callsites: "npm:^3.1.0"
-    graceful-fs: "npm:^4.2.11"
-  checksum: 10c0/e7bda2786fc9f483d9dd7566c58c4bd948830997be862dfe80a3ae5550ff3f84753abb52e705d02ebe9db9f34ba7ebec4c2db11882048cdeef7a66f6332b3897
+    "@jridgewell/trace-mapping": "npm:^0.3.18"
+    callsites: "npm:^3.0.0"
+    graceful-fs: "npm:^4.2.9"
+  checksum: 10c0/a2f177081830a2e8ad3f2e29e20b63bd40bade294880b595acf2fc09ec74b6a9dd98f126a2baa2bf4941acd89b13a4ade5351b3885c224107083a0059b60a219
   languageName: node
   linkType: hard
 
-"@jest/test-result@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/test-result@npm:30.4.1"
+"@jest/test-result@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/test-result@npm:29.7.0"
   dependencies:
-    "@jest/console": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
-    "@types/istanbul-lib-coverage": "npm:^2.0.6"
-    collect-v8-coverage: "npm:^1.0.2"
-  checksum: 10c0/920fa3fe3cc8b5e11bfe36066d733030f1245865d7cac4862e3783a96f9c0a087fd8073c8cb56e4c87c6fcc97b46e6f828ecd3b10dd8e208f5e1b983fcc5cdb8
+    "@jest/console": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    "@types/istanbul-lib-coverage": "npm:^2.0.0"
+    collect-v8-coverage: "npm:^1.0.0"
+  checksum: 10c0/7de54090e54a674ca173470b55dc1afdee994f2d70d185c80236003efd3fa2b753fff51ffcdda8e2890244c411fd2267529d42c4a50a8303755041ee493e6a04
   languageName: node
   linkType: hard
 
-"@jest/test-sequencer@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/test-sequencer@npm:30.4.1"
+"@jest/test-sequencer@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/test-sequencer@npm:29.7.0"
   dependencies:
-    "@jest/test-result": "npm:30.4.1"
-    graceful-fs: "npm:^4.2.11"
-    jest-haste-map: "npm:30.4.1"
+    "@jest/test-result": "npm:^29.7.0"
+    graceful-fs: "npm:^4.2.9"
+    jest-haste-map: "npm:^29.7.0"
     slash: "npm:^3.0.0"
-  checksum: 10c0/531b19ffb2358b3b22a56b306359acf66db2073978dd6df8a9522b5b4034ad7540a9cb84bdfebbcb2872686d6d2ab8cabea04ad23ef9d4488cbafd03f7511501
+  checksum: 10c0/593a8c4272797bb5628984486080cbf57aed09c7cfdc0a634e8c06c38c6bef329c46c0016e84555ee55d1cd1f381518cf1890990ff845524c1123720c8c1481b
   languageName: node
   linkType: hard
 
-"@jest/transform@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/transform@npm:30.4.1"
+"@jest/transform@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "@jest/transform@npm:29.7.0"
   dependencies:
-    "@babel/core": "npm:^7.27.4"
-    "@jest/types": "npm:30.4.1"
-    "@jridgewell/trace-mapping": "npm:^0.3.25"
-    babel-plugin-istanbul: "npm:^7.0.1"
-    chalk: "npm:^4.1.2"
+    "@babel/core": "npm:^7.11.6"
+    "@jest/types": "npm:^29.6.3"
+    "@jridgewell/trace-mapping": "npm:^0.3.18"
+    babel-plugin-istanbul: "npm:^6.1.1"
+    chalk: "npm:^4.0.0"
     convert-source-map: "npm:^2.0.0"
     fast-json-stable-stringify: "npm:^2.1.0"
-    graceful-fs: "npm:^4.2.11"
-    jest-haste-map: "npm:30.4.1"
-    jest-regex-util: "npm:30.4.0"
-    jest-util: "npm:30.4.1"
-    pirates: "npm:^4.0.7"
+    graceful-fs: "npm:^4.2.9"
+    jest-haste-map: "npm:^29.7.0"
+    jest-regex-util: "npm:^29.6.3"
+    jest-util: "npm:^29.7.0"
+    micromatch: "npm:^4.0.4"
+    pirates: "npm:^4.0.4"
     slash: "npm:^3.0.0"
-    write-file-atomic: "npm:^5.0.1"
-  checksum: 10c0/194f463f179f6ab3ccd6f4f0f03a117e3c01a7ce098ebf562250aca4c900ed3a9ec08b694227788eabd7cb4e0597f1d0788077c7550ddc679f68a0ad21cc87e0
-  languageName: node
-  linkType: hard
-
-"@jest/types@npm:30.4.1":
-  version: 30.4.1
-  resolution: "@jest/types@npm:30.4.1"
-  dependencies:
-    "@jest/pattern": "npm:30.4.0"
-    "@jest/schemas": "npm:30.4.1"
-    "@types/istanbul-lib-coverage": "npm:^2.0.6"
-    "@types/istanbul-reports": "npm:^3.0.4"
-    "@types/node": "npm:*"
-    "@types/yargs": "npm:^17.0.33"
-    chalk: "npm:^4.1.2"
-  checksum: 10c0/4c79f6dbdb1c7eaab5da255fc696c7cae744759d4020e42da8aa63b37fe55ce594be73075fe1ee5407dd59d7e47975be9f674bfc81e91bae2c89c62d27ba55a1
+    write-file-atomic: "npm:^4.0.2"
+  checksum: 10c0/7f4a7f73dcf45dfdf280c7aa283cbac7b6e5a904813c3a93ead7e55873761fc20d5c4f0191d2019004fac6f55f061c82eb3249c2901164ad80e362e7a7ede5a6
   languageName: node
   linkType: hard
 
@@ -5364,16 +4012,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@jridgewell/trace-mapping@npm:^0.3.23":
-  version: 0.3.31
-  resolution: "@jridgewell/trace-mapping@npm:0.3.31"
-  dependencies:
-    "@jridgewell/resolve-uri": "npm:^3.1.0"
-    "@jridgewell/sourcemap-codec": "npm:^1.4.14"
-  checksum: 10c0/4b30ec8cd56c5fd9a661f088230af01e0c1a3888d11ffb6b47639700f71225be21d1f7e168048d6d4f9449207b978a235c07c8f15c07705685d16dc06280e9d9
-  languageName: node
-  linkType: hard
-
 "@jsonjoy.com/base64@npm:^1.1.2":
   version: 1.1.2
   resolution: "@jsonjoy.com/base64@npm:1.1.2"
@@ -5709,6 +4347,15 @@ __metadata:
   languageName: node
   linkType: hard
 
+"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1":
+  version: 5.1.1-v1
+  resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1"
+  dependencies:
+    eslint-scope: "npm:5.1.1"
+  checksum: 10c0/75dda3e623b8ad7369ca22552d6beee337a814b2d0e8a32d23edd13fcb65c8082b32c5d86e436f3860dd7ade30d91d5db55d4ef9a08fb5a976c718ecc0d88a74
+  languageName: node
+  linkType: hard
+
 "@noble/ciphers@npm:^1.3.0":
   version: 1.3.0
   resolution: "@noble/ciphers@npm:1.3.0"
@@ -6858,7 +5505,7 @@ __metadata:
     "@blockaid/client": "npm:1.4.0"
     "@lavamoat/allow-scripts": "npm:5.1.0"
     "@stellar/js-xdr": "npm:4.0.0"
-    bignumber.js: "npm:11.1.4"
+    bignumber.js: "npm:9.3.0"
     prettier: "npm:3.8.4"
     stellar-sdk: "npm:@stellar/stellar-sdk@16.0.0-rc.1"
     stellar-sdk-next: "npm:@stellar/stellar-sdk@16.0.0-rc.1"
@@ -6882,7 +5529,7 @@ __metadata:
   version: 0.0.0-use.local
   resolution: "@shared/helpers@workspace:@shared/helpers"
   dependencies:
-    bignumber.js: "npm:11.1.4"
+    bignumber.js: "npm:9.3.0"
     stellar-sdk: "npm:@stellar/stellar-sdk@16.0.0-rc.1"
     stellar-sdk-next: "npm:@stellar/stellar-sdk@16.0.0-rc.1"
     typescript: "npm:6.0.3"
@@ -6919,13 +5566,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@sinclair/typebox@npm:^0.34.0":
-  version: 0.34.49
-  resolution: "@sinclair/typebox@npm:0.34.49"
-  checksum: 10c0/16b7d87f039a49b68c10bb4cdcae2ce5242b2472228851fd6483731616aba4ef977690aa517b230a8d20da8185bb416eb34e326f30568b3963c1cf26b05d1ad8
-  languageName: node
-  linkType: hard
-
 "@sindresorhus/base62@npm:^1.0.0":
   version: 1.0.0
   resolution: "@sindresorhus/base62@npm:1.0.0"
@@ -6970,21 +5610,21 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@sinonjs/fake-timers@npm:^11.2.2":
-  version: 11.3.1
-  resolution: "@sinonjs/fake-timers@npm:11.3.1"
+"@sinonjs/fake-timers@npm:^10.0.2":
+  version: 10.3.0
+  resolution: "@sinonjs/fake-timers@npm:10.3.0"
   dependencies:
-    "@sinonjs/commons": "npm:^3.0.1"
-  checksum: 10c0/c4f96ea7c3ab0e1a5fc1e2e1201e984a9302841a9fb10059120ce3b6789dae0f851c8827cf16b052a6f87db9a098cdd36f7067246e7a9b71da1d5a2c3d3a9f3d
+    "@sinonjs/commons": "npm:^3.0.0"
+  checksum: 10c0/2e2fb6cc57f227912814085b7b01fede050cd4746ea8d49a1e44d5a0e56a804663b0340ae2f11af7559ea9bf4d087a11f2f646197a660ea3cb04e19efc04aa63
   languageName: node
   linkType: hard
 
-"@sinonjs/fake-timers@npm:^15.4.0":
-  version: 15.4.0
-  resolution: "@sinonjs/fake-timers@npm:15.4.0"
+"@sinonjs/fake-timers@npm:^11.2.2":
+  version: 11.3.1
+  resolution: "@sinonjs/fake-timers@npm:11.3.1"
   dependencies:
     "@sinonjs/commons": "npm:^3.0.1"
-  checksum: 10c0/de4522afe0699fa8d3ae9d1715cbaa4b47e518c707bb7988a9ec6c7c67557d9f6df451f6be0338598b984a86f65aab9fab38dd9ce75a3c0ffb801a9500d5b10d
+  checksum: 10c0/c4f96ea7c3ab0e1a5fc1e2e1201e984a9302841a9fb10059120ce3b6789dae0f851c8827cf16b052a6f87db9a098cdd36f7067246e7a9b71da1d5a2c3d3a9f3d
   languageName: node
   linkType: hard
 
@@ -7055,22 +5695,12 @@ __metadata:
     tslib: "npm:^2.8.1"
   peerDependencies:
     react: ">=18.x"
-    react-dom: ">=18.x"
-  checksum: 10c0/d338db4f27278b42ba04ac7566882ddba99f649eacf7d9aeaa94902cf344f2ed77f08605750a3434020a0e62bf28e33f01a3ac199b4d7a9c11f38f5b7da802d4
-  languageName: node
-  linkType: hard
-
-"@stellar/freighter-api@npm:6.0.1, @stellar/freighter-api@npm:latest":
-  version: 6.0.1
-  resolution: "@stellar/freighter-api@npm:6.0.1"
-  dependencies:
-    buffer: "npm:6.0.3"
-    semver: "npm:7.7.1"
-  checksum: 10c0/52b27ee420c6b1b4ea535dce214492f832c7c69a6af5d956607653503e16d783c3807136e7ab84c44806cd5a50a31416b1ebe3b3a475ad7843d714c47d19d82d
+    react-dom: ">=18.x"
+  checksum: 10c0/d338db4f27278b42ba04ac7566882ddba99f649eacf7d9aeaa94902cf344f2ed77f08605750a3434020a0e62bf28e33f01a3ac199b4d7a9c11f38f5b7da802d4
   languageName: node
   linkType: hard
 
-"@stellar/freighter-api@workspace:@stellar/freighter-api":
+"@stellar/freighter-api@workspace:*, @stellar/freighter-api@workspace:@stellar/freighter-api":
   version: 0.0.0-use.local
   resolution: "@stellar/freighter-api@workspace:@stellar/freighter-api"
   dependencies:
@@ -7586,6 +6216,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"@tootallnate/once@npm:2":
+  version: 2.0.1
+  resolution: "@tootallnate/once@npm:2.0.1"
+  checksum: 10c0/23b01a341485be711c602077936d70f8e695405bb88ab4433dc6d1e6cb4556401518789574d399eded790b70b27738136c9a8f02df7ae4219f4ba28bb22d586b
+  languageName: node
+  linkType: hard
+
 "@trezor/connect-plugin-stellar@npm:^9.0.2":
   version: 9.2.1
   resolution: "@trezor/connect-plugin-stellar@npm:9.2.1"
@@ -7637,7 +6274,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/babel__core@npm:^7.20.5":
+"@types/babel__core@npm:^7.1.14":
   version: 7.20.5
   resolution: "@types/babel__core@npm:7.20.5"
   dependencies:
@@ -7669,7 +6306,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/babel__traverse@npm:*":
+"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6":
   version: 7.28.0
   resolution: "@types/babel__traverse@npm:7.28.0"
   dependencies:
@@ -7847,10 +6484,12 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/gensync@npm:^1.0.5":
-  version: 1.0.5
-  resolution: "@types/gensync@npm:1.0.5"
-  checksum: 10c0/7c37c8fc3b1a49efd8889f635a6204008f1c1cc86a09ac6a96e219cf3fc52cf1ff091c4dddc3160e93261d6e599fbba39f5fb698fbf936518d1c410289cdd640
+"@types/graceful-fs@npm:^4.1.3":
+  version: 4.1.9
+  resolution: "@types/graceful-fs@npm:4.1.9"
+  dependencies:
+    "@types/node": "npm:*"
+  checksum: 10c0/235d2fc69741448e853333b7c3d1180a966dd2b8972c8cbcd6b2a0c6cd7f8d582ab2b8e58219dbc62cce8f1b40aa317ff78ea2201cdd8249da5025adebed6f0b
   languageName: node
   linkType: hard
 
@@ -7932,7 +6571,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1, @types/istanbul-lib-coverage@npm:^2.0.6":
+"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1":
   version: 2.0.6
   resolution: "@types/istanbul-lib-coverage@npm:2.0.6"
   checksum: 10c0/3948088654f3eeb45363f1db158354fb013b362dba2a5c2c18c559484d5eb9f6fd85b23d66c0a7c2fcfab7308d0a585b14dadaca6cc8bf89ebfdc7f8f5102fb7
@@ -7948,7 +6587,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/istanbul-reports@npm:^3.0.0, @types/istanbul-reports@npm:^3.0.4":
+"@types/istanbul-reports@npm:^3.0.0":
   version: 3.0.4
   resolution: "@types/istanbul-reports@npm:3.0.4"
   dependencies:
@@ -7957,13 +6596,13 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/jest@npm:30.0.0":
-  version: 30.0.0
-  resolution: "@types/jest@npm:30.0.0"
+"@types/jest@npm:29.5.14":
+  version: 29.5.14
+  resolution: "@types/jest@npm:29.5.14"
   dependencies:
-    expect: "npm:^30.0.0"
-    pretty-format: "npm:^30.0.0"
-  checksum: 10c0/20c6ce574154bc16f8dd6a97afacca4b8c4921a819496a3970382031c509ebe87a1b37b152a1b8475089b82d8ca951a9e95beb4b9bf78fbf579b1536f0b65969
+    expect: "npm:^29.0.0"
+    pretty-format: "npm:^29.0.0"
+  checksum: 10c0/18e0712d818890db8a8dab3d91e9ea9f7f19e3f83c2e50b312f557017dc81466207a71f3ed79cf4428e813ba939954fa26ffa0a9a7f153181ba174581b1c2aed
   languageName: node
   linkType: hard
 
@@ -7974,19 +6613,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/jsdom@npm:28.0.3":
-  version: 28.0.3
-  resolution: "@types/jsdom@npm:28.0.3"
-  dependencies:
-    "@types/node": "npm:*"
-    "@types/tough-cookie": "npm:*"
-    parse5: "npm:^8.0.0"
-    undici-types: "npm:^7.21.0"
-  checksum: 10c0/08b1cd61ee3e9610676be3c68a782a94667b86a5f73b8a262095d05f84c9e864fc11b25ae53450cd519a0abd46c202906a735bd61aa176257a981964bc5b1166
-  languageName: node
-  linkType: hard
-
-"@types/jsdom@npm:^21.1.7":
+"@types/jsdom@npm:21.1.7":
   version: 21.1.7
   resolution: "@types/jsdom@npm:21.1.7"
   dependencies:
@@ -7997,10 +6624,14 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/jsesc@npm:^2.5.0":
-  version: 2.5.1
-  resolution: "@types/jsesc@npm:2.5.1"
-  checksum: 10c0/12ba7bf5968aeeb36408269f4b5a39718efc6411fa197cf0f5e967ba36ad7b7d555b78787fc480db43ce63ebe6ab0ffe5fd9f64b1ea3b0d073877f0747491b30
+"@types/jsdom@npm:^20.0.0":
+  version: 20.0.1
+  resolution: "@types/jsdom@npm:20.0.1"
+  dependencies:
+    "@types/node": "npm:*"
+    "@types/tough-cookie": "npm:*"
+    parse5: "npm:^7.0.0"
+  checksum: 10c0/3d4b2a3eab145674ee6da482607c5e48977869109f0f62560bf91ae1a792c9e847ac7c6aaf243ed2e97333cb3c51aef314ffa54a19ef174b8f9592dfcb836b25
   languageName: node
   linkType: hard
 
@@ -8267,7 +6898,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/stack-utils@npm:^2.0.3":
+"@types/stack-utils@npm:^2.0.0":
   version: 2.0.3
   resolution: "@types/stack-utils@npm:2.0.3"
   checksum: 10c0/1f4658385ae936330581bcb8aa3a066df03867d90281cdf89cc356d404bd6579be0f11902304e1f775d92df22c6dd761d4451c804b0a4fba973e06211e9bd77c
@@ -8351,15 +6982,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/yargs@npm:^17.0.33":
-  version: 17.0.35
-  resolution: "@types/yargs@npm:17.0.35"
-  dependencies:
-    "@types/yargs-parser": "npm:*"
-  checksum: 10c0/609557826a6b85e73ccf587923f6429850d6dc70e420b455bab4601b670bfadf684b09ae288bccedab042c48ba65f1666133cf375814204b544009f57d6eef63
-  languageName: node
-  linkType: hard
-
 "@types/yargs@npm:^17.0.8":
   version: 17.0.33
   resolution: "@types/yargs@npm:17.0.33"
@@ -8534,13 +7156,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@ungap/structured-clone@npm:^1.3.0":
-  version: 1.3.2
-  resolution: "@ungap/structured-clone@npm:1.3.2"
-  checksum: 10c0/4d76bb376ec3e15f38bdffe045377807c79057daf54ae17eeb977c5b95efddd2d726b38c15aeb5d5c1a45c64ad03aa7e8b1a6dc67895480cba536ffd1c7a06ec
-  languageName: node
-  linkType: hard
-
 "@unrs/resolver-binding-android-arm-eabi@npm:1.12.2":
   version: 1.12.2
   resolution: "@unrs/resolver-binding-android-arm-eabi@npm:1.12.2"
@@ -8875,6 +7490,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"abab@npm:^2.0.6":
+  version: 2.0.6
+  resolution: "abab@npm:2.0.6"
+  checksum: 10c0/0b245c3c3ea2598fe0025abf7cc7bb507b06949d51e8edae5d12c1b847a0a0c09639abcb94788332b4e2044ac4491c1e8f571b51c7826fd4b0bda1685ad4a278
+  languageName: node
+  linkType: hard
+
 "abbrev@npm:^3.0.0":
   version: 3.0.1
   resolution: "abbrev@npm:3.0.1"
@@ -8909,6 +7531,16 @@ __metadata:
   languageName: node
   linkType: hard
 
+"acorn-globals@npm:^7.0.0":
+  version: 7.0.1
+  resolution: "acorn-globals@npm:7.0.1"
+  dependencies:
+    acorn: "npm:^8.1.0"
+    acorn-walk: "npm:^8.0.2"
+  checksum: 10c0/7437f58e92d99292dbebd0e79531af27d706c9f272f31c675d793da6c82d897e75302a8744af13c7f7978a8399840f14a353b60cf21014647f71012982456d2b
+  languageName: node
+  linkType: hard
+
 "acorn-import-phases@npm:^1.0.3":
   version: 1.0.4
   resolution: "acorn-import-phases@npm:1.0.4"
@@ -8936,7 +7568,16 @@ __metadata:
   languageName: node
   linkType: hard
 
-"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.0, acorn@npm:^8.15.0, acorn@npm:^8.16.0":
+"acorn-walk@npm:^8.0.2":
+  version: 8.3.5
+  resolution: "acorn-walk@npm:8.3.5"
+  dependencies:
+    acorn: "npm:^8.11.0"
+  checksum: 10c0/e31bf5b5423ed1349437029d66d708b9fbd1b77a644b031501e2c753b028d13b56348210ed901d5b1d0d86eb3381c0a0fc0d0998511a9d546d1194936266a332
+  languageName: node
+  linkType: hard
+
+"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.1.0, acorn@npm:^8.11.0, acorn@npm:^8.15.0, acorn@npm:^8.16.0, acorn@npm:^8.8.1":
   version: 8.17.0
   resolution: "acorn@npm:8.17.0"
   bin:
@@ -9104,7 +7745,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"ansi-escapes@npm:^4.3.2":
+"ansi-escapes@npm:^4.2.1":
   version: 4.3.2
   resolution: "ansi-escapes@npm:4.3.2"
   dependencies:
@@ -9163,7 +7804,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"ansi-styles@npm:^5.0.0, ansi-styles@npm:^5.2.0":
+"ansi-styles@npm:^5.0.0":
   version: 5.2.0
   resolution: "ansi-styles@npm:5.2.0"
   checksum: 10c0/9c4ca80eb3c2fb7b33841c210d2f20807f40865d27008d7c3f707b7f95cab7d67462a565e2388ac3285b71cb3d9bb2173de8da37c57692a362885ec34d6e27df
@@ -9184,7 +7825,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"anymatch@npm:^3.1.3, anymatch@npm:~3.1.2":
+"anymatch@npm:^3.0.3, anymatch@npm:^3.1.3, anymatch@npm:~3.1.2":
   version: 3.1.3
   resolution: "anymatch@npm:3.1.3"
   dependencies:
@@ -9511,20 +8152,20 @@ __metadata:
   languageName: node
   linkType: hard
 
-"babel-jest@npm:30.4.1":
-  version: 30.4.1
-  resolution: "babel-jest@npm:30.4.1"
+"babel-jest@npm:29.7.0, babel-jest@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "babel-jest@npm:29.7.0"
   dependencies:
-    "@jest/transform": "npm:30.4.1"
-    "@types/babel__core": "npm:^7.20.5"
-    babel-plugin-istanbul: "npm:^7.0.1"
-    babel-preset-jest: "npm:30.4.0"
-    chalk: "npm:^4.1.2"
-    graceful-fs: "npm:^4.2.11"
+    "@jest/transform": "npm:^29.7.0"
+    "@types/babel__core": "npm:^7.1.14"
+    babel-plugin-istanbul: "npm:^6.1.1"
+    babel-preset-jest: "npm:^29.6.3"
+    chalk: "npm:^4.0.0"
+    graceful-fs: "npm:^4.2.9"
     slash: "npm:^3.0.0"
   peerDependencies:
-    "@babel/core": ^7.11.0 || ^8.0.0-0
-  checksum: 10c0/339b449011f31dc9eb18d9c49f0bb84e8de284e1107e64159a2f4a432bbd532d6a729774a56b7fbe76f5ddd716a0b4b7ad737265feab23b4d0225489b79a6f72
+    "@babel/core": ^7.8.0
+  checksum: 10c0/2eda9c1391e51936ca573dd1aedfee07b14c59b33dbe16ef347873ddd777bcf6e2fc739681e9e9661ab54ef84a3109a03725be2ac32cd2124c07ea4401cbe8c1
   languageName: node
   linkType: hard
 
@@ -9568,25 +8209,28 @@ __metadata:
   languageName: node
   linkType: hard
 
-"babel-plugin-istanbul@npm:^7.0.1":
-  version: 7.0.1
-  resolution: "babel-plugin-istanbul@npm:7.0.1"
+"babel-plugin-istanbul@npm:^6.1.1":
+  version: 6.1.1
+  resolution: "babel-plugin-istanbul@npm:6.1.1"
   dependencies:
     "@babel/helper-plugin-utils": "npm:^7.0.0"
     "@istanbuljs/load-nyc-config": "npm:^1.0.0"
-    "@istanbuljs/schema": "npm:^0.1.3"
-    istanbul-lib-instrument: "npm:^6.0.2"
+    "@istanbuljs/schema": "npm:^0.1.2"
+    istanbul-lib-instrument: "npm:^5.0.4"
     test-exclude: "npm:^6.0.0"
-  checksum: 10c0/92975e3df12503b168695463b451468da0c20e117807221652eb8e33a26c160f3b9d4c5c4e65495657420e871c6a54e5e31f539e2e1da37ef2261d7ddd4b1dfd
+  checksum: 10c0/1075657feb705e00fd9463b329921856d3775d9867c5054b449317d39153f8fbcebd3e02ebf00432824e647faff3683a9ca0a941325ef1afe9b3c4dd51b24beb
   languageName: node
   linkType: hard
 
-"babel-plugin-jest-hoist@npm:30.4.0":
-  version: 30.4.0
-  resolution: "babel-plugin-jest-hoist@npm:30.4.0"
+"babel-plugin-jest-hoist@npm:^29.6.3":
+  version: 29.6.3
+  resolution: "babel-plugin-jest-hoist@npm:29.6.3"
   dependencies:
-    "@types/babel__core": "npm:^7.20.5"
-  checksum: 10c0/1738ed536bb5ff536b4d406b8db7dbbd76cf10f80bb20d902e6efdda79898f045b9a991124d7104d8c398d0bd995d511d57694952645fba0f6250595a45277b0
+    "@babel/template": "npm:^7.3.3"
+    "@babel/types": "npm:^7.3.3"
+    "@types/babel__core": "npm:^7.1.14"
+    "@types/babel__traverse": "npm:^7.0.6"
+  checksum: 10c0/7e6451caaf7dce33d010b8aafb970e62f1b0c0b57f4978c37b0d457bbcf0874d75a395a102daf0bae0bd14eafb9f6e9a165ee5e899c0a4f1f3bb2e07b304ed2e
   languageName: node
   linkType: hard
 
@@ -9627,18 +8271,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"babel-plugin-polyfill-corejs3@npm:^1.0.0":
-  version: 1.0.0
-  resolution: "babel-plugin-polyfill-corejs3@npm:1.0.0"
-  dependencies:
-    "@babel/helper-define-polyfill-provider": "npm:^1.0.0"
-    core-js-compat: "npm:^3.48.0"
-  peerDependencies:
-    "@babel/core": ^7.4.0 || ^8.0.0
-  checksum: 10c0/265a1bd798dfde9fd900b341476d5e436667735ded7ef7f70375ff30620dad6634acc81d969ac20bd11ddc27c921ef26aa2aa5f563ad8e998e3d1ef6b665f5f1
-  languageName: node
-  linkType: hard
-
 "babel-plugin-polyfill-regenerator@npm:^0.6.5, babel-plugin-polyfill-regenerator@npm:^0.6.6":
   version: 0.6.8
   resolution: "babel-plugin-polyfill-regenerator@npm:0.6.8"
@@ -9661,7 +8293,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"babel-preset-current-node-syntax@npm:^1.2.0":
+"babel-preset-current-node-syntax@npm:^1.0.0":
   version: 1.2.0
   resolution: "babel-preset-current-node-syntax@npm:1.2.0"
   dependencies:
@@ -9686,15 +8318,15 @@ __metadata:
   languageName: node
   linkType: hard
 
-"babel-preset-jest@npm:30.4.0":
-  version: 30.4.0
-  resolution: "babel-preset-jest@npm:30.4.0"
+"babel-preset-jest@npm:^29.6.3":
+  version: 29.6.3
+  resolution: "babel-preset-jest@npm:29.6.3"
   dependencies:
-    babel-plugin-jest-hoist: "npm:30.4.0"
-    babel-preset-current-node-syntax: "npm:^1.2.0"
+    babel-plugin-jest-hoist: "npm:^29.6.3"
+    babel-preset-current-node-syntax: "npm:^1.0.0"
   peerDependencies:
-    "@babel/core": ^7.11.0 || ^8.0.0-beta.1
-  checksum: 10c0/ca2623aa4d8bf82b1fd01e5724a87cea7f80ff089341cf12415e9ce4b10f74838ecc6c8a48921f421f90bcd44f7929c0ad300146082e2f400253adb97ab5eb3a
+    "@babel/core": ^7.0.0
+  checksum: 10c0/ec5fd0276b5630b05f0c14bb97cc3815c6b31600c683ebb51372e54dcb776cff790bdeeabd5b8d01ede375a040337ccbf6a3ccd68d3a34219125945e167ad943
   languageName: node
   linkType: hard
 
@@ -9832,15 +8464,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"bidi-js@npm:^1.0.3":
-  version: 1.0.3
-  resolution: "bidi-js@npm:1.0.3"
-  dependencies:
-    require-from-string: "npm:^2.0.2"
-  checksum: 10c0/fdddea4aa4120a34285486f2267526cd9298b6e8b773ad25e765d4f104b6d7437ab4ba542e6939e3ac834a7570bcf121ee2cf6d3ae7cd7082c4b5bedc8f271e1
-  languageName: node
-  linkType: hard
-
 "big.js@npm:^5.2.2":
   version: 5.2.2
   resolution: "big.js@npm:5.2.2"
@@ -9864,10 +8487,10 @@ __metadata:
   languageName: node
   linkType: hard
 
-"bignumber.js@npm:11.1.4":
-  version: 11.1.4
-  resolution: "bignumber.js@npm:11.1.4"
-  checksum: 10c0/18a0830b51816f4225cf4a5d2df355bfdec79427dfa5d7b6fac0853d8c846bd020678aa4ee11460fff030132e6b4b0b05c40f2f5b9d52bca0361b2612d4c6960
+"bignumber.js@npm:9.3.0":
+  version: 9.3.0
+  resolution: "bignumber.js@npm:9.3.0"
+  checksum: 10c0/f54a79cd6fc98552ac0510c1cd9381650870ae443bdb20ba9b98e3548188d941506ac3c22a9f9c69b2cc60da9be5700e87d3f54d2825310a8b2ae999dfd6d99d
   languageName: node
   linkType: hard
 
@@ -10300,7 +8923,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"callsites@npm:^3.0.0, callsites@npm:^3.1.0":
+"callsites@npm:^3.0.0":
   version: 3.1.0
   resolution: "callsites@npm:3.1.0"
   checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301
@@ -10324,7 +8947,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"camelcase@npm:^6.2.0, camelcase@npm:^6.3.0":
+"camelcase@npm:^6.2.0":
   version: 6.3.0
   resolution: "camelcase@npm:6.3.0"
   checksum: 10c0/0d701658219bd3116d12da3eab31acddb3f9440790c0792e0d398f0a520a6a4058018e546862b6fba89d7ae990efaeb97da71e1913e9ebf5a8b5621a3d55c710
@@ -10547,13 +9170,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"ci-info@npm:^4.2.0":
-  version: 4.4.0
-  resolution: "ci-info@npm:4.4.0"
-  checksum: 10c0/44156201545b8dde01aa8a09ee2fe9fc7a73b1bef9adbd4606c9f61c8caeeb73fb7a575c88b0443f7b4edb5ee45debaa59ed54ba5f99698339393ca01349eb3a
-  languageName: node
-  linkType: hard
-
 "cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3":
   version: 1.0.6
   resolution: "cipher-base@npm:1.0.6"
@@ -10564,10 +9180,10 @@ __metadata:
   languageName: node
   linkType: hard
 
-"cjs-module-lexer@npm:^2.1.0":
-  version: 2.2.0
-  resolution: "cjs-module-lexer@npm:2.2.0"
-  checksum: 10c0/aec4ca58f87145fac221386790ecaae8b012f2e2359a45acb61d8c75ea4fa84f6ea869f17abc1a7e91a808eff0fed581209632f03540de16f72f0a28f5fd35ac
+"cjs-module-lexer@npm:^1.0.0":
+  version: 1.4.3
+  resolution: "cjs-module-lexer@npm:1.4.3"
+  checksum: 10c0/076b3af85adc4d65dbdab1b5b240fe5b45d44fcf0ef9d429044dd94d19be5589376805c44fb2d4b3e684e5fe6a9b7cf3e426476a6507c45283c5fc6ff95240be
   languageName: node
   linkType: hard
 
@@ -10715,7 +9331,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"collect-v8-coverage@npm:^1.0.2":
+"collect-v8-coverage@npm:^1.0.0":
   version: 1.0.3
   resolution: "collect-v8-coverage@npm:1.0.3"
   checksum: 10c0/bc62ba251bcce5e3354a8f88fa6442bee56e3e612fec08d4dfcf66179b41ea0bf544b0f78c4ebc0f8050871220af95bb5c5578a6aef346feea155640582f09dc
@@ -11166,6 +9782,23 @@ __metadata:
   languageName: node
   linkType: hard
 
+"create-jest@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "create-jest@npm:29.7.0"
+  dependencies:
+    "@jest/types": "npm:^29.6.3"
+    chalk: "npm:^4.0.0"
+    exit: "npm:^0.1.2"
+    graceful-fs: "npm:^4.2.9"
+    jest-config: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    prompts: "npm:^2.0.1"
+  bin:
+    create-jest: bin/create-jest.js
+  checksum: 10c0/e7e54c280692470d3398f62a6238fd396327e01c6a0757002833f06d00afc62dd7bfe04ff2b9cd145264460e6b4d1eb8386f2925b7e567f97939843b7b0e812f
+  languageName: node
+  linkType: hard
+
 "cross-fetch@npm:^3.1.5":
   version: 3.2.0
   resolution: "cross-fetch@npm:3.2.0"
@@ -11381,16 +10014,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"css-tree@npm:^3.0.0, css-tree@npm:^3.2.1":
-  version: 3.2.1
-  resolution: "css-tree@npm:3.2.1"
-  dependencies:
-    mdn-data: "npm:2.27.1"
-    source-map-js: "npm:^1.2.1"
-  checksum: 10c0/1f65e9ccaa56112a4706d6f003dd43d777f0dbcf848e66fd320f823192533581f8dd58daa906cb80622658332d50284d6be13b87a6ab4556cbbfe9ef535bbf7e
-  languageName: node
-  linkType: hard
-
 "css-tree@npm:~2.2.0":
   version: 2.2.1
   resolution: "css-tree@npm:2.2.1"
@@ -11525,6 +10148,29 @@ __metadata:
   languageName: node
   linkType: hard
 
+"cssom@npm:^0.5.0":
+  version: 0.5.0
+  resolution: "cssom@npm:0.5.0"
+  checksum: 10c0/8c4121c243baf0678c65dcac29b201ff0067dfecf978de9d5c83b2ff127a8fdefd2bfd54577f5ad8c80ed7d2c8b489ae01c82023545d010c4ecb87683fb403dd
+  languageName: node
+  linkType: hard
+
+"cssom@npm:~0.3.6":
+  version: 0.3.8
+  resolution: "cssom@npm:0.3.8"
+  checksum: 10c0/d74017b209440822f9e24d8782d6d2e808a8fdd58fa626a783337222fe1c87a518ba944d4c88499031b4786e68772c99dfae616638d71906fe9f203aeaf14411
+  languageName: node
+  linkType: hard
+
+"cssstyle@npm:^2.3.0":
+  version: 2.3.0
+  resolution: "cssstyle@npm:2.3.0"
+  dependencies:
+    cssom: "npm:~0.3.6"
+  checksum: 10c0/863400da2a458f73272b9a55ba7ff05de40d850f22eb4f37311abebd7eff801cf1cd2fb04c4c92b8c3daed83fe766e52e4112afb7bc88d86c63a9c2256a7d178
+  languageName: node
+  linkType: hard
+
 "cssstyle@npm:^4.2.1":
   version: 4.6.0
   resolution: "cssstyle@npm:4.6.0"
@@ -11556,6 +10202,17 @@ __metadata:
   languageName: node
   linkType: hard
 
+"data-urls@npm:^3.0.2":
+  version: 3.0.2
+  resolution: "data-urls@npm:3.0.2"
+  dependencies:
+    abab: "npm:^2.0.6"
+    whatwg-mimetype: "npm:^3.0.0"
+    whatwg-url: "npm:^11.0.0"
+  checksum: 10c0/051c3aaaf3e961904f136aab095fcf6dff4db23a7fc759dd8ba7b3e6ba03fc07ef608086caad8ab910d864bd3b5e57d0d2f544725653d77c96a2c971567045f4
+  languageName: node
+  linkType: hard
+
 "data-urls@npm:^5.0.0":
   version: 5.0.0
   resolution: "data-urls@npm:5.0.0"
@@ -11566,16 +10223,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"data-urls@npm:^7.0.0":
-  version: 7.0.0
-  resolution: "data-urls@npm:7.0.0"
-  dependencies:
-    whatwg-mimetype: "npm:^5.0.0"
-    whatwg-url: "npm:^16.0.0"
-  checksum: 10c0/08d88ef50d8966a070ffdaa703e1e4b29f01bb2da364dfbc1612b1c2a4caa8045802c9532d81347b21781100132addb36a585071c8323b12cce97973961dee9f
-  languageName: node
-  linkType: hard
-
 "data-view-buffer@npm:^1.0.2":
   version: 1.0.2
   resolution: "data-view-buffer@npm:1.0.2"
@@ -11653,7 +10300,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"decimal.js@npm:^10.5.0, decimal.js@npm:^10.6.0":
+"decimal.js@npm:^10.4.2, decimal.js@npm:^10.4.3":
   version: 10.6.0
   resolution: "decimal.js@npm:10.6.0"
   checksum: 10c0/07d69fbcc54167a340d2d97de95f546f9ff1f69d2b45a02fd7a5292412df3cd9eb7e23065e532a318f5474a2e1bccf8392fdf0443ef467f97f3bf8cb0477e5aa
@@ -11687,6 +10334,18 @@ __metadata:
   languageName: node
   linkType: hard
 
+"dedent@npm:^1.0.0":
+  version: 1.7.2
+  resolution: "dedent@npm:1.7.2"
+  peerDependencies:
+    babel-plugin-macros: ^3.1.0
+  peerDependenciesMeta:
+    babel-plugin-macros:
+      optional: true
+  checksum: 10c0/acaff07cac355b93f17b1b17ebbb84d3cc55af6ab4b7814c3f505e061903e168bc6bf9ddce331552d64dee1525f0b4c549c9ade46aebfac6f69caaed74e90751
+  languageName: node
+  linkType: hard
+
 "dedent@npm:^1.6.0":
   version: 1.7.1
   resolution: "dedent@npm:1.7.1"
@@ -11838,7 +10497,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"detect-newline@npm:^3.1.0":
+"detect-newline@npm:^3.0.0":
   version: 3.1.0
   resolution: "detect-newline@npm:3.1.0"
   checksum: 10c0/c38cfc8eeb9fda09febb44bcd85e467c970d4e3bf526095394e5a4f18bc26dd0cf6b22c69c1fa9969261521c593836db335c2795218f6d781a512aea2fb8209d
@@ -11881,6 +10540,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"diff-sequences@npm:^29.6.3":
+  version: 29.6.3
+  resolution: "diff-sequences@npm:29.6.3"
+  checksum: 10c0/32e27ac7dbffdf2fb0eb5a84efd98a9ad084fbabd5ac9abb8757c6770d5320d2acd172830b28c4add29bb873d59420601dfc805ac4064330ce59b1adfd0593b2
+  languageName: node
+  linkType: hard
+
 "diff@npm:^5.1.0":
   version: 5.2.2
   resolution: "diff@npm:5.2.2"
@@ -11920,7 +10586,7 @@ __metadata:
     "@docusaurus/core": "npm:3.10.1"
     "@docusaurus/preset-classic": "npm:3.10.1"
     "@lavamoat/allow-scripts": "npm:5.1.0"
-    "@stellar/freighter-api": "npm:latest"
+    "@stellar/freighter-api": "npm:6.0.1"
     clsx: "npm:2.1.1"
     react: "npm:19.2.7"
     react-dom: "npm:19.2.7"
@@ -11990,6 +10656,15 @@ __metadata:
   languageName: node
   linkType: hard
 
+"domexception@npm:^4.0.0":
+  version: 4.0.0
+  resolution: "domexception@npm:4.0.0"
+  dependencies:
+    webidl-conversions: "npm:^7.0.0"
+  checksum: 10c0/774277cd9d4df033f852196e3c0077a34dbd15a96baa4d166e0e47138a80f4c0bdf0d94e4703e6ff5883cec56bb821a6fff84402d8a498e31de7c87eb932a294
+  languageName: node
+  linkType: hard
+
 "domhandler@npm:^4.0.0, domhandler@npm:^4.2.0, domhandler@npm:^4.3.1":
   version: 4.3.1
   resolution: "domhandler@npm:4.3.1"
@@ -12200,13 +10875,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"empathic@npm:^2.0.1":
-  version: 2.0.1
-  resolution: "empathic@npm:2.0.1"
-  checksum: 10c0/577f2868bfcad4ffbf911b57c75016125eb8cc8a7d32cf2d3e9fbcb31bfe6e9e6b66d9457ac34ccb2cd38bff353b3af34287899e0360b8c561ff6d4a048aca62
-  languageName: node
-  linkType: hard
-
 "encodeurl@npm:^2.0.0, encodeurl@npm:~2.0.0":
   version: 2.0.0
   resolution: "encodeurl@npm:2.0.0"
@@ -12297,13 +10965,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"entities@npm:^8.0.0":
-  version: 8.0.0
-  resolution: "entities@npm:8.0.0"
-  checksum: 10c0/938e631664c19451823344a351aeeafd74fae2d5fa51e4d5b6ff635afaefd4bacf0f609989888c04c42733f46ffdac15211608267ebb02488005891a4793e94d
-  languageName: node
-  linkType: hard
-
 "env-paths@npm:^2.2.0, env-paths@npm:^2.2.1":
   version: 2.2.1
   resolution: "env-paths@npm:2.2.1"
@@ -12660,6 +11321,24 @@ __metadata:
   languageName: node
   linkType: hard
 
+"escodegen@npm:^2.0.0":
+  version: 2.1.0
+  resolution: "escodegen@npm:2.1.0"
+  dependencies:
+    esprima: "npm:^4.0.1"
+    estraverse: "npm:^5.2.0"
+    esutils: "npm:^2.0.2"
+    source-map: "npm:~0.6.1"
+  dependenciesMeta:
+    source-map:
+      optional: true
+  bin:
+    escodegen: bin/escodegen.js
+    esgenerate: bin/esgenerate.js
+  checksum: 10c0/e1450a1f75f67d35c061bf0d60888b15f62ab63aef9df1901cffc81cffbbb9e8b3de237c5502cf8613a017c1df3a3003881307c78835a1ab54d8c8d2206e01d3
+  languageName: node
+  linkType: hard
+
 "eslint-config-prettier@npm:10.1.8":
   version: 10.1.8
   resolution: "eslint-config-prettier@npm:10.1.8"
@@ -12900,7 +11579,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"eslint-scope@npm:^9.1.0, eslint-scope@npm:^9.1.2":
+"eslint-scope@npm:^9.1.2":
   version: 9.1.2
   resolution: "eslint-scope@npm:9.1.2"
   dependencies:
@@ -12919,6 +11598,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"eslint-visitor-keys@npm:^2.1.0":
+  version: 2.1.0
+  resolution: "eslint-visitor-keys@npm:2.1.0"
+  checksum: 10c0/9f0e3a2db751d84067d15977ac4b4472efd6b303e369e6ff241a99feac04da758f46d5add022c33d06b53596038dbae4b4aceb27c7e68b8dfc1055b35e495787
+  languageName: node
+  linkType: hard
+
 "eslint-visitor-keys@npm:^3.4.3":
   version: 3.4.3
   resolution: "eslint-visitor-keys@npm:3.4.3"
@@ -13004,7 +11690,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"esprima@npm:^4.0.0, esprima@npm:~4.0.0":
+"esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0":
   version: 4.0.1
   resolution: "esprima@npm:4.0.1"
   bin:
@@ -13216,7 +11902,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"execa@npm:^5.1.1":
+"execa@npm:^5.0.0, execa@npm:^5.1.1":
   version: 5.1.1
   resolution: "execa@npm:5.1.1"
   dependencies:
@@ -13253,24 +11939,23 @@ __metadata:
   languageName: node
   linkType: hard
 
-"exit-x@npm:^0.2.2":
-  version: 0.2.2
-  resolution: "exit-x@npm:0.2.2"
-  checksum: 10c0/212a7a095ca5540e9581f1ef2d1d6a40df7a6027c8cc96e78ce1d16b86d1a88326d4a0eff8dff2b5ec1e68bb0c1edd5d0dfdde87df1869bf7514d4bc6a5cbd72
+"exit@npm:^0.1.2":
+  version: 0.1.2
+  resolution: "exit@npm:0.1.2"
+  checksum: 10c0/71d2ad9b36bc25bb8b104b17e830b40a08989be7f7d100b13269aaae7c3784c3e6e1e88a797e9e87523993a25ba27c8958959a554535370672cfb4d824af8989
   languageName: node
   linkType: hard
 
-"expect@npm:30.4.1, expect@npm:^30.0.0":
-  version: 30.4.1
-  resolution: "expect@npm:30.4.1"
+"expect@npm:^29.0.0, expect@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "expect@npm:29.7.0"
   dependencies:
-    "@jest/expect-utils": "npm:30.4.1"
-    "@jest/get-type": "npm:30.1.0"
-    jest-matcher-utils: "npm:30.4.1"
-    jest-message-util: "npm:30.4.1"
-    jest-mock: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
-  checksum: 10c0/ad04fbdffac5a2bae186478938a60f737e3aac823db9a80c87f3f390f9f458bddcc454dc3a3997d715706747c6aff928923e6a71db3a221adb89a51cc1582e72
+    "@jest/expect-utils": "npm:^29.7.0"
+    jest-get-type: "npm:^29.6.3"
+    jest-matcher-utils: "npm:^29.7.0"
+    jest-message-util: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+  checksum: 10c0/2eddeace66e68b8d8ee5f7be57f3014b19770caaf6815c7a08d131821da527fb8c8cb7b3dcd7c883d2d3d8d184206a4268984618032d1e4b16dc8d6596475d41
   languageName: node
   linkType: hard
 
@@ -13387,8 +12072,8 @@ __metadata:
   version: 0.0.0-use.local
   resolution: "extension@workspace:extension"
   dependencies:
-    "@amplitude/analytics-browser": "npm:^2.37.0"
-    "@amplitude/experiment-js-client": "npm:^1.20.3"
+    "@amplitude/analytics-browser": "npm:^2.44.3"
+    "@amplitude/experiment-js-client": "npm:^1.21.1"
     "@lavamoat/allow-scripts": "npm:5.1.0"
     "@ledgerhq/hw-app-str": "npm:7.7.4"
     "@ledgerhq/hw-transport-webhid": "npm:6.35.4"
@@ -13409,7 +12094,7 @@ __metadata:
     "@testing-library/user-event": "npm:14.6.1"
     "@types/chrome": "npm:0.1.43"
     "@types/js-yaml": "npm:4.0.9"
-    "@types/jsdom": "npm:28.0.3"
+    "@types/jsdom": "npm:21.1.7"
     "@types/lodash": "npm:4.17.24"
     "@types/node": "npm:26.0.1"
     "@types/qrcode.react": "npm:3.0.0"
@@ -13422,7 +12107,7 @@ __metadata:
     "@types/semver": "npm:7.7.1"
     "@types/webextension-polyfill": "npm:0.12.5"
     "@types/yup": "npm:0.32.0"
-    bignumber.js: "npm:11.1.4"
+    bignumber.js: "npm:9.3.0"
     buffer: "npm:6.0.3"
     classnames: "npm:2.5.1"
     concurrently: "npm:10.0.3"
@@ -13440,7 +12125,7 @@ __metadata:
     i18next-resources-to-backend: "npm:1.2.1"
     i18next-scanner-webpack: "npm:1.0.0"
     jest-canvas-mock: "npm:2.5.2"
-    jest-environment-jsdom: "npm:30.4.1"
+    jest-environment-jsdom: "npm:29.7.0"
     js-yaml: "npm:5.2.0"
     jsonschema: "npm:1.5.0"
     lodash: "npm:4.18.1"
@@ -13581,7 +12266,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"fb-watchman@npm:^2.0.2":
+"fb-watchman@npm:^2.0.0":
   version: 2.0.2
   resolution: "fb-watchman@npm:2.0.2"
   dependencies:
@@ -13833,6 +12518,19 @@ __metadata:
   languageName: node
   linkType: hard
 
+"form-data@npm:^4.0.0, form-data@npm:^4.0.1":
+  version: 4.0.6
+  resolution: "form-data@npm:4.0.6"
+  dependencies:
+    asynckit: "npm:^0.4.0"
+    combined-stream: "npm:^1.0.8"
+    es-set-tostringtag: "npm:^2.1.0"
+    hasown: "npm:^2.0.4"
+    mime-types: "npm:^2.1.35"
+  checksum: 10c0/43947a77bf0ff45c6ceed789778982d47a3f3e720a74b71721174ebf3310a5f1a8be1d6b38a3ee3688e8a18a2c4273073ec0844cd37efda3eaf46d41c9c318ff
+  languageName: node
+  linkType: hard
+
 "form-data@npm:^4.0.5":
   version: 4.0.5
   resolution: "form-data@npm:4.0.5"
@@ -13899,17 +12597,18 @@ __metadata:
   resolution: "freighter@workspace:."
   dependencies:
     "@actions/core": "npm:3.0.1"
-    "@babel/core": "npm:8.0.1"
-    "@babel/eslint-parser": "npm:8.0.1"
+    "@babel/core": "npm:7.29.7"
+    "@babel/eslint-parser": "npm:7.29.7"
     "@babel/plugin-proposal-optional-chaining": "npm:7.21.0"
-    "@babel/preset-env": "npm:8.0.2"
-    "@babel/preset-react": "npm:8.0.1"
-    "@babel/preset-typescript": "npm:8.0.1"
+    "@babel/preset-env": "npm:7.29.7"
+    "@babel/preset-react": "npm:7.29.7"
+    "@babel/preset-typescript": "npm:7.29.7"
+    "@eslint/js": "npm:10.0.1"
     "@lavamoat/allow-scripts": "npm:5.1.0"
     "@lavamoat/preinstall-always-fail": "npm:3.0.0"
     "@testing-library/dom": "npm:10.4.1"
     "@testing-library/jest-dom": "npm:6.9.1"
-    "@types/jest": "npm:30.0.0"
+    "@types/jest": "npm:29.5.14"
     "@types/react": "npm:19.2.17"
     "@types/react-dom": "npm:19.2.3"
     "@types/styled-components": "npm:5.1.4"
@@ -13917,7 +12616,7 @@ __metadata:
     "@typescript-eslint/parser": "npm:8.61.0"
     "@vercel/ncc": "npm:0.44.0"
     babel-eslint: "npm:10.x"
-    babel-jest: "npm:30.4.1"
+    babel-jest: "npm:29.7.0"
     babel-loader: "npm:10.1.1"
     babel-plugin-dynamic-import-node: "npm:2.3.3"
     babel-polyfill: "npm:6.26.0"
@@ -13938,10 +12637,10 @@ __metadata:
     got: "npm:15.0.6"
     husky: "npm:9.1.7"
     isomorphic-unfetch: "npm:4.0.2"
-    jest: "npm:30.4.2"
+    jest: "npm:29.7.0"
     jest-fixed-jsdom: "npm:0.0.11"
     jest-localstorage-mock: "npm:2.4.26"
-    jsdom: "npm:29.1.1"
+    jsdom: "npm:26.0.0"
     jsdom-global: "npm:3.0.2"
     lint-staged: "npm:17.0.8"
     npm-run-all: "npm:4.1.5"
@@ -14073,7 +12772,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"fsevents@npm:^2.3.3, fsevents@npm:~2.3.2":
+"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2":
   version: 2.3.3
   resolution: "fsevents@npm:2.3.3"
   dependencies:
@@ -14092,7 +12791,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"fsevents@patch:fsevents@npm%3A^2.3.3#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin":
+"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin":
   version: 2.3.3
   resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1"
   dependencies:
@@ -14341,22 +13040,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"glob@npm:^10.5.0":
-  version: 10.5.0
-  resolution: "glob@npm:10.5.0"
-  dependencies:
-    foreground-child: "npm:^3.1.0"
-    jackspeak: "npm:^3.1.2"
-    minimatch: "npm:^9.0.4"
-    minipass: "npm:^7.1.2"
-    package-json-from-dist: "npm:^1.0.0"
-    path-scurry: "npm:^1.11.1"
-  bin:
-    glob: dist/esm/bin.mjs
-  checksum: 10c0/100705eddbde6323e7b35e1d1ac28bcb58322095bd8e63a7d0bef1a2cdafe0d0f7922a981b2b48369a4f8c1b077be5c171804534c3509dfe950dde15fbe6d828
-  languageName: node
-  linkType: hard
-
 "glob@npm:^6.0.1":
   version: 6.0.4
   resolution: "glob@npm:6.0.4"
@@ -14607,7 +13290,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"hasown@npm:^2.0.2, hasown@npm:^2.0.3":
+"hasown@npm:^2.0.2, hasown@npm:^2.0.3, hasown@npm:^2.0.4":
   version: 2.0.4
   resolution: "hasown@npm:2.0.4"
   dependencies:
@@ -14848,6 +13531,15 @@ __metadata:
   languageName: node
   linkType: hard
 
+"html-encoding-sniffer@npm:^3.0.0":
+  version: 3.0.0
+  resolution: "html-encoding-sniffer@npm:3.0.0"
+  dependencies:
+    whatwg-encoding: "npm:^2.0.0"
+  checksum: 10c0/b17b3b0fb5d061d8eb15121c3b0b536376c3e295ecaf09ba48dd69c6b6c957839db124fe1e2b3f11329753a4ee01aa7dedf63b7677999e86da17fbbdd82c5386
+  languageName: node
+  linkType: hard
+
 "html-encoding-sniffer@npm:^4.0.0":
   version: 4.0.0
   resolution: "html-encoding-sniffer@npm:4.0.0"
@@ -14857,15 +13549,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"html-encoding-sniffer@npm:^6.0.0":
-  version: 6.0.0
-  resolution: "html-encoding-sniffer@npm:6.0.0"
-  dependencies:
-    "@exodus/bytes": "npm:^1.6.0"
-  checksum: 10c0/66dc3f6f5539cc3beb814fcbfae7eacf4ec38cf824d6e1425b72039b51a40f4456bd8541ba66f4f4fe09cdf885ab5cd5bae6ec6339d6895a930b2fdb83c53025
-  languageName: node
-  linkType: hard
-
 "html-entities@npm:^2.6.0":
   version: 2.6.0
   resolution: "html-entities@npm:2.6.0"
@@ -15052,6 +13735,17 @@ __metadata:
   languageName: node
   linkType: hard
 
+"http-proxy-agent@npm:^5.0.0":
+  version: 5.0.0
+  resolution: "http-proxy-agent@npm:5.0.0"
+  dependencies:
+    "@tootallnate/once": "npm:2"
+    agent-base: "npm:6"
+    debug: "npm:4"
+  checksum: 10c0/32a05e413430b2c1e542e5c74b38a9f14865301dd69dff2e53ddb684989440e3d2ce0c4b64d25eb63cf6283e6265ff979a61cf93e3ca3d23047ddfdc8df34a32
+  languageName: node
+  linkType: hard
+
 "http-proxy-agent@npm:^7.0.0, http-proxy-agent@npm:^7.0.2":
   version: 7.0.2
   resolution: "http-proxy-agent@npm:7.0.2"
@@ -15336,7 +14030,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"import-local@npm:^3.2.0":
+"import-local@npm:^3.0.2, import-local@npm:^3.2.0":
   version: 3.2.0
   resolution: "import-local@npm:3.2.0"
   dependencies:
@@ -15348,13 +14042,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"import-meta-resolve@npm:^4.2.0":
-  version: 4.2.0
-  resolution: "import-meta-resolve@npm:4.2.0"
-  checksum: 10c0/3ee8aeecb61d19b49d2703987f977e9d1c7d4ba47db615a570eaa02fe414f40dfa63f7b953e842cbe8470d26df6371332bfcf21b2fd92b0112f9fea80dde2c4c
-  languageName: node
-  linkType: hard
-
 "imurmurhash@npm:^0.1.4":
   version: 0.1.4
   resolution: "imurmurhash@npm:0.1.4"
@@ -15683,7 +14370,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"is-generator-fn@npm:^2.1.0":
+"is-generator-fn@npm:^2.0.0":
   version: 2.1.0
   resolution: "is-generator-fn@npm:2.1.0"
   checksum: 10c0/2957cab387997a466cd0bf5c1b6047bd21ecb32bdcfd8996b15747aa01002c1c88731802f1b3d34ac99f4f6874b626418bd118658cf39380fe5fff32a3af9c4d
@@ -16108,7 +14795,20 @@ __metadata:
   languageName: node
   linkType: hard
 
-"istanbul-lib-instrument@npm:^6.0.0, istanbul-lib-instrument@npm:^6.0.2":
+"istanbul-lib-instrument@npm:^5.0.4":
+  version: 5.2.1
+  resolution: "istanbul-lib-instrument@npm:5.2.1"
+  dependencies:
+    "@babel/core": "npm:^7.12.3"
+    "@babel/parser": "npm:^7.14.7"
+    "@istanbuljs/schema": "npm:^0.1.2"
+    istanbul-lib-coverage: "npm:^3.2.0"
+    semver: "npm:^6.3.0"
+  checksum: 10c0/8a1bdf3e377dcc0d33ec32fe2b6ecacdb1e4358fd0eb923d4326bb11c67622c0ceb99600a680f3dad5d29c66fc1991306081e339b4d43d0b8a2ab2e1d910a6ee
+  languageName: node
+  linkType: hard
+
+"istanbul-lib-instrument@npm:^6.0.0":
   version: 6.0.3
   resolution: "istanbul-lib-instrument@npm:6.0.3"
   dependencies:
@@ -16132,14 +14832,14 @@ __metadata:
   languageName: node
   linkType: hard
 
-"istanbul-lib-source-maps@npm:^5.0.0":
-  version: 5.0.6
-  resolution: "istanbul-lib-source-maps@npm:5.0.6"
+"istanbul-lib-source-maps@npm:^4.0.0":
+  version: 4.0.1
+  resolution: "istanbul-lib-source-maps@npm:4.0.1"
   dependencies:
-    "@jridgewell/trace-mapping": "npm:^0.3.23"
     debug: "npm:^4.1.1"
     istanbul-lib-coverage: "npm:^3.0.0"
-  checksum: 10c0/ffe75d70b303a3621ee4671554f306e0831b16f39ab7f4ab52e54d356a5d33e534d97563e318f1333a6aae1d42f91ec49c76b6cd3f3fb378addcb5c81da0255f
+    source-map: "npm:^0.6.1"
+  checksum: 10c0/19e4cc405016f2c906dff271a76715b3e881fa9faeb3f09a86cb99b8512b3a5ed19cadfe0b54c17ca0e54c1142c9c6de9330d65506e35873994e06634eebeb66
   languageName: node
   linkType: hard
 
@@ -16190,174 +14890,175 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest-changed-files@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-changed-files@npm:30.4.1"
+"jest-changed-files@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-changed-files@npm:29.7.0"
   dependencies:
-    execa: "npm:^5.1.1"
-    jest-util: "npm:30.4.1"
+    execa: "npm:^5.0.0"
+    jest-util: "npm:^29.7.0"
     p-limit: "npm:^3.1.0"
-  checksum: 10c0/324bbec3920a7d9ceb1d11872b9f1befe73d152a7ef289243f663bf3b22afe124c2c656ec316e44393f30a83b74a1738b56307a066906fa49b800686fd4d0f04
+  checksum: 10c0/e071384d9e2f6bb462231ac53f29bff86f0e12394c1b49ccafbad225ce2ab7da226279a8a94f421949920bef9be7ef574fd86aee22e8adfa149be73554ab828b
   languageName: node
   linkType: hard
 
-"jest-circus@npm:30.4.2":
-  version: 30.4.2
-  resolution: "jest-circus@npm:30.4.2"
+"jest-circus@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-circus@npm:29.7.0"
   dependencies:
-    "@jest/environment": "npm:30.4.1"
-    "@jest/expect": "npm:30.4.1"
-    "@jest/test-result": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
+    "@jest/environment": "npm:^29.7.0"
+    "@jest/expect": "npm:^29.7.0"
+    "@jest/test-result": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    chalk: "npm:^4.1.2"
+    chalk: "npm:^4.0.0"
     co: "npm:^4.6.0"
-    dedent: "npm:^1.6.0"
-    is-generator-fn: "npm:^2.1.0"
-    jest-each: "npm:30.4.1"
-    jest-matcher-utils: "npm:30.4.1"
-    jest-message-util: "npm:30.4.1"
-    jest-runtime: "npm:30.4.2"
-    jest-snapshot: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
+    dedent: "npm:^1.0.0"
+    is-generator-fn: "npm:^2.0.0"
+    jest-each: "npm:^29.7.0"
+    jest-matcher-utils: "npm:^29.7.0"
+    jest-message-util: "npm:^29.7.0"
+    jest-runtime: "npm:^29.7.0"
+    jest-snapshot: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
     p-limit: "npm:^3.1.0"
-    pretty-format: "npm:30.4.1"
-    pure-rand: "npm:^7.0.0"
+    pretty-format: "npm:^29.7.0"
+    pure-rand: "npm:^6.0.0"
     slash: "npm:^3.0.0"
-    stack-utils: "npm:^2.0.6"
-  checksum: 10c0/5d99f1336eb249057063a007fabad4ced802501fbaad7ddeea8db9553fa54fbd44d26e71e8bf61a0979d42b3b93a3d920e6f00afa26cdbb70d1e7d0969515d10
+    stack-utils: "npm:^2.0.3"
+  checksum: 10c0/8d15344cf7a9f14e926f0deed64ed190c7a4fa1ed1acfcd81e4cc094d3cc5bf7902ebb7b874edc98ada4185688f90c91e1747e0dfd7ac12463b097968ae74b5e
   languageName: node
   linkType: hard
 
-"jest-cli@npm:30.4.2":
-  version: 30.4.2
-  resolution: "jest-cli@npm:30.4.2"
+"jest-cli@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-cli@npm:29.7.0"
   dependencies:
-    "@jest/core": "npm:30.4.2"
-    "@jest/test-result": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
-    chalk: "npm:^4.1.2"
-    exit-x: "npm:^0.2.2"
-    import-local: "npm:^3.2.0"
-    jest-config: "npm:30.4.2"
-    jest-util: "npm:30.4.1"
-    jest-validate: "npm:30.4.1"
-    yargs: "npm:^17.7.2"
+    "@jest/core": "npm:^29.7.0"
+    "@jest/test-result": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    chalk: "npm:^4.0.0"
+    create-jest: "npm:^29.7.0"
+    exit: "npm:^0.1.2"
+    import-local: "npm:^3.0.2"
+    jest-config: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    jest-validate: "npm:^29.7.0"
+    yargs: "npm:^17.3.1"
   peerDependencies:
     node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
   peerDependenciesMeta:
     node-notifier:
       optional: true
   bin:
-    jest: ./bin/jest.js
-  checksum: 10c0/a036a1bf06ce7d5fed644a518c4a4ccf60c5fe5f3d96d143973048e6690c4a28a4f97fa3275d90ca236430a1b2a7c10544e7e190a4f2edfdf0a4e6daf1f6a384
+    jest: bin/jest.js
+  checksum: 10c0/a658fd55050d4075d65c1066364595962ead7661711495cfa1dfeecf3d6d0a8ffec532f3dbd8afbb3e172dd5fd2fb2e813c5e10256e7cf2fea766314942fb43a
   languageName: node
   linkType: hard
 
-"jest-config@npm:30.4.2":
-  version: 30.4.2
-  resolution: "jest-config@npm:30.4.2"
+"jest-config@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-config@npm:29.7.0"
   dependencies:
-    "@babel/core": "npm:^7.27.4"
-    "@jest/get-type": "npm:30.1.0"
-    "@jest/pattern": "npm:30.4.0"
-    "@jest/test-sequencer": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
-    babel-jest: "npm:30.4.1"
-    chalk: "npm:^4.1.2"
-    ci-info: "npm:^4.2.0"
-    deepmerge: "npm:^4.3.1"
-    glob: "npm:^10.5.0"
-    graceful-fs: "npm:^4.2.11"
-    jest-circus: "npm:30.4.2"
-    jest-docblock: "npm:30.4.0"
-    jest-environment-node: "npm:30.4.1"
-    jest-regex-util: "npm:30.4.0"
-    jest-resolve: "npm:30.4.1"
-    jest-runner: "npm:30.4.2"
-    jest-util: "npm:30.4.1"
-    jest-validate: "npm:30.4.1"
+    "@babel/core": "npm:^7.11.6"
+    "@jest/test-sequencer": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    babel-jest: "npm:^29.7.0"
+    chalk: "npm:^4.0.0"
+    ci-info: "npm:^3.2.0"
+    deepmerge: "npm:^4.2.2"
+    glob: "npm:^7.1.3"
+    graceful-fs: "npm:^4.2.9"
+    jest-circus: "npm:^29.7.0"
+    jest-environment-node: "npm:^29.7.0"
+    jest-get-type: "npm:^29.6.3"
+    jest-regex-util: "npm:^29.6.3"
+    jest-resolve: "npm:^29.7.0"
+    jest-runner: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    jest-validate: "npm:^29.7.0"
+    micromatch: "npm:^4.0.4"
     parse-json: "npm:^5.2.0"
-    pretty-format: "npm:30.4.1"
+    pretty-format: "npm:^29.7.0"
     slash: "npm:^3.0.0"
     strip-json-comments: "npm:^3.1.1"
   peerDependencies:
     "@types/node": "*"
-    esbuild-register: ">=3.4.0"
     ts-node: ">=9.0.0"
   peerDependenciesMeta:
     "@types/node":
       optional: true
-    esbuild-register:
-      optional: true
     ts-node:
       optional: true
-  checksum: 10c0/18300b1dc54a4bfb5d1db6c10aeb01b6c64736224e3f60d119da9504d49cbab5a76d789f38c44af7d168418463356db6843ad7e44f249c63ce7f409758eba0c6
+  checksum: 10c0/bab23c2eda1fff06e0d104b00d6adfb1d1aabb7128441899c9bff2247bd26710b050a5364281ce8d52b46b499153bf7e3ee88b19831a8f3451f1477a0246a0f1
   languageName: node
   linkType: hard
 
-"jest-diff@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-diff@npm:30.4.1"
+"jest-diff@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-diff@npm:29.7.0"
   dependencies:
-    "@jest/diff-sequences": "npm:30.4.0"
-    "@jest/get-type": "npm:30.1.0"
-    chalk: "npm:^4.1.2"
-    pretty-format: "npm:30.4.1"
-  checksum: 10c0/787e11f0ea27e94815479d6c5415e4173da1e74bede34c1515b8515fc9d1fe053e2ad25a3c31f9998a7292c186a0e4d395ed82e0e149d57d7708ee6759b442e9
+    chalk: "npm:^4.0.0"
+    diff-sequences: "npm:^29.6.3"
+    jest-get-type: "npm:^29.6.3"
+    pretty-format: "npm:^29.7.0"
+  checksum: 10c0/89a4a7f182590f56f526443dde69acefb1f2f0c9e59253c61d319569856c4931eae66b8a3790c443f529267a0ddba5ba80431c585deed81827032b2b2a1fc999
   languageName: node
   linkType: hard
 
-"jest-docblock@npm:30.4.0":
-  version: 30.4.0
-  resolution: "jest-docblock@npm:30.4.0"
+"jest-docblock@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-docblock@npm:29.7.0"
   dependencies:
-    detect-newline: "npm:^3.1.0"
-  checksum: 10c0/1fe1c971207e1b905e4f23d98e508a03ae631337e9ffa347ff2f6df81a1d75ced7ed3e52a809fad75fb8a8cd55b6bda4483bc124e5e1d7529eeb4ef76b29e913
+    detect-newline: "npm:^3.0.0"
+  checksum: 10c0/d932a8272345cf6b6142bb70a2bb63e0856cc0093f082821577ea5bdf4643916a98744dfc992189d2b1417c38a11fa42466f6111526bc1fb81366f56410f3be9
   languageName: node
   linkType: hard
 
-"jest-each@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-each@npm:30.4.1"
+"jest-each@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-each@npm:29.7.0"
   dependencies:
-    "@jest/get-type": "npm:30.1.0"
-    "@jest/types": "npm:30.4.1"
-    chalk: "npm:^4.1.2"
-    jest-util: "npm:30.4.1"
-    pretty-format: "npm:30.4.1"
-  checksum: 10c0/41bc1cec23901cb0c7d8f547a70574fffca8cc16a1660ed97645bf3b61f4e6151aaa58bb14ce55a3cd9f5a63a2cc782a39366caf3304a2159d1e3cc5ae79a9e4
+    "@jest/types": "npm:^29.6.3"
+    chalk: "npm:^4.0.0"
+    jest-get-type: "npm:^29.6.3"
+    jest-util: "npm:^29.7.0"
+    pretty-format: "npm:^29.7.0"
+  checksum: 10c0/f7f9a90ebee80cc688e825feceb2613627826ac41ea76a366fa58e669c3b2403d364c7c0a74d862d469b103c843154f8456d3b1c02b487509a12afa8b59edbb4
   languageName: node
   linkType: hard
 
-"jest-environment-jsdom@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-environment-jsdom@npm:30.4.1"
+"jest-environment-jsdom@npm:29.7.0":
+  version: 29.7.0
+  resolution: "jest-environment-jsdom@npm:29.7.0"
   dependencies:
-    "@jest/environment": "npm:30.4.1"
-    "@jest/environment-jsdom-abstract": "npm:30.4.1"
-    jsdom: "npm:^26.1.0"
+    "@jest/environment": "npm:^29.7.0"
+    "@jest/fake-timers": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    "@types/jsdom": "npm:^20.0.0"
+    "@types/node": "npm:*"
+    jest-mock: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    jsdom: "npm:^20.0.0"
   peerDependencies:
-    canvas: ^3.0.0
+    canvas: ^2.5.0
   peerDependenciesMeta:
     canvas:
       optional: true
-  checksum: 10c0/fec7ab60f4072c3495c5c05d272c578573df184feabf8da1bd210ad9af957166e2ded215727e516f856437f1403b2a0ad3f3efe0c2a92225bbf4197e24d7cea1
+  checksum: 10c0/139b94e2c8ec1bb5a46ce17df5211da65ce867354b3fd4e00fa6a0d1da95902df4cf7881273fc6ea937e5c325d39d6773f0d41b6c469363334de9d489d2c321f
   languageName: node
   linkType: hard
 
-"jest-environment-node@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-environment-node@npm:30.4.1"
+"jest-environment-node@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-environment-node@npm:29.7.0"
   dependencies:
-    "@jest/environment": "npm:30.4.1"
-    "@jest/fake-timers": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
+    "@jest/environment": "npm:^29.7.0"
+    "@jest/fake-timers": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    jest-mock: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
-    jest-validate: "npm:30.4.1"
-  checksum: 10c0/d8d6bb22bfd280f077b5856558d9d7112c48fd3bae6eda9b76694f1c8e1be783a725686a137437d180c9d49e6b37386c8e342e0b8e5bfcb6526dee9c10cc31ec
+    jest-mock: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+  checksum: 10c0/61f04fec077f8b1b5c1a633e3612fc0c9aa79a0ab7b05600683428f1e01a4d35346c474bde6f439f9fcc1a4aa9a2861ff852d079a43ab64b02105d1004b2592b
   languageName: node
   linkType: hard
 
@@ -16370,35 +15071,43 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest-haste-map@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-haste-map@npm:30.4.1"
+"jest-get-type@npm:^29.6.3":
+  version: 29.6.3
+  resolution: "jest-get-type@npm:29.6.3"
+  checksum: 10c0/552e7a97a983d3c2d4e412a44eb7de0430ff773dd99f7500962c268d6dfbfa431d7d08f919c9d960530e5f7f78eb47f267ad9b318265e5092b3ff9ede0db7c2b
+  languageName: node
+  linkType: hard
+
+"jest-haste-map@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-haste-map@npm:29.7.0"
   dependencies:
-    "@jest/types": "npm:30.4.1"
+    "@jest/types": "npm:^29.6.3"
+    "@types/graceful-fs": "npm:^4.1.3"
     "@types/node": "npm:*"
-    anymatch: "npm:^3.1.3"
-    fb-watchman: "npm:^2.0.2"
-    fsevents: "npm:^2.3.3"
-    graceful-fs: "npm:^4.2.11"
-    jest-regex-util: "npm:30.4.0"
-    jest-util: "npm:30.4.1"
-    jest-worker: "npm:30.4.1"
-    picomatch: "npm:^4.0.3"
+    anymatch: "npm:^3.0.3"
+    fb-watchman: "npm:^2.0.0"
+    fsevents: "npm:^2.3.2"
+    graceful-fs: "npm:^4.2.9"
+    jest-regex-util: "npm:^29.6.3"
+    jest-util: "npm:^29.7.0"
+    jest-worker: "npm:^29.7.0"
+    micromatch: "npm:^4.0.4"
     walker: "npm:^1.0.8"
   dependenciesMeta:
     fsevents:
       optional: true
-  checksum: 10c0/1350c24952bbf31c86cb1ed4e2e5edd4766a93e2be8816c4648c05463d06cfae89f3c73732f9274fdb626fdfdfe6605ed6f259b6c21257df536a6379d4b9a5e7
+  checksum: 10c0/2683a8f29793c75a4728787662972fedd9267704c8f7ef9d84f2beed9a977f1cf5e998c07b6f36ba5603f53cb010c911fe8cd0ac9886e073fe28ca66beefd30c
   languageName: node
   linkType: hard
 
-"jest-leak-detector@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-leak-detector@npm:30.4.1"
+"jest-leak-detector@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-leak-detector@npm:29.7.0"
   dependencies:
-    "@jest/get-type": "npm:30.1.0"
-    pretty-format: "npm:30.4.1"
-  checksum: 10c0/57256ac08f12186e3ed1687126b8d75a12de9c4ffa959ff41322e9ba5f93e3ed8af91dc36bc4d59f77cef6d4008bcf5a3e646cdd950743898576aec8dbae6778
+    jest-get-type: "npm:^29.6.3"
+    pretty-format: "npm:^29.7.0"
+  checksum: 10c0/71bb9f77fc489acb842a5c7be030f2b9acb18574dc9fb98b3100fc57d422b1abc55f08040884bd6e6dbf455047a62f7eaff12aa4058f7cbdc11558718ca6a395
   languageName: node
   linkType: hard
 
@@ -16409,48 +15118,47 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest-matcher-utils@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-matcher-utils@npm:30.4.1"
+"jest-matcher-utils@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-matcher-utils@npm:29.7.0"
   dependencies:
-    "@jest/get-type": "npm:30.1.0"
-    chalk: "npm:^4.1.2"
-    jest-diff: "npm:30.4.1"
-    pretty-format: "npm:30.4.1"
-  checksum: 10c0/ddbb0c7075def27ba30160883c327cb3fd13f561f5789d00a1edca1b48b0651f8ea23a1c51bcfcb6413a68c47d658bcf47a34701b8a39ce135dd28d87a3117af
+    chalk: "npm:^4.0.0"
+    jest-diff: "npm:^29.7.0"
+    jest-get-type: "npm:^29.6.3"
+    pretty-format: "npm:^29.7.0"
+  checksum: 10c0/0d0e70b28fa5c7d4dce701dc1f46ae0922102aadc24ed45d594dd9b7ae0a8a6ef8b216718d1ab79e451291217e05d4d49a82666e1a3cc2b428b75cd9c933244e
   languageName: node
   linkType: hard
 
-"jest-message-util@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-message-util@npm:30.4.1"
+"jest-message-util@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-message-util@npm:29.7.0"
   dependencies:
-    "@babel/code-frame": "npm:^7.27.1"
-    "@jest/types": "npm:30.4.1"
-    "@types/stack-utils": "npm:^2.0.3"
-    chalk: "npm:^4.1.2"
-    graceful-fs: "npm:^4.2.11"
-    jest-util: "npm:30.4.1"
-    picomatch: "npm:^4.0.3"
-    pretty-format: "npm:30.4.1"
+    "@babel/code-frame": "npm:^7.12.13"
+    "@jest/types": "npm:^29.6.3"
+    "@types/stack-utils": "npm:^2.0.0"
+    chalk: "npm:^4.0.0"
+    graceful-fs: "npm:^4.2.9"
+    micromatch: "npm:^4.0.4"
+    pretty-format: "npm:^29.7.0"
     slash: "npm:^3.0.0"
-    stack-utils: "npm:^2.0.6"
-  checksum: 10c0/ae7427544e042bc1c14abf3c0dbe8b83d0dbec22a9a5efefaca5b8ccb6b9bf391abe732e6f2117ca995c6889bfe1be35c78cec75e5ea0a50e28cffe1ba6f9fdf
+    stack-utils: "npm:^2.0.3"
+  checksum: 10c0/850ae35477f59f3e6f27efac5215f706296e2104af39232bb14e5403e067992afb5c015e87a9243ec4d9df38525ef1ca663af9f2f4766aa116f127247008bd22
   languageName: node
   linkType: hard
 
-"jest-mock@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-mock@npm:30.4.1"
+"jest-mock@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-mock@npm:29.7.0"
   dependencies:
-    "@jest/types": "npm:30.4.1"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    jest-util: "npm:30.4.1"
-  checksum: 10c0/5185a41255285c1634c5d85dda037afaaadfc12793b3293c9e253a30bb67449f8df968447f830abb9cf7a52e63694e6734680130e8085ce119056280890bf6fc
+    jest-util: "npm:^29.7.0"
+  checksum: 10c0/7b9f8349ee87695a309fe15c46a74ab04c853369e5c40952d68061d9dc3159a0f0ed73e215f81b07ee97a9faaf10aebe5877a9d6255068a0977eae6a9ff1d5ac
   languageName: node
   linkType: hard
 
-"jest-pnp-resolver@npm:^1.2.3":
+"jest-pnp-resolver@npm:^1.2.2":
   version: 1.2.3
   resolution: "jest-pnp-resolver@npm:1.2.3"
   peerDependencies:
@@ -16462,139 +15170,124 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest-regex-util@npm:30.4.0":
-  version: 30.4.0
-  resolution: "jest-regex-util@npm:30.4.0"
-  checksum: 10c0/fe7426f67b54d38bed8e9d6e6a099d63d72f41f5bf65b922d9d03fedcb55c614b45657207632f6ee22d0a59d8d11327891f258d23f68a58912fcdb0f7db48435
+"jest-regex-util@npm:^29.6.3":
+  version: 29.6.3
+  resolution: "jest-regex-util@npm:29.6.3"
+  checksum: 10c0/4e33fb16c4f42111159cafe26397118dcfc4cf08bc178a67149fb05f45546a91928b820894572679d62559839d0992e21080a1527faad65daaae8743a5705a3b
   languageName: node
   linkType: hard
 
-"jest-resolve-dependencies@npm:30.4.2":
-  version: 30.4.2
-  resolution: "jest-resolve-dependencies@npm:30.4.2"
+"jest-resolve-dependencies@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-resolve-dependencies@npm:29.7.0"
   dependencies:
-    jest-regex-util: "npm:30.4.0"
-    jest-snapshot: "npm:30.4.1"
-  checksum: 10c0/4101afabd2a4ef4e6c82bf82ea145286c1238373f7611938e8d47ddcf5aaa6e10af365436a934b7af194451e351774829cb021ac73f857b4873dcccc7aabb616
+    jest-regex-util: "npm:^29.6.3"
+    jest-snapshot: "npm:^29.7.0"
+  checksum: 10c0/b6e9ad8ae5b6049474118ea6441dfddd385b6d1fc471db0136f7c8fbcfe97137a9665e4f837a9f49f15a29a1deb95a14439b7aec812f3f99d08f228464930f0d
   languageName: node
   linkType: hard
 
-"jest-resolve@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-resolve@npm:30.4.1"
+"jest-resolve@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-resolve@npm:29.7.0"
   dependencies:
-    chalk: "npm:^4.1.2"
-    graceful-fs: "npm:^4.2.11"
-    jest-haste-map: "npm:30.4.1"
-    jest-pnp-resolver: "npm:^1.2.3"
-    jest-util: "npm:30.4.1"
-    jest-validate: "npm:30.4.1"
+    chalk: "npm:^4.0.0"
+    graceful-fs: "npm:^4.2.9"
+    jest-haste-map: "npm:^29.7.0"
+    jest-pnp-resolver: "npm:^1.2.2"
+    jest-util: "npm:^29.7.0"
+    jest-validate: "npm:^29.7.0"
+    resolve: "npm:^1.20.0"
+    resolve.exports: "npm:^2.0.0"
     slash: "npm:^3.0.0"
-    unrs-resolver: "npm:^1.7.11"
-  checksum: 10c0/0a99ef4f4fd7b3678d58a5e1cf8f0b5ec1997cdba21f5d66a8b26353d57a226f8e6a5fffc450c8836e90ab0e20d5e7935d0dea939d9a9b6a08781b9a7413184c
+  checksum: 10c0/59da5c9c5b50563e959a45e09e2eace783d7f9ac0b5dcc6375dea4c0db938d2ebda97124c8161310082760e8ebbeff9f6b177c15ca2f57fb424f637a5d2adb47
   languageName: node
   linkType: hard
 
-"jest-runner@npm:30.4.2":
-  version: 30.4.2
-  resolution: "jest-runner@npm:30.4.2"
+"jest-runner@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-runner@npm:29.7.0"
   dependencies:
-    "@jest/console": "npm:30.4.1"
-    "@jest/environment": "npm:30.4.1"
-    "@jest/test-result": "npm:30.4.1"
-    "@jest/transform": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
+    "@jest/console": "npm:^29.7.0"
+    "@jest/environment": "npm:^29.7.0"
+    "@jest/test-result": "npm:^29.7.0"
+    "@jest/transform": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    chalk: "npm:^4.1.2"
+    chalk: "npm:^4.0.0"
     emittery: "npm:^0.13.1"
-    exit-x: "npm:^0.2.2"
-    graceful-fs: "npm:^4.2.11"
-    jest-docblock: "npm:30.4.0"
-    jest-environment-node: "npm:30.4.1"
-    jest-haste-map: "npm:30.4.1"
-    jest-leak-detector: "npm:30.4.1"
-    jest-message-util: "npm:30.4.1"
-    jest-resolve: "npm:30.4.1"
-    jest-runtime: "npm:30.4.2"
-    jest-util: "npm:30.4.1"
-    jest-watcher: "npm:30.4.1"
-    jest-worker: "npm:30.4.1"
+    graceful-fs: "npm:^4.2.9"
+    jest-docblock: "npm:^29.7.0"
+    jest-environment-node: "npm:^29.7.0"
+    jest-haste-map: "npm:^29.7.0"
+    jest-leak-detector: "npm:^29.7.0"
+    jest-message-util: "npm:^29.7.0"
+    jest-resolve: "npm:^29.7.0"
+    jest-runtime: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    jest-watcher: "npm:^29.7.0"
+    jest-worker: "npm:^29.7.0"
     p-limit: "npm:^3.1.0"
     source-map-support: "npm:0.5.13"
-  checksum: 10c0/339e630fb1a7db52e208ed9f12f722122733fe9a450d9bd83c0fccc10fbc5142a8808f624c41ab1e25833af02f9c3eca85561554b75a5b3ad75b4a226f72c5cf
+  checksum: 10c0/2194b4531068d939f14c8d3274fe5938b77fa73126aedf9c09ec9dec57d13f22c72a3b5af01ac04f5c1cf2e28d0ac0b4a54212a61b05f10b5d6b47f2a1097bb4
   languageName: node
   linkType: hard
 
-"jest-runtime@npm:30.4.2":
-  version: 30.4.2
-  resolution: "jest-runtime@npm:30.4.2"
-  dependencies:
-    "@jest/environment": "npm:30.4.1"
-    "@jest/fake-timers": "npm:30.4.1"
-    "@jest/globals": "npm:30.4.1"
-    "@jest/source-map": "npm:30.0.1"
-    "@jest/test-result": "npm:30.4.1"
-    "@jest/transform": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
+"jest-runtime@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-runtime@npm:29.7.0"
+  dependencies:
+    "@jest/environment": "npm:^29.7.0"
+    "@jest/fake-timers": "npm:^29.7.0"
+    "@jest/globals": "npm:^29.7.0"
+    "@jest/source-map": "npm:^29.6.3"
+    "@jest/test-result": "npm:^29.7.0"
+    "@jest/transform": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    chalk: "npm:^4.1.2"
-    cjs-module-lexer: "npm:^2.1.0"
-    collect-v8-coverage: "npm:^1.0.2"
-    glob: "npm:^10.5.0"
-    graceful-fs: "npm:^4.2.11"
-    jest-haste-map: "npm:30.4.1"
-    jest-message-util: "npm:30.4.1"
-    jest-mock: "npm:30.4.1"
-    jest-regex-util: "npm:30.4.0"
-    jest-resolve: "npm:30.4.1"
-    jest-snapshot: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
+    chalk: "npm:^4.0.0"
+    cjs-module-lexer: "npm:^1.0.0"
+    collect-v8-coverage: "npm:^1.0.0"
+    glob: "npm:^7.1.3"
+    graceful-fs: "npm:^4.2.9"
+    jest-haste-map: "npm:^29.7.0"
+    jest-message-util: "npm:^29.7.0"
+    jest-mock: "npm:^29.7.0"
+    jest-regex-util: "npm:^29.6.3"
+    jest-resolve: "npm:^29.7.0"
+    jest-snapshot: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
     slash: "npm:^3.0.0"
     strip-bom: "npm:^4.0.0"
-  checksum: 10c0/9fce55b0c78fbe47dc2c10a944e9513833fd43c14f292460ef5cdd91e375088bf35549336e66f69fc9d29bf4f410894e9a7eef0bf12a6f39d99174a5300c2c53
-  languageName: node
-  linkType: hard
-
-"jest-snapshot@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-snapshot@npm:30.4.1"
-  dependencies:
-    "@babel/core": "npm:^7.27.4"
-    "@babel/generator": "npm:^7.27.5"
-    "@babel/plugin-syntax-jsx": "npm:^7.27.1"
-    "@babel/plugin-syntax-typescript": "npm:^7.27.1"
-    "@babel/types": "npm:^7.27.3"
-    "@jest/expect-utils": "npm:30.4.1"
-    "@jest/get-type": "npm:30.1.0"
-    "@jest/snapshot-utils": "npm:30.4.1"
-    "@jest/transform": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
-    babel-preset-current-node-syntax: "npm:^1.2.0"
-    chalk: "npm:^4.1.2"
-    expect: "npm:30.4.1"
-    graceful-fs: "npm:^4.2.11"
-    jest-diff: "npm:30.4.1"
-    jest-matcher-utils: "npm:30.4.1"
-    jest-message-util: "npm:30.4.1"
-    jest-util: "npm:30.4.1"
-    pretty-format: "npm:30.4.1"
-    semver: "npm:^7.7.2"
-    synckit: "npm:^0.11.8"
-  checksum: 10c0/cebd70277b6f0d2606f22815480146cf1e37295ed69a1d16e260a99a2ab48db167857e2fb9a938923d22ac13203c83a5e31d7f066b58d87c6d42db58c914ff13
+  checksum: 10c0/7cd89a1deda0bda7d0941835434e44f9d6b7bd50b5c5d9b0fc9a6c990b2d4d2cab59685ab3cb2850ed4cc37059f6de903af5a50565d7f7f1192a77d3fd6dd2a6
   languageName: node
   linkType: hard
 
-"jest-util@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-util@npm:30.4.1"
-  dependencies:
-    "@jest/types": "npm:30.4.1"
-    "@types/node": "npm:*"
-    chalk: "npm:^4.1.2"
-    ci-info: "npm:^4.2.0"
-    graceful-fs: "npm:^4.2.11"
-    picomatch: "npm:^4.0.3"
-  checksum: 10c0/3efe1f25e5a172d04c6af8612d82867ab603b7c1bd8cb89073ff834679b44eba178793cf3af162cf5e25be13aa736ebd23a7826683acc85bddc5873f305b1f6e
+"jest-snapshot@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-snapshot@npm:29.7.0"
+  dependencies:
+    "@babel/core": "npm:^7.11.6"
+    "@babel/generator": "npm:^7.7.2"
+    "@babel/plugin-syntax-jsx": "npm:^7.7.2"
+    "@babel/plugin-syntax-typescript": "npm:^7.7.2"
+    "@babel/types": "npm:^7.3.3"
+    "@jest/expect-utils": "npm:^29.7.0"
+    "@jest/transform": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    babel-preset-current-node-syntax: "npm:^1.0.0"
+    chalk: "npm:^4.0.0"
+    expect: "npm:^29.7.0"
+    graceful-fs: "npm:^4.2.9"
+    jest-diff: "npm:^29.7.0"
+    jest-get-type: "npm:^29.6.3"
+    jest-matcher-utils: "npm:^29.7.0"
+    jest-message-util: "npm:^29.7.0"
+    jest-util: "npm:^29.7.0"
+    natural-compare: "npm:^1.4.0"
+    pretty-format: "npm:^29.7.0"
+    semver: "npm:^7.5.3"
+  checksum: 10c0/6e9003c94ec58172b4a62864a91c0146513207bedf4e0a06e1e2ac70a4484088a2683e3a0538d8ea913bcfd53dc54a9b98a98cdfa562e7fe1d1339aeae1da570
   languageName: node
   linkType: hard
 
@@ -16612,46 +15305,33 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest-validate@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-validate@npm:30.4.1"
+"jest-validate@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-validate@npm:29.7.0"
   dependencies:
-    "@jest/get-type": "npm:30.1.0"
-    "@jest/types": "npm:30.4.1"
-    camelcase: "npm:^6.3.0"
-    chalk: "npm:^4.1.2"
+    "@jest/types": "npm:^29.6.3"
+    camelcase: "npm:^6.2.0"
+    chalk: "npm:^4.0.0"
+    jest-get-type: "npm:^29.6.3"
     leven: "npm:^3.1.0"
-    pretty-format: "npm:30.4.1"
-  checksum: 10c0/23e6677ee6d06476f368c8b6d442b4207e5fbe062e74c1da3eae9ed30a18605f4e8a14809fa9cc7f22a2d8446e8de91a512f59c278720db2ad61c77dc25ffefc
+    pretty-format: "npm:^29.7.0"
+  checksum: 10c0/a20b930480c1ed68778c739f4739dce39423131bc070cd2505ddede762a5570a256212e9c2401b7ae9ba4d7b7c0803f03c5b8f1561c62348213aba18d9dbece2
   languageName: node
   linkType: hard
 
-"jest-watcher@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-watcher@npm:30.4.1"
+"jest-watcher@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "jest-watcher@npm:29.7.0"
   dependencies:
-    "@jest/test-result": "npm:30.4.1"
-    "@jest/types": "npm:30.4.1"
+    "@jest/test-result": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
     "@types/node": "npm:*"
-    ansi-escapes: "npm:^4.3.2"
-    chalk: "npm:^4.1.2"
+    ansi-escapes: "npm:^4.2.1"
+    chalk: "npm:^4.0.0"
     emittery: "npm:^0.13.1"
-    jest-util: "npm:30.4.1"
-    string-length: "npm:^4.0.2"
-  checksum: 10c0/a56e1714b7b0f9c620c5cee95a84a48b780093594cd188e365a24768f208714895a0deb784ee48e4eec7f1828bc00435ab3c39208d490c33be3786937e997c97
-  languageName: node
-  linkType: hard
-
-"jest-worker@npm:30.4.1":
-  version: 30.4.1
-  resolution: "jest-worker@npm:30.4.1"
-  dependencies:
-    "@types/node": "npm:*"
-    "@ungap/structured-clone": "npm:^1.3.0"
-    jest-util: "npm:30.4.1"
-    merge-stream: "npm:^2.0.0"
-    supports-color: "npm:^8.1.1"
-  checksum: 10c0/3eb7ec7e928b82491e66ae6709e3a1eef3edad2bc351514a5d52037b997151989de6ce2912d6a5a3806ae3ae3bf6a1c36b1ad7bbc567d0790503fdb74576f140
+    jest-util: "npm:^29.7.0"
+    string-length: "npm:^4.0.1"
+  checksum: 10c0/ec6c75030562fc8f8c727cb8f3b94e75d831fc718785abfc196e1f2a2ebc9a2e38744a15147170039628a853d77a3b695561ce850375ede3a4ee6037a2574567
   languageName: node
   linkType: hard
 
@@ -16666,7 +15346,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest-worker@npm:^29.4.3":
+"jest-worker@npm:^29.4.3, jest-worker@npm:^29.7.0":
   version: 29.7.0
   resolution: "jest-worker@npm:29.7.0"
   dependencies:
@@ -16678,22 +15358,22 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest@npm:30.4.2":
-  version: 30.4.2
-  resolution: "jest@npm:30.4.2"
+"jest@npm:29.7.0":
+  version: 29.7.0
+  resolution: "jest@npm:29.7.0"
   dependencies:
-    "@jest/core": "npm:30.4.2"
-    "@jest/types": "npm:30.4.1"
-    import-local: "npm:^3.2.0"
-    jest-cli: "npm:30.4.2"
+    "@jest/core": "npm:^29.7.0"
+    "@jest/types": "npm:^29.6.3"
+    import-local: "npm:^3.0.2"
+    jest-cli: "npm:^29.7.0"
   peerDependencies:
     node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
   peerDependenciesMeta:
     node-notifier:
       optional: true
   bin:
-    jest: ./bin/jest.js
-  checksum: 10c0/26a76eaabfc043abd8ee702b97f61ff968dde03412efdb4a69c22c99a5e4bf47788a3e45f75134aec1377a686a9d59d1e3bae85a816e409013475a80de1458ec
+    jest: bin/jest.js
+  checksum: 10c0/f40eb8171cf147c617cc6ada49d062fbb03b4da666cb8d39cdbfb739a7d75eea4c3ca150fb072d0d273dce0c753db4d0467d54906ad0293f59c54f9db4a09d8b
   languageName: node
   linkType: hard
 
@@ -16742,13 +15422,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"js-tokens@npm:^10.0.0":
-  version: 10.0.0
-  resolution: "js-tokens@npm:10.0.0"
-  checksum: 10c0/a93498747812ba3e0c8626f95f75ab29319f2a13613a0de9e610700405760931624433a0de59eb7c27ff8836e526768fb20783861b86ef89be96676f2c996b64
-  languageName: node
-  linkType: hard
-
 "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0":
   version: 4.0.0
   resolution: "js-tokens@npm:4.0.0"
@@ -16813,47 +15486,14 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jsdom@npm:29.1.1":
-  version: 29.1.1
-  resolution: "jsdom@npm:29.1.1"
-  dependencies:
-    "@asamuzakjp/css-color": "npm:^5.1.11"
-    "@asamuzakjp/dom-selector": "npm:^7.1.1"
-    "@bramus/specificity": "npm:^2.4.2"
-    "@csstools/css-syntax-patches-for-csstree": "npm:^1.1.3"
-    "@exodus/bytes": "npm:^1.15.0"
-    css-tree: "npm:^3.2.1"
-    data-urls: "npm:^7.0.0"
-    decimal.js: "npm:^10.6.0"
-    html-encoding-sniffer: "npm:^6.0.0"
-    is-potential-custom-element-name: "npm:^1.0.1"
-    lru-cache: "npm:^11.3.5"
-    parse5: "npm:^8.0.1"
-    saxes: "npm:^6.0.0"
-    symbol-tree: "npm:^3.2.4"
-    tough-cookie: "npm:^6.0.1"
-    undici: "npm:^7.25.0"
-    w3c-xmlserializer: "npm:^5.0.0"
-    webidl-conversions: "npm:^8.0.1"
-    whatwg-mimetype: "npm:^5.0.0"
-    whatwg-url: "npm:^16.0.1"
-    xml-name-validator: "npm:^5.0.0"
-  peerDependencies:
-    canvas: ^3.0.0
-  peerDependenciesMeta:
-    canvas:
-      optional: true
-  checksum: 10c0/20e2174b09d9d06393cb48e1392b7a1cb7191d6656a6f7b3b8fbf9853b4ab0ef60b4a42c2c55f71b55ca5da50ffa75bcdc6986210963182e7993c6f9cd4f499b
-  languageName: node
-  linkType: hard
-
-"jsdom@npm:^26.1.0":
-  version: 26.1.0
-  resolution: "jsdom@npm:26.1.0"
+"jsdom@npm:26.0.0":
+  version: 26.0.0
+  resolution: "jsdom@npm:26.0.0"
   dependencies:
     cssstyle: "npm:^4.2.1"
     data-urls: "npm:^5.0.0"
-    decimal.js: "npm:^10.5.0"
+    decimal.js: "npm:^10.4.3"
+    form-data: "npm:^4.0.1"
     html-encoding-sniffer: "npm:^4.0.0"
     http-proxy-agent: "npm:^7.0.2"
     https-proxy-agent: "npm:^7.0.6"
@@ -16863,12 +15503,12 @@ __metadata:
     rrweb-cssom: "npm:^0.8.0"
     saxes: "npm:^6.0.0"
     symbol-tree: "npm:^3.2.4"
-    tough-cookie: "npm:^5.1.1"
+    tough-cookie: "npm:^5.0.0"
     w3c-xmlserializer: "npm:^5.0.0"
     webidl-conversions: "npm:^7.0.0"
     whatwg-encoding: "npm:^3.1.1"
     whatwg-mimetype: "npm:^4.0.0"
-    whatwg-url: "npm:^14.1.1"
+    whatwg-url: "npm:^14.1.0"
     ws: "npm:^8.18.0"
     xml-name-validator: "npm:^5.0.0"
   peerDependencies:
@@ -16876,7 +15516,46 @@ __metadata:
   peerDependenciesMeta:
     canvas:
       optional: true
-  checksum: 10c0/5b14a5bc32ce077a06fb42d1ab95b1191afa5cbbce8859e3b96831c5143becbbcbf0511d4d4934e922d2901443ced2cdc3b734c1cf30b5f73b3e067ce457d0f4
+  checksum: 10c0/e48725ba4027edcfc9bca5799eaec72c6561ecffe3675a8ff87fe9c3541ca4ff9f82b4eff5b3d9c527302da0d859b2f60e9364347a5d42b77f5c76c436c569dc
+  languageName: node
+  linkType: hard
+
+"jsdom@npm:^20.0.0":
+  version: 20.0.3
+  resolution: "jsdom@npm:20.0.3"
+  dependencies:
+    abab: "npm:^2.0.6"
+    acorn: "npm:^8.8.1"
+    acorn-globals: "npm:^7.0.0"
+    cssom: "npm:^0.5.0"
+    cssstyle: "npm:^2.3.0"
+    data-urls: "npm:^3.0.2"
+    decimal.js: "npm:^10.4.2"
+    domexception: "npm:^4.0.0"
+    escodegen: "npm:^2.0.0"
+    form-data: "npm:^4.0.0"
+    html-encoding-sniffer: "npm:^3.0.0"
+    http-proxy-agent: "npm:^5.0.0"
+    https-proxy-agent: "npm:^5.0.1"
+    is-potential-custom-element-name: "npm:^1.0.1"
+    nwsapi: "npm:^2.2.2"
+    parse5: "npm:^7.1.1"
+    saxes: "npm:^6.0.0"
+    symbol-tree: "npm:^3.2.4"
+    tough-cookie: "npm:^4.1.2"
+    w3c-xmlserializer: "npm:^4.0.0"
+    webidl-conversions: "npm:^7.0.0"
+    whatwg-encoding: "npm:^2.0.0"
+    whatwg-mimetype: "npm:^3.0.0"
+    whatwg-url: "npm:^11.0.0"
+    ws: "npm:^8.11.0"
+    xml-name-validator: "npm:^4.0.0"
+  peerDependencies:
+    canvas: ^2.5.0
+  peerDependenciesMeta:
+    canvas:
+      optional: true
+  checksum: 10c0/b109073bb826a966db7828f46cb1d7371abecd30f182b143c52be5fe1ed84513bbbe995eb3d157241681fcd18331381e61e3dc004d4949f3a63bca02f6214902
   languageName: node
   linkType: hard
 
@@ -17449,7 +16128,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1, lru-cache@npm:^11.3.5":
+"lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1":
   version: 11.5.1
   resolution: "lru-cache@npm:11.5.1"
   checksum: 10c0/7b341cea79a8efe9c6a6f20c8757a77eca5b25d7ff983ccf4e11e547b81f6787824baa1c84705251dff84ab4ffac85717ac354b9d02e465f86a9f8b166409979
@@ -17830,13 +16509,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"mdn-data@npm:2.27.1":
-  version: 2.27.1
-  resolution: "mdn-data@npm:2.27.1"
-  checksum: 10c0/eb8abf5d22e4d1e090346f5e81b67d23cef14c83940e445da5c44541ad874dc8fb9f6ca236e8258c3a489d9fb5884188a4d7d58773adb9089ac2c0b966796393
-  languageName: node
-  linkType: hard
-
 "media-typer@npm:0.3.0":
   version: 0.3.0
   resolution: "media-typer@npm:0.3.0"
@@ -18414,7 +17086,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"micromatch@npm:^4.0.0, micromatch@npm:^4.0.2, micromatch@npm:^4.0.5, micromatch@npm:^4.0.8":
+"micromatch@npm:^4.0.0, micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5, micromatch@npm:^4.0.8":
   version: 4.0.8
   resolution: "micromatch@npm:4.0.8"
   dependencies:
@@ -18454,7 +17126,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:~2.1.17, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34":
+"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.35, mime-types@npm:~2.1.17, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34":
   version: 2.1.35
   resolution: "mime-types@npm:2.1.35"
   dependencies:
@@ -19156,7 +17828,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"nwsapi@npm:^2.2.16":
+"nwsapi@npm:^2.2.16, nwsapi@npm:^2.2.2":
   version: 2.2.24
   resolution: "nwsapi@npm:2.2.24"
   checksum: 10c0/9bc04ee9c7698f1b5506778d36f7382962f71667205d441d6a50f6180ee92328e770b76be78b907817ee103241b29984d3a17ae387e4723aebe0aeaed7a7c3a1
@@ -19266,13 +17938,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"obug@npm:^2.1.1":
-  version: 2.1.3
-  resolution: "obug@npm:2.1.3"
-  checksum: 10c0/cb8187fed0a5fc8445507c950e89f3c1bd43895658c398b5803f6b7804dfa0c562975ecce1e67f3d9247d521452a5bfade9e0e951cc0326b7444272f7c24d25f
-  languageName: node
-  linkType: hard
-
 "on-finished@npm:^2.4.1, on-finished@npm:~2.4.1":
   version: 2.4.1
   resolution: "on-finished@npm:2.4.1"
@@ -19656,7 +18321,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"parse5@npm:^7.0.0, parse5@npm:^7.1.2, parse5@npm:^7.2.1, parse5@npm:^7.3.0":
+"parse5@npm:^7.0.0, parse5@npm:^7.1.1, parse5@npm:^7.1.2, parse5@npm:^7.2.1, parse5@npm:^7.3.0":
   version: 7.3.0
   resolution: "parse5@npm:7.3.0"
   dependencies:
@@ -19665,15 +18330,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"parse5@npm:^8.0.0, parse5@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "parse5@npm:8.0.1"
-  dependencies:
-    entities: "npm:^8.0.0"
-  checksum: 10c0/c3c1c5aab55f6e4be5245599790e56e64be7764a4a0edd7f98db4fe3bb380f63add752fa047dff0496446c25f4104f0c7c1967723de640bde92306a7bb67ed2f
-  languageName: node
-  linkType: hard
-
 "parseurl@npm:^1.3.3, parseurl@npm:~1.3.2, parseurl@npm:~1.3.3":
   version: 1.3.3
   resolution: "parseurl@npm:1.3.3"
@@ -19855,13 +18511,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"picomatch@npm:^4.0.3":
-  version: 4.0.5
-  resolution: "picomatch@npm:4.0.5"
-  checksum: 10c0/947bc6b6e1ff1e6c5aaf95b107a0839d12802f4f7b867663f67d47accba939ca1cb582cf99dfc30438efa1c4648ac5990967e783e8929c36b03e8440704ef1bd
-  languageName: node
-  linkType: hard
-
 "pidtree@npm:^0.3.0":
   version: 0.3.1
   resolution: "pidtree@npm:0.3.1"
@@ -19878,7 +18527,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"pirates@npm:^4.0.7":
+"pirates@npm:^4.0.4":
   version: 4.0.7
   resolution: "pirates@npm:4.0.7"
   checksum: 10c0/a51f108dd811beb779d58a76864bbd49e239fa40c7984cd11596c75a121a8cc789f1c8971d8bb15f0dbf9d48b76c05bb62fcbce840f89b688c0fa64b37e8478a
@@ -20842,18 +19491,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"pretty-format@npm:30.4.1, pretty-format@npm:^30.0.0":
-  version: 30.4.1
-  resolution: "pretty-format@npm:30.4.1"
-  dependencies:
-    "@jest/schemas": "npm:30.4.1"
-    ansi-styles: "npm:^5.2.0"
-    react-is-18: "npm:react-is@^18.3.1"
-    react-is-19: "npm:react-is@^19.2.5"
-  checksum: 10c0/c7e6633740cd2f6d382f188c00c8b4b3f2bee3cda16db6753471c6bb4b94f76531358d3a7793062a0fb00d72ebfb934e8ae1d4f5ced6bb34c8e7f60996f90076
-  languageName: node
-  linkType: hard
-
 "pretty-format@npm:^27.0.2":
   version: 27.5.1
   resolution: "pretty-format@npm:27.5.1"
@@ -20865,6 +19502,17 @@ __metadata:
   languageName: node
   linkType: hard
 
+"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0":
+  version: 29.7.0
+  resolution: "pretty-format@npm:29.7.0"
+  dependencies:
+    "@jest/schemas": "npm:^29.6.3"
+    ansi-styles: "npm:^5.0.0"
+    react-is: "npm:^18.0.0"
+  checksum: 10c0/edc5ff89f51916f036c62ed433506b55446ff739358de77207e63e88a28ca2894caac6e73dcb68166a606e51c8087d32d400473e6a9fdd2dbe743f46c9c0276f
+  languageName: node
+  linkType: hard
+
 "pretty-ms@npm:^9.2.0":
   version: 9.3.0
   resolution: "pretty-ms@npm:9.3.0"
@@ -20971,7 +19619,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"prompts@npm:^2.4.2":
+"prompts@npm:^2.0.1, prompts@npm:^2.4.2":
   version: 2.4.2
   resolution: "prompts@npm:2.4.2"
   dependencies:
@@ -21044,7 +19692,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"psl@npm:^1.1.7":
+"psl@npm:^1.1.33, psl@npm:^1.1.7":
   version: 1.15.0
   resolution: "psl@npm:1.15.0"
   dependencies:
@@ -21053,7 +19701,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"punycode@npm:2.3.1, punycode@npm:^2.1.0, punycode@npm:^2.3.1":
+"punycode@npm:2.3.1, punycode@npm:^2.1.0, punycode@npm:^2.1.1, punycode@npm:^2.3.1":
   version: 2.3.1
   resolution: "punycode@npm:2.3.1"
   checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9
@@ -21076,10 +19724,10 @@ __metadata:
   languageName: node
   linkType: hard
 
-"pure-rand@npm:^7.0.0":
-  version: 7.0.1
-  resolution: "pure-rand@npm:7.0.1"
-  checksum: 10c0/9cade41030f5ec95f5d55a11a71404cd6f46b69becaad892097cd7f58e2c6248cd0a933349ca7d21336ab629f1da42ffe899699b671bc4651600eaf6e57f837e
+"pure-rand@npm:^6.0.0":
+  version: 6.1.0
+  resolution: "pure-rand@npm:6.1.0"
+  checksum: 10c0/1abe217897bf74dcb3a0c9aba3555fe975023147b48db540aa2faf507aee91c03bf54f6aef0eb2bf59cc259a16d06b28eca37f0dc426d94f4692aeff02fb0e65
   languageName: node
   linkType: hard
 
@@ -21126,6 +19774,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"querystringify@npm:^2.1.1":
+  version: 2.2.0
+  resolution: "querystringify@npm:2.2.0"
+  checksum: 10c0/3258bc3dbdf322ff2663619afe5947c7926a6ef5fb78ad7d384602974c467fadfc8272af44f5eb8cddd0d011aae8fabf3a929a8eee4b86edcc0a21e6bd10f9aa
+  languageName: node
+  linkType: hard
+
 "queue-microtask@npm:^1.2.2":
   version: 1.2.3
   resolution: "queue-microtask@npm:1.2.3"
@@ -21298,14 +19953,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"react-is-18@npm:react-is@^18.3.1":
-  version: 18.3.1
-  resolution: "react-is@npm:18.3.1"
-  checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072
-  languageName: node
-  linkType: hard
-
-"react-is-19@npm:react-is@^19.2.5, react-is@npm:19.2.7":
+"react-is@npm:19.2.7":
   version: 19.2.7
   resolution: "react-is@npm:19.2.7"
   checksum: 10c0/419fe54d5bd7fdf5414a5bb7bd9a1e0e36f9fae28ffb4cb73290fbe342bde15d8584a90d1db62547f6aa03018dce517b178a041abb522136cd4b4b51b4e94c83
@@ -21326,6 +19974,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"react-is@npm:^18.0.0":
+  version: 18.3.1
+  resolution: "react-is@npm:18.3.1"
+  checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072
+  languageName: node
+  linkType: hard
+
 "react-json-pretty@npm:2.2.0":
   version: 2.2.0
   resolution: "react-json-pretty@npm:2.2.0"
@@ -22072,6 +20727,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"resolve.exports@npm:^2.0.0":
+  version: 2.0.3
+  resolution: "resolve.exports@npm:2.0.3"
+  checksum: 10c0/1ade1493f4642a6267d0a5e68faeac20b3d220f18c28b140343feb83694d8fed7a286852aef43689d16042c61e2ddb270be6578ad4a13990769e12065191200d
+  languageName: node
+  linkType: hard
+
 "resolve@npm:1.22.12, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.20.0, resolve@npm:^1.22.11, resolve@npm:^1.22.4":
   version: 1.22.12
   resolution: "resolve@npm:1.22.12"
@@ -22512,15 +21174,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"semver@npm:7.7.1":
-  version: 7.7.1
-  resolution: "semver@npm:7.7.1"
-  bin:
-    semver: bin/semver.js
-  checksum: 10c0/fd603a6fb9c399c6054015433051bdbe7b99a940a8fb44b85c2b524c4004b023d7928d47cb22154f8d054ea7ee8597f586605e05b52047f048278e4ac56ae958
-  languageName: node
-  linkType: hard
-
 "semver@npm:7.7.3":
   version: 7.7.3
   resolution: "semver@npm:7.7.3"
@@ -22539,7 +21192,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"semver@npm:^6.3.1":
+"semver@npm:^6.3.0, semver@npm:^6.3.1":
   version: 6.3.1
   resolution: "semver@npm:6.3.1"
   bin:
@@ -22548,7 +21201,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"semver@npm:^7.7.1, semver@npm:^7.7.2, semver@npm:^7.8.2":
+"semver@npm:^7.7.1, semver@npm:^7.8.2":
   version: 7.8.5
   resolution: "semver@npm:7.8.5"
   bin:
@@ -22894,7 +21547,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3":
+"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7":
   version: 3.0.7
   resolution: "signal-exit@npm:3.0.7"
   checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912
@@ -23136,7 +21789,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"source-map@npm:^0.6.0, source-map@npm:~0.6.0, source-map@npm:~0.6.1":
+"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1":
   version: 0.6.1
   resolution: "source-map@npm:0.6.1"
   checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011
@@ -23276,7 +21929,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"stack-utils@npm:^2.0.6":
+"stack-utils@npm:^2.0.3":
   version: 2.0.6
   resolution: "stack-utils@npm:2.0.6"
   dependencies:
@@ -23406,7 +22059,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"string-length@npm:^4.0.2":
+"string-length@npm:^4.0.1":
   version: 4.0.2
   resolution: "string-length@npm:4.0.2"
   dependencies:
@@ -23781,7 +22434,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"supports-color@npm:^8.0.0, supports-color@npm:^8.1.1":
+"supports-color@npm:^8.0.0":
   version: 8.1.1
   resolution: "supports-color@npm:8.1.1"
   dependencies:
@@ -23846,7 +22499,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"synckit@npm:^0.11.13, synckit@npm:^0.11.8":
+"synckit@npm:^0.11.13":
   version: 0.11.13
   resolution: "synckit@npm:0.11.13"
   dependencies:
@@ -24091,13 +22744,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"tldts-core@npm:^7.0.19":
-  version: 7.0.19
-  resolution: "tldts-core@npm:7.0.19"
-  checksum: 10c0/8f9fa5838aa7b3adbe80a6588ad802019f21faef34e04aa1aeab3a20275bba5e22c60b66a6b3bdd830b0bd6a2d57b92e0605c3cdb2c6317f111e586fa2f37927
-  languageName: node
-  linkType: hard
-
 "tldts@npm:^6.1.32":
   version: 6.1.86
   resolution: "tldts@npm:6.1.86"
@@ -24109,17 +22755,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"tldts@npm:^7.0.5":
-  version: 7.0.19
-  resolution: "tldts@npm:7.0.19"
-  dependencies:
-    tldts-core: "npm:^7.0.19"
-  bin:
-    tldts: bin/cli.js
-  checksum: 10c0/d77d2fe6f8ec07e27248cd6647b91fc814dfc82e15dce104277f317d861576908409f6549ff46e21277677f823a037f57b7a748ada7d0fcdcb08535890f71050
-  languageName: node
-  linkType: hard
-
 "tmpl@npm:1.0.5":
   version: 1.0.5
   resolution: "tmpl@npm:1.0.5"
@@ -24208,7 +22843,19 @@ __metadata:
   languageName: node
   linkType: hard
 
-"tough-cookie@npm:^5.1.1":
+"tough-cookie@npm:^4.1.2":
+  version: 4.1.4
+  resolution: "tough-cookie@npm:4.1.4"
+  dependencies:
+    psl: "npm:^1.1.33"
+    punycode: "npm:^2.1.1"
+    universalify: "npm:^0.2.0"
+    url-parse: "npm:^1.5.3"
+  checksum: 10c0/aca7ff96054f367d53d1e813e62ceb7dd2eda25d7752058a74d64b7266fd07be75908f3753a32ccf866a2f997604b414cfb1916d6e7f69bc64d9d9939b0d6c45
+  languageName: node
+  linkType: hard
+
+"tough-cookie@npm:^5.0.0":
   version: 5.1.2
   resolution: "tough-cookie@npm:5.1.2"
   dependencies:
@@ -24217,12 +22864,12 @@ __metadata:
   languageName: node
   linkType: hard
 
-"tough-cookie@npm:^6.0.1":
-  version: 6.0.1
-  resolution: "tough-cookie@npm:6.0.1"
+"tr46@npm:^3.0.0":
+  version: 3.0.0
+  resolution: "tr46@npm:3.0.0"
   dependencies:
-    tldts: "npm:^7.0.5"
-  checksum: 10c0/ec70bd6b1215efe4ed31a158f0be3e4c9088fcbd8620edc23a5860d4f3d85c757b77e274baaa700f7b25e409f4181552ed189603c2b2e1a9f88104da3a61a37d
+    punycode: "npm:^2.1.1"
+  checksum: 10c0/cdc47cad3a9d0b6cb293e39ccb1066695ae6fdd39b9e4f351b010835a1f8b4f3a6dc3a55e896b421371187f22b48d7dac1b693de4f6551bdef7b6ab6735dfe3b
   languageName: node
   linkType: hard
 
@@ -24235,15 +22882,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"tr46@npm:^6.0.0":
-  version: 6.0.0
-  resolution: "tr46@npm:6.0.0"
-  dependencies:
-    punycode: "npm:^2.3.1"
-  checksum: 10c0/83130df2f649228aa91c17754b66248030a3af34911d713b5ea417066fa338aa4bc8668d06bd98aa21a2210f43fc0a3db8b9099e7747fb5830e40e39a6a1058e
-  languageName: node
-  linkType: hard
-
 "tr46@npm:~0.0.3":
   version: 0.0.3
   resolution: "tr46@npm:0.0.3"
@@ -24631,13 +23269,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"undici-types@npm:^7.21.0":
-  version: 7.28.0
-  resolution: "undici-types@npm:7.28.0"
-  checksum: 10c0/e1230791cfbaf7fc88a4ebb5282423886a2fb325572234437a3e9c9f7dff970bebe12d5672d6d23a3584119d6d43f8222d06531ed749d8ddeb3551f004fca55d
-  languageName: node
-  linkType: hard
-
 "undici-types@npm:~7.10.0":
   version: 7.10.0
   resolution: "undici-types@npm:7.10.0"
@@ -24659,7 +23290,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"undici@npm:^7.19.0, undici@npm:^7.25.0, undici@npm:^7.27.2":
+"undici@npm:^7.19.0, undici@npm:^7.27.2":
   version: 7.28.0
   resolution: "undici@npm:7.28.0"
   checksum: 10c0/fe781983a26098795e99bb1f64906cbb7d0bcaa029a26baade007b53ea67f2631d189b8f9671a31f4c8d0cb3773b7559608628ba54452fef51fec90e7c78bb0d
@@ -24831,6 +23462,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"universalify@npm:^0.2.0":
+  version: 0.2.0
+  resolution: "universalify@npm:0.2.0"
+  checksum: 10c0/cedbe4d4ca3967edf24c0800cfc161c5a15e240dac28e3ce575c689abc11f2c81ccc6532c8752af3b40f9120fb5e454abecd359e164f4f6aa44c29cd37e194fe
+  languageName: node
+  linkType: hard
+
 "universalify@npm:^2.0.0":
   version: 2.0.1
   resolution: "universalify@npm:2.0.1"
@@ -24990,6 +23628,16 @@ __metadata:
   languageName: node
   linkType: hard
 
+"url-parse@npm:^1.5.3":
+  version: 1.5.10
+  resolution: "url-parse@npm:1.5.10"
+  dependencies:
+    querystringify: "npm:^2.1.1"
+    requires-port: "npm:^1.0.0"
+  checksum: 10c0/bd5aa9389f896974beb851c112f63b466505a04b4807cea2e5a3b7092f6fbb75316f0491ea84e44f66fed55f1b440df5195d7e3a8203f64fcefa19d182f5be87
+  languageName: node
+  linkType: hard
+
 "url@npm:0.11.4":
   version: 0.11.4
   resolution: "url@npm:0.11.4"
@@ -25243,6 +23891,15 @@ __metadata:
   languageName: node
   linkType: hard
 
+"w3c-xmlserializer@npm:^4.0.0":
+  version: 4.0.0
+  resolution: "w3c-xmlserializer@npm:4.0.0"
+  dependencies:
+    xml-name-validator: "npm:^4.0.0"
+  checksum: 10c0/02cc66d6efc590bd630086cd88252444120f5feec5c4043932b0d0f74f8b060512f79dc77eb093a7ad04b4f02f39da79ce4af47ceb600f2bf9eacdc83204b1a8
+  languageName: node
+  linkType: hard
+
 "w3c-xmlserializer@npm:^5.0.0":
   version: 5.0.0
   resolution: "w3c-xmlserializer@npm:5.0.0"
@@ -25333,13 +23990,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"webidl-conversions@npm:^8.0.1":
-  version: 8.0.1
-  resolution: "webidl-conversions@npm:8.0.1"
-  checksum: 10c0/3f6f327ca5fa0c065ed8ed0ef3b72f33623376e68f958e9b7bd0df49fdb0b908139ac2338d19fb45bd0e05595bda96cb6d1622222a8b413daa38a17aacc4dd46
-  languageName: node
-  linkType: hard
-
 "webpack-bundle-analyzer@npm:^4.10.2":
   version: 4.10.2
   resolution: "webpack-bundle-analyzer@npm:4.10.2"
@@ -25565,6 +24215,15 @@ __metadata:
   languageName: node
   linkType: hard
 
+"whatwg-encoding@npm:^2.0.0":
+  version: 2.0.0
+  resolution: "whatwg-encoding@npm:2.0.0"
+  dependencies:
+    iconv-lite: "npm:0.6.3"
+  checksum: 10c0/91b90a49f312dc751496fd23a7e68981e62f33afe938b97281ad766235c4872fc4e66319f925c5e9001502b3040dd25a33b02a9c693b73a4cbbfdc4ad10c3e3e
+  languageName: node
+  linkType: hard
+
 "whatwg-encoding@npm:^3.1.1":
   version: 3.1.1
   resolution: "whatwg-encoding@npm:3.1.1"
@@ -25574,6 +24233,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"whatwg-mimetype@npm:^3.0.0":
+  version: 3.0.0
+  resolution: "whatwg-mimetype@npm:3.0.0"
+  checksum: 10c0/323895a1cda29a5fb0b9ca82831d2c316309fede0365047c4c323073e3239067a304a09a1f4b123b9532641ab604203f33a1403b5ca6a62ef405bcd7a204080f
+  languageName: node
+  linkType: hard
+
 "whatwg-mimetype@npm:^4.0.0":
   version: 4.0.0
   resolution: "whatwg-mimetype@npm:4.0.0"
@@ -25581,14 +24247,17 @@ __metadata:
   languageName: node
   linkType: hard
 
-"whatwg-mimetype@npm:^5.0.0":
-  version: 5.0.0
-  resolution: "whatwg-mimetype@npm:5.0.0"
-  checksum: 10c0/eead164fe73a00dd82f817af6fc0bd22e9c273e1d55bf4bc6bdf2da7ad8127fca82ef00ea6a37892f5f5641f8e34128e09508f92126086baba126b9e0d57feb4
+"whatwg-url@npm:^11.0.0":
+  version: 11.0.0
+  resolution: "whatwg-url@npm:11.0.0"
+  dependencies:
+    tr46: "npm:^3.0.0"
+    webidl-conversions: "npm:^7.0.0"
+  checksum: 10c0/f7ec264976d7c725e0696fcaf9ebe056e14422eacbf92fdbb4462034609cba7d0c85ffa1aab05e9309d42969bcf04632ba5ed3f3882c516d7b093053315bf4c1
   languageName: node
   linkType: hard
 
-"whatwg-url@npm:^14.0.0, whatwg-url@npm:^14.1.1":
+"whatwg-url@npm:^14.0.0, whatwg-url@npm:^14.1.0":
   version: 14.2.0
   resolution: "whatwg-url@npm:14.2.0"
   dependencies:
@@ -25598,17 +24267,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"whatwg-url@npm:^16.0.0, whatwg-url@npm:^16.0.1":
-  version: 16.0.1
-  resolution: "whatwg-url@npm:16.0.1"
-  dependencies:
-    "@exodus/bytes": "npm:^1.11.0"
-    tr46: "npm:^6.0.0"
-    webidl-conversions: "npm:^8.0.1"
-  checksum: 10c0/e75565566abf3a2cdbd9f06c965dbcccee6ec4e9f0d3728ad5e08ceb9944279848bcaa211d35a29cb6d2df1e467dd05cfb59fbddf8a0adcd7d0bce9ffb703fd2
-  languageName: node
-  linkType: hard
-
 "whatwg-url@npm:^5.0.0":
   version: 5.0.0
   resolution: "whatwg-url@npm:5.0.0"
@@ -25821,7 +24479,17 @@ __metadata:
   languageName: node
   linkType: hard
 
-"write-file-atomic@npm:^5.0.0, write-file-atomic@npm:^5.0.1":
+"write-file-atomic@npm:^4.0.2":
+  version: 4.0.2
+  resolution: "write-file-atomic@npm:4.0.2"
+  dependencies:
+    imurmurhash: "npm:^0.1.4"
+    signal-exit: "npm:^3.0.7"
+  checksum: 10c0/a2c282c95ef5d8e1c27b335ae897b5eca00e85590d92a3fd69a437919b7b93ff36a69ea04145da55829d2164e724bc62202cdb5f4b208b425aba0807889375c7
+  languageName: node
+  linkType: hard
+
+"write-file-atomic@npm:^5.0.0":
   version: 5.0.1
   resolution: "write-file-atomic@npm:5.0.1"
   dependencies:
@@ -25846,6 +24514,21 @@ __metadata:
   languageName: node
   linkType: hard
 
+"ws@npm:^8.11.0":
+  version: 8.21.0
+  resolution: "ws@npm:8.21.0"
+  peerDependencies:
+    bufferutil: ^4.0.1
+    utf-8-validate: ">=5.0.2"
+  peerDependenciesMeta:
+    bufferutil:
+      optional: true
+    utf-8-validate:
+      optional: true
+  checksum: 10c0/ef4a243476283fc49bc7550966c4af4aa0eef56273837211e700de3b664e08604a760cdddcb5ba43c049140e74ccfec5b0ee0bb439e08c2adf9138902fdde5f9
+  languageName: node
+  linkType: hard
+
 "ws@npm:^8.18.0":
   version: 8.18.3
   resolution: "ws@npm:8.18.3"
@@ -25898,6 +24581,13 @@ __metadata:
   languageName: node
   linkType: hard
 
+"xml-name-validator@npm:^4.0.0":
+  version: 4.0.0
+  resolution: "xml-name-validator@npm:4.0.0"
+  checksum: 10c0/c1bfa219d64e56fee265b2bd31b2fcecefc063ee802da1e73bad1f21d7afd89b943c9e2c97af2942f60b1ad46f915a4c81e00039c7d398b53cf410e29d3c30bd
+  languageName: node
+  linkType: hard
+
 "xml-name-validator@npm:^5.0.0":
   version: 5.0.0
   resolution: "xml-name-validator@npm:5.0.0"
@@ -25970,7 +24660,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"yargs@npm:17.7.3":
+"yargs@npm:17.7.3, yargs@npm:^17.3.1":
   version: 17.7.3
   resolution: "yargs@npm:17.7.3"
   dependencies:
@@ -25999,21 +24689,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"yargs@npm:^17.7.2":
-  version: 17.7.2
-  resolution: "yargs@npm:17.7.2"
-  dependencies:
-    cliui: "npm:^8.0.1"
-    escalade: "npm:^3.1.1"
-    get-caller-file: "npm:^2.0.5"
-    require-directory: "npm:^2.1.1"
-    string-width: "npm:^4.2.3"
-    y18n: "npm:^5.0.5"
-    yargs-parser: "npm:^21.1.1"
-  checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05
-  languageName: node
-  linkType: hard
-
 "yocto-queue@npm:^0.1.0":
   version: 0.1.0
   resolution: "yocto-queue@npm:0.1.0"

From c8e53400cb3bfdac8434bab1dd61a0d7783abec6 Mon Sep 17 00:00:00 2001
From: Piyal Basu 
Date: Tue, 7 Jul 2026 14:42:18 -0400
Subject: [PATCH 3/3] chore(deps): pin @amplitude/* to exact versions

Dependabot left the two @amplitude packages on caret ranges while every
other dependency in the repo is pinned exact. Pin them to the resolved,
tested versions (analytics-browser 2.44.4, experiment-js-client 1.21.2)
so installs are reproducible and can't silently float.

Co-Authored-By: Claude Opus 4.8 (1M context) 
---
 extension/package.json | 4 ++--
 yarn.lock              | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/extension/package.json b/extension/package.json
index 4e7e2ce46c..e1f6d73013 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -15,8 +15,8 @@
     "test:e2e": "playwright test"
   },
   "dependencies": {
-    "@amplitude/analytics-browser": "^2.44.3",
-    "@amplitude/experiment-js-client": "^1.21.1",
+    "@amplitude/analytics-browser": "2.44.4",
+    "@amplitude/experiment-js-client": "1.21.2",
     "@ledgerhq/hw-app-str": "7.7.4",
     "@ledgerhq/hw-transport-webhid": "6.35.4",
     "@radix-ui/react-dialog": "1.1.16",
diff --git a/yarn.lock b/yarn.lock
index 33976a5658..6a7c1f9922 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -285,7 +285,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@amplitude/analytics-browser@npm:^2.44.3":
+"@amplitude/analytics-browser@npm:2.44.4":
   version: 2.44.4
   resolution: "@amplitude/analytics-browser@npm:2.44.4"
   dependencies:
@@ -340,7 +340,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@amplitude/experiment-js-client@npm:^1.21.1":
+"@amplitude/experiment-js-client@npm:1.21.2":
   version: 1.21.2
   resolution: "@amplitude/experiment-js-client@npm:1.21.2"
   dependencies:
@@ -12072,8 +12072,8 @@ __metadata:
   version: 0.0.0-use.local
   resolution: "extension@workspace:extension"
   dependencies:
-    "@amplitude/analytics-browser": "npm:^2.44.3"
-    "@amplitude/experiment-js-client": "npm:^1.21.1"
+    "@amplitude/analytics-browser": "npm:2.44.4"
+    "@amplitude/experiment-js-client": "npm:1.21.2"
     "@lavamoat/allow-scripts": "npm:5.1.0"
     "@ledgerhq/hw-app-str": "npm:7.7.4"
     "@ledgerhq/hw-transport-webhid": "npm:6.35.4"