diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..fb7ea14 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,34 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + env: { node: true, browser: true, es2020: true }, + plugins: ['@typescript-eslint'], + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], + ignorePatterns: [ + 'node_modules/', + '**/dist/', + 'build/', + 'coverage/', + '**/*.map', + '**/*.html', + 'server/src/qrcode.js', // vendored QR generator (third-party) + 'clients/tabby/assets/', // generated web-client asset + ], + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-this-alias': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': ['error', { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }], + }, + overrides: [ + // Ambient type shims mirror the host API and legitimately carry unused type params. + { files: ['**/*.d.ts'], rules: { '@typescript-eslint/no-unused-vars': 'off' } }, + ], +} diff --git a/.github/keys/peershell_release.pub b/.github/keys/peershell_release.pub new file mode 100644 index 0000000..47420af --- /dev/null +++ b/.github/keys/peershell_release.pub @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE58hHI/hgG1Hs4xxQPr/EMCFXKlPq +O9wMvIYPCFHqu+f66BKJ6VQEpnjQj+2q2Axk6PcvvDuhGktlAx/qHEqnRQ== +-----END PUBLIC KEY----- diff --git a/.github/scripts/release-policy.sh b/.github/scripts/release-policy.sh new file mode 100755 index 0000000..90dacdf --- /dev/null +++ b/.github/scripts/release-policy.sh @@ -0,0 +1,156 @@ +#!/usr/bin/env bash +# Shared release-gate helpers. Sourced by the release workflows. On write-credentialed +# jobs it is sourced from origin/main (the trusted base), never from the pushed tag tree. + +RELEASE_TAG_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' +# Unprotected trigger tag that starts a release. It deliberately does NOT match the +# protected v*.*.* ruleset, so it can be created/deleted freely; the real vX.Y.Z tag +# is created once on the squash commit by post-merge-release. +PR_TAG_REGEX='^pr-v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' + +# Workspace package.json files kept in lockstep (the "hybrid version-file"). The root +# package.json stays private at 0.0.0 and is NOT bumped. clients/tabby is canonical +# (the primary published artifact, tabby-peershell). +WORKSPACE_PKGS=(shared/package.json clients/web/package.json clients/tabby/package.json server/package.json) +CANONICAL_PKG='clients/tabby/package.json' + +die() { + echo "::error::$*" >&2 + exit 1 +} + +notice() { + echo "::notice::$*" +} + +is_release_tag() { + [[ "${1:-}" =~ ${RELEASE_TAG_REGEX} ]] +} + +validate_release_tag() { + local tag="${1:-}" + if ! is_release_tag "${tag}"; then + die "Invalid release tag '${tag}'. Allowed formats are vX.Y.Z and vX.Y.Z-." + fi +} + +# Any prerelease suffix (-rc1, -beta1, ...) marks a prerelease. +is_beta_tag() { + [[ "${1:-}" == *-* ]] +} + +is_pr_tag() { + [[ "${1:-}" =~ ${PR_TAG_REGEX} ]] +} + +# pr-vX.Y.Z -> vX.Y.Z (the release tag that will be CREATED at merge). +release_tag_from_pr_tag() { + local pr_tag="${1:-}" + if ! is_pr_tag "${pr_tag}"; then + die "Invalid trigger tag '${pr_tag}'. Expected pr-vX.Y.Z or pr-vX.Y.Z-." + fi + printf '%s\n' "${pr_tag#pr-}" +} + +version_from_tag() { + local tag="${1:-}" + validate_release_tag "${tag}" + printf '%s\n' "${tag#v}" +} + +# Read the canonical workspace version at a git ref (via node, always present). +version_at_ref() { + local ref="${1:-}" + git show "${ref}:${CANONICAL_PKG}" \ + | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>process.stdout.write(String(JSON.parse(s).version)))' +} + +# Rewrite .version in each workspace package.json (2-space indent + trailing newline). +set_version() { + local version="${1:-}" + local pkg + for pkg in "${WORKSPACE_PKGS[@]}"; do + node -e ' + const fs = require("fs"); + const [file, version] = process.argv.slice(1); + const j = JSON.parse(fs.readFileSync(file, "utf8")); + j.version = version; + fs.writeFileSync(file, JSON.stringify(j, null, 2) + "\n"); + ' "${pkg}" "${version}" + done +} + +# Assert every workspace version at equals the tag version (the lockstep invariant). +assert_versions_match_tag() { + local ref="${1:-}" + local tag="${2:-}" + local expected pkg actual + expected="$(version_from_tag "${tag}")" + for pkg in "${WORKSPACE_PKGS[@]}"; do + actual="$(git show "${ref}:${pkg}" \ + | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>process.stdout.write(String(JSON.parse(s).version)))')" + if [[ "${actual}" != "${expected}" ]]; then + die "${pkg} version '${actual}' does not match tag '${tag}' (expected '${expected}')." + fi + done +} + +extract_pr_marker() { + local marker="${1:-}" + PR_MARKER="${marker}" node -e ' + const body = process.env.PR_BODY || ""; + const marker = process.env.PR_MARKER.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + const re = new RegExp("^$", "m"); + const m = body.match(re); + if (!m) { process.exit(1); } + process.stdout.write(m[1].trim()); + ' +} + +delete_remote_tag() { + local tag="${1:-}" + git push origin ":refs/tags/${tag}" || \ + echo "::warning::Failed to delete tag ${tag} (non-fatal); it may need manual cleanup before this version can be re-released." +} + +# Existence probes that DISTINGUISH absent from error (fail closed on error). Echo: present|absent|error. +remote_tag_state() { + local tag="${1:-}" + local rc=0 + git ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1 || rc=$? + case "${rc}" in + 0) echo "present" ;; + 2) echo "absent" ;; + *) echo "error" ;; + esac +} + +remote_release_state() { + local tag="${1:-}" + local out + local rc=0 + out="$(gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${tag}" 2>&1)" || rc=$? + if [[ "${rc}" -eq 0 ]]; then + echo "present" + elif printf '%s' "${out}" | grep -qi 'HTTP 404\|Not Found'; then + echo "absent" + else + echo "error" + fi +} + +assert_release_tag_absent() { + local tag="${1:-}" + case "$(remote_tag_state "${tag}")" in + present) die "Tag ${tag} already exists and is immutable." ;; + error) die "Could not determine whether tag ${tag} exists (git ls-remote failed); aborting." ;; + esac +} + +assert_release_absent() { + local tag="${1:-}" + case "$(remote_release_state "${tag}")" in + present) die "Release ${tag} already exists." ;; + error) die "Could not determine whether release ${tag} exists (gh api failed); aborting." ;; + esac +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4b5321e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + pull_request: + branches: + - main + - dev + push: + branches: + - dev + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + ci: + name: ci + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install + run: npm ci || npm install + + - name: Lint + run: npm run lint + + - name: Build all (also typechecks every workspace) + run: npm run build:all + + - name: Test + run: npm test + + - name: Smoke + run: npm run test:smoke + + - name: Version lockstep + run: node scripts/check-version-lockstep.mjs + + - name: Dependency audit (advisory) + run: npm audit --audit-level=high || true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..b5ee678 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: CodeQL + +# Static security analysis. On a PRIVATE repo, code scanning requires GitHub Advanced +# Security; without it the analyze step fails, so this workflow is NOT a required check +# (it runs best-effort). Make it required once the repo is public or GHAS is enabled. +on: + push: + branches: + - dev + - main + pull_request: + branches: + - dev + - main + schedule: + - cron: "30 4 * * 1" + +permissions: + contents: read + security-events: write + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: true + +jobs: + codeql: + name: codeql + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript-typescript + + - name: Analyze + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/post-merge-release.yml b/.github/workflows/post-merge-release.yml new file mode 100644 index 0000000..1282fa1 --- /dev/null +++ b/.github/workflows/post-merge-release.yml @@ -0,0 +1,109 @@ +name: Post Merge Release + +on: + pull_request: + branches: + - main + types: + - closed + +permissions: + contents: write + pull-requests: read + +concurrency: + group: post-merge-release + cancel-in-progress: false + +env: + GH_TOKEN: ${{ secrets.PEERSHELL_RELEASE_BOT_TOKEN || github.token }} + GITHUB_TOKEN: ${{ secrets.PEERSHELL_RELEASE_BOT_TOKEN || github.token }} + +jobs: + finalize-release: + name: finalize-release + if: > + github.event.pull_request.merged == true && + github.event.pull_request.base.ref == 'main' && + github.event.pull_request.head.ref == 'dev' && + github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + fetch-depth: 0 + token: ${{ secrets.PEERSHELL_RELEASE_BOT_TOKEN || github.token }} + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Finalize release + shell: bash + env: + MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + PR_BODY: ${{ github.event.pull_request.body }} + run: | + set -euo pipefail + source .github/scripts/release-policy.sh + + HAS_RELEASE_MARKER="false" + TAG="" + + if TAG="$(extract_pr_marker release-tag)"; then + HAS_RELEASE_MARKER="true" + validate_release_tag "${TAG}" + else + notice "No release marker found; syncing dev to the squash commit without publishing a release." + fi + + git fetch --force origin dev main + + MAIN_SHA="$(git rev-parse origin/main)" + DEV_SHA="$(git rev-parse origin/dev)" + + [[ "${MERGE_SHA}" == "${MAIN_SHA}" ]] || die "main (${MAIN_SHA}) does not point to the PR merge commit (${MERGE_SHA})." + + PARENT_COUNT="$(git show -s --format=%P "${MERGE_SHA}" | wc -w | tr -d ' ')" + [[ "${PARENT_COUNT}" == "1" ]] || die "The PR was not squash-merged; refusing to create a release." + + # The squash commit on main must capture EXACTLY the current dev tree (compare + # trees, so review fix commits are fine as long as content equals dev). + MERGE_TREE="$(git rev-parse "${MERGE_SHA}^{tree}")" + DEV_TREE="$(git rev-parse "origin/dev^{tree}")" + [[ "${MERGE_TREE}" == "${DEV_TREE}" ]] || die "origin/dev content differs from the merged release; refusing to overwrite dev. Reconcile dev with main manually." + + if [[ "${HAS_RELEASE_MARKER}" == "true" ]]; then + assert_versions_match_tag "${MERGE_SHA}" "${TAG}" + fi + + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + # Fast-forward dev onto the squash commit (lease so a concurrent push aborts). + git push origin "${MERGE_SHA}:refs/heads/dev" --force-with-lease="refs/heads/dev:${DEV_SHA}" + + if [[ "${HAS_RELEASE_MARKER}" != "true" ]]; then + notice "dev synchronized to ${MERGE_SHA}; no release marker was present." + exit 0 + fi + + # The vX.Y.Z tag is immutable: it must NOT exist yet (we only CREATE it, once). + # Gates FAIL CLOSED on transient errors. + assert_release_absent "${TAG}" + assert_release_tag_absent "${TAG}" + + # Create the tag AND publish the release in one step. `gh release create` with a + # not-yet-existing tag CREATES it at --target (the squash commit) = a tag CREATION, + # which the immutable-tag ruleset allows. The `release: published` event then fires + # release.yml to build + attach assets + npm publish. (Must be created by the PAT so + # the downstream workflow triggers.) + RELEASE_ARGS=(release create "${TAG}" --target "${MERGE_SHA}" --title "${TAG}" --generate-notes) + if is_beta_tag "${TAG}"; then + RELEASE_ARGS+=(--prerelease) + fi + + gh "${RELEASE_ARGS[@]}" diff --git a/.github/workflows/release-guard.yml b/.github/workflows/release-guard.yml new file mode 100644 index 0000000..ccc9da2 --- /dev/null +++ b/.github/workflows/release-guard.yml @@ -0,0 +1,71 @@ +name: Release Guard + +on: + pull_request: + branches: + - main + types: + - opened + - reopened + - synchronize + - edited + - ready_for_review + +permissions: + contents: read + pull-requests: read + +jobs: + release-guard: + name: release-guard + runs-on: ubuntu-latest + steps: + - name: Checkout trusted base policy + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.base.sha }} + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Validate release PR + shell: bash + env: + PR_BASE_REF: ${{ github.event.pull_request.base.ref }} + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + PR_BODY: ${{ github.event.pull_request.body }} + REPOSITORY: ${{ github.repository }} + run: | + set -euo pipefail + + if [[ ! -f .github/scripts/release-policy.sh ]]; then + echo "::notice::Release policy is not present on base yet; allowing bootstrap PR." + exit 0 + fi + + source .github/scripts/release-policy.sh + + [[ "${PR_BASE_REF}" == "main" ]] || die "Release PRs must target main." + [[ "${PR_HEAD_REF}" == "dev" ]] || die "main only accepts release PRs from dev." + [[ "${PR_HEAD_REPO}" == "${REPOSITORY}" ]] || die "Release PRs must come from the same repository." + + # Maintenance (non-release) PRs dev -> main carry no release marker. Allow them: + # post-merge syncs dev without publishing a release. + if ! TAG="$(extract_pr_marker release-tag)"; then + notice "No release marker in PR body; treating as a maintenance dev -> main PR." + exit 0 + fi + + validate_release_tag "${TAG}" + + # Validate against the LIVE state of dev so review fix commits are fine as long + # as the workspace versions still match the release tag. + git fetch --force origin dev + DEV_SHA="$(git rev-parse origin/dev)" + + assert_versions_match_tag "${DEV_SHA}" "${TAG}" diff --git a/.github/workflows/release-intake.yml b/.github/workflows/release-intake.yml new file mode 100644 index 0000000..ac644cb --- /dev/null +++ b/.github/workflows/release-intake.yml @@ -0,0 +1,139 @@ +name: Release Intake + +# Started by pushing an UNPROTECTED pr-vX.Y.Z tag on dev. That tag does NOT match the +# protected v*.*.* ruleset, so it can be created/deleted freely. This workflow never +# creates or moves a v* tag: the authoritative vX.Y.Z tag is CREATED ONCE on the squash +# commit by post-merge-release (a tag creation, which the ruleset allows). +on: + push: + tags: + - "pr-v*" + +permissions: + contents: write + pull-requests: write + +concurrency: + group: release-intake-${{ github.ref_name }} + cancel-in-progress: false + +env: + GH_TOKEN: ${{ secrets.PEERSHELL_RELEASE_BOT_TOKEN || github.token }} + GITHUB_TOKEN: ${{ secrets.PEERSHELL_RELEASE_BOT_TOKEN || github.token }} + +jobs: + open-release-pr: + name: open-release-pr + if: ${{ github.event.deleted != true }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + fetch-depth: 0 + token: ${{ secrets.PEERSHELL_RELEASE_BOT_TOKEN || github.token }} + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Validate trigger tag and open release PR + shell: bash + run: | + set -euo pipefail + + # SECURITY: source the release policy from the TRUSTED base (origin/main), + # never from the checked-out tag tree (= dev HEAD, the to-be-released code). + # Bootstrap: fall back to the tag's policy only when main has no policy yet. + git fetch --force origin main + POLICY="$(mktemp)" + if git cat-file -e "origin/main:.github/scripts/release-policy.sh" 2>/dev/null; then + git show "origin/main:.github/scripts/release-policy.sh" > "${POLICY}" + else + echo "::notice::Release policy absent on origin/main; bootstrap release, using the tag's policy." + cp .github/scripts/release-policy.sh "${POLICY}" + fi + # shellcheck source=/dev/null + source "${POLICY}" + + TRIGGER="${GITHUB_REF_NAME}" + + if ! is_pr_tag "${TRIGGER}"; then + echo "::error::Invalid trigger '${TRIGGER}'. Push pr-vX.Y.Z (or pr-vX.Y.Z-) on dev to start a release." + delete_remote_tag "${TRIGGER}" + exit 1 + fi + + TAG="$(release_tag_from_pr_tag "${TRIGGER}")" + RELEASE_VERSION="$(version_from_tag "${TAG}")" + + git fetch --force origin dev main "refs/tags/${TRIGGER}:refs/tags/${TRIGGER}" + + TRIGGER_SHA="$(git rev-list -n 1 "${TRIGGER}")" + DEV_SHA="$(git rev-parse origin/dev)" + + if [[ "${TRIGGER_SHA}" != "${DEV_SHA}" ]]; then + echo "::error::${TRIGGER} must point to HEAD of dev (${DEV_SHA}), but points to ${TRIGGER_SHA}." + delete_remote_tag "${TRIGGER}" + exit 1 + fi + + # v* tags are immutable: refuse to start a release whose version is already + # published or tagged. Probes distinguish absent from error (fail closed). + REL_STATE="$(remote_release_state "${TAG}")" + TAG_STATE="$(remote_tag_state "${TAG}")" + if [[ "${REL_STATE}" == "present" || "${TAG_STATE}" == "present" ]]; then + delete_remote_tag "${TRIGGER}" + die "Version ${TAG} already exists (release=${REL_STATE}, tag=${TAG_STATE}); pick a new version." + fi + if [[ "${REL_STATE}" == "error" || "${TAG_STATE}" == "error" ]]; then + die "Could not verify whether ${TAG} already exists (release=${REL_STATE}, tag=${TAG_STATE}); aborting." + fi + + OPEN_PR="$(gh pr list --base main --head dev --state open --json number --jq '.[0].number // ""')" + if [[ -n "${OPEN_PR}" ]]; then + PR_BODY="$(gh pr view "${OPEN_PR}" --json body --jq '.body')" + export PR_BODY + if PR_TAG="$(extract_pr_marker release-tag)" && [[ "${PR_TAG}" == "${TAG}" ]]; then + notice "Release PR #${OPEN_PR} for ${TAG} already open." + delete_remote_tag "${TRIGGER}" + exit 0 + fi + delete_remote_tag "${TRIGGER}" + die "An open dev -> main PR already exists (#${OPEN_PR}). Close or merge it before starting a new release." + fi + + # Align the workspace versions on dev with the requested release. dev is not + # protected, so this normal commit + push is fine. + CURRENT_VERSION="$(version_at_ref "${DEV_SHA}")" + if [[ "${CURRENT_VERSION}" != "${RELEASE_VERSION}" ]]; then + notice "Updating workspace versions from ${CURRENT_VERSION} to ${RELEASE_VERSION} for ${TAG}." + git checkout -B dev origin/dev + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + set_version "${RELEASE_VERSION}" + if ! git diff --quiet -- "${WORKSPACE_PKGS[@]}"; then + git add "${WORKSPACE_PKGS[@]}" + git commit -m "chore: set version ${RELEASE_VERSION}" + git push origin HEAD:refs/heads/dev + fi + else + assert_versions_match_tag "${DEV_SHA}" "${TAG}" + fi + + # The trigger tag has done its job. Remove it (unprotected -> allowed). + delete_remote_tag "${TRIGGER}" + + BODY="$(cat < + EOF + )" + + gh pr create \ + --base main \ + --head dev \ + --title "Release ${TAG}" \ + --body "${BODY}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2af649e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,81 @@ +name: Release Asset + +# Fires when post-merge-release publishes a vX.Y.Z release. Builds the Tabby plugin, +# attaches the signed artifact to the release, and publishes to npm. +on: + release: + types: + - published + +permissions: + contents: write + +concurrency: + group: release-asset-${{ github.event.release.tag_name }} + cancel-in-progress: false + +jobs: + build-publish: + name: build-publish + if: startsWith(github.event.release.tag_name, 'v') + runs-on: ubuntu-latest + steps: + - name: Checkout released tag + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + ref: ${{ github.event.release.tag_name }} + persist-credentials: false + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci || npm install + + - name: Build all + run: npm run build:all + + - name: Test + smoke + run: | + npm test + npm run test:smoke + + - name: Package plugin + run: node scripts/package-plugin.mjs + + - name: Checksums + run: sha256sum tabby-peershell.zip > SHA256SUMS + + - name: Sign checksums (ECDSA P-256) and verify against pinned key + env: + SIGNING_KEY: ${{ secrets.PEERSHELL_KEY_SIGNATURE }} + run: | + set -euo pipefail + [ -n "${SIGNING_KEY}" ] || { echo "::error::PEERSHELL_KEY_SIGNATURE is empty"; exit 1; } + printf '%s\n' "${SIGNING_KEY}" > "${RUNNER_TEMP}/sign.key" + openssl dgst -sha256 -sign "${RUNNER_TEMP}/sign.key" -out SHA256SUMS.sig SHA256SUMS + shred -u "${RUNNER_TEMP}/sign.key" 2>/dev/null || rm -f "${RUNNER_TEMP}/sign.key" + # Fail-closed: the signature MUST verify against the committed public key. + openssl dgst -sha256 -verify .github/keys/peershell_release.pub -signature SHA256SUMS.sig SHA256SUMS + + - name: Upload assets to release + env: + GH_TOKEN: ${{ github.token }} + RELEASE_TAG: ${{ github.event.release.tag_name }} + run: | + set -euo pipefail + gh release upload "$RELEASE_TAG" tabby-peershell.zip SHA256SUMS SHA256SUMS.sig --clobber + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{ secrets.PEERSHELL_NPM_TOKEN }} + RELEASE_TAG: ${{ github.event.release.tag_name }} + run: | + set -euo pipefail + DIST_TAG=latest + case "$RELEASE_TAG" in *-*) DIST_TAG=next ;; esac + npm publish -w @peershell/protocol --access public --tag "$DIST_TAG" + npm publish -w tabby-peershell --access public --tag "$DIST_TAG" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd1035f --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +node_modules/ +dist/ +typings/ +*.tsbuildinfo +.webpack-cache/ + +# Generated: web-client bundle embedded into the Tabby plugin (built from clients/web) +clients/tabby/assets/web-client.html + +# Local env / secrets +.env +*.local + +# local plugin packaging artifacts (Windows install) +build/ +tabby-peershell.zip + +# server runtime data (accounts store) +server/data/ diff --git a/PROTOCOL.md b/PROTOCOL.md new file mode 100644 index 0000000..e3fe92d --- /dev/null +++ b/PROTOCOL.md @@ -0,0 +1,100 @@ +# peershell wire protocol (v1 — draft, frozen at Stage 5) + +Language-neutral spec of the peershell wire protocol. Implemented once in `@peershell/protocol` +(`shared/`) and consumed by every client (Tabby plugin, web-client, future native terminal, future +mobile app) and by the server. Native ports (Swift/Kotlin/Dart) should follow this document. + +## Roles and transport + +- **host**: a Tabby (or future terminal) instance sharing one local terminal session. Opens a single + **outbound** WSS connection to the server. No inbound ports, no NAT traversal, no STUN/TURN. +- **guest**: a peer that views + controls the shared session (Tabby desktop, browser via magic-link, + or mobile). Connects to the server (browser/mobile reach the server's public URL via cloudflared). +- **server**: rendezvous + blind relay + reverse HTTP tunnel + accounts/dashboard. After pairing it + **forwards every frame verbatim** between host and a guest; it never needs to parse terminal bytes. + +Data path is always host <-> server <-> guest. There is no direct peer link in the MVP; the transport +sits behind a `SessionTransport` interface so a future WebRTC DataChannel can replace the relay leg. + +## Framing + +One WebSocket carries two frame kinds (`ws.binaryType = 'arraybuffer'`): + +- **TEXT frame = JSON control message** — the envelope below. +- **BINARY frame = terminal data** — layout: + + ``` + [ peerId: uint32 big-endian ][ tag: uint8 ][ raw PTY bytes ... ] + tag: 0x01 = output (host -> guest), 0x02 = input (guest -> host) + ``` + + Raw PTY bytes are **never** decoded as UTF-8 in transit. A multibyte codepoint may be split across + frames; the **receiving client** is responsible for reassembling via a UTF-8 splitter before writing + to its terminal (Tabby desktop gets this from `UTF8SplitterMiddleware`; web/mobile use + `@peershell/protocol`'s `Utf8Splitter`). MVP uses `peerId = 0` (1 host + 1 guest). `peerId` exists so + the server can route frames once multiple guests are supported. + +## Control envelope + +``` +{ "t": , "v": 1, "peerId"?: , ... } +``` + +`v` is `PROTOCOL_VERSION` (currently 1). Unknown/incompatible `v` -> `error{code:"bad-version"}`. + +### REST (client -> server, not WebSocket) +- `POST /register { email, password }` +- `POST /login { email, password } -> { token } | { needs2fa: true, challenge }` +- `POST /2fa/verify { challenge, code } -> { token }` +- `GET /sessions -> { sessions: [{ room, magicLink, createdAt }] }` (dashboard, authenticated) + +### Signaling (client <-> server, WS TEXT) +- `hello { role: "host"|"guest", kind?: "desktop"|"web"|"mobile", client }` +- `create-session { }` (host, authenticated) -> `session-created { room, magicLink }` +- `session-close { }` (host) — revokes the magic-link +- `join { room?|token?, name? }` (guest) +- `peer-joined { peerId, kind }` (to host) +- `peer-left { peerId, reason }` +- `error { code, message }` +- `ping {}` / `pong {}` + +### PIN auth (host <-> peer, relayed; gates every incoming connection) +- `pin-challenge { nonce }` — host sends a **fresh, single-use** nonce per attempt +- `pin-response { hash }` — `hash = H(pin, nonce)` (e.g. SHA-256); raw PIN never sent +- `pin-ok {}` / `pin-fail { left }` — host verifies locally; rate-limited (~5 tries), then kick + +### Sync (after pin-ok, relayed) +- `snapshot { cols, rows, data }` — `data` = base64 of the host's `frontend.saveState()` VT snapshot +- `snapshot-ack {}` — guest confirms it rendered the snapshot; **barrier**: host starts streaming + `output` only after receiving the ack (avoids output-before-snapshot race) +- `resize { cols, rows }` — host -> guest only (tmate model; guest never resizes the host PTY) + +### Terminal data (after pin-ok + snapshot-ack) +- BINARY tag `0x01` output (host -> guest), `0x02` input (guest -> host). See Framing. + +### HTTP tunnel (server <-> host — serves the web-client page over the host's outbound leg) +- `http-get { peerId, reqId, path, headers }` +- `http-response { peerId, reqId, status, headers, bodyBase64 }` +- Correlation key = `(peerId, reqId)`. NOT real HTTP: these are application frames over the WS; the + Electron renderer does not open a listening port. The host validates `path` against a strict + **whitelist** (only `/`), rejecting traversal/SSRF (`..`, absolute paths, `file://`, `http://`); + anything else -> `403`. + +## Tokens, PIN, keepalive + +- **magic-link token**: opaque, CSPRNG, **TTL 15 min** (default, configurable), **single-use = revoked + after a join completes (post `pin-ok`)** — not on first GET. Expired join -> `error{code:"link-expired", + suggestRenew:true}`. Host can revoke anytime. +- **room-code** (if shown): Crockford base32 minus ambiguous chars; client validates `^[2-9A-HJ-NP-Z]{6,10}$`. +- **PIN**: per-session, local only, min 6 digits (8+ recommended for hostile environments). Verified via + `H(pin, nonce)` challenge-response. A hostile relay sees `nonce`+`hash` and can brute-force short PINs + **offline** — hence entropy + rate-limit; a future PAKE (SPAKE2) removes this if the relay is untrusted. +- **keepalive**: `ping` every 20s from both ends; `ping`/`pong` do **not** reset the liveness timer — only + real frames (control/snapshot/output/input) do. No real frame for 60s -> close + `peer-left`. + +## Security note (MVP) + +The MVP has **no end-to-end encryption**: the relay sees terminal I/O in cleartext (commands, output, +env vars, secrets). Self-hosting is required for production use. An E2E layer (e.g. ChaCha20/AES-GCM with +a key derived from the PIN/passphrase) can be added behind `SessionTransport` without changing this +protocol's shape. The PIN itself never crosses the wire in cleartext. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e9396f0 --- /dev/null +++ b/README.md @@ -0,0 +1,74 @@ +# peershell + +> Take your terminal anywhere and work as if it were local. + +Share one live terminal session with remote peers and let them see the exact screen and type as if +local — from another **Tabby** (via the `tabby-peershell` plugin), from a **browser** (via a magic-link), +and, in future, from a dedicated **mobile app** or **our own terminal**. Same wire protocol everywhere. + +It is the `tmate` / VS Code Live Share model, brokered by a lightweight rendezvous server: the host opens +a single **outbound** connection (no inbound ports, no NAT), the server pairs peers and blindly relays +frames, and it reverse-tunnels the web page from the host. See [`PROTOCOL.md`](./PROTOCOL.md). + +## Security — read this first + +**The MVP has NO end-to-end encryption.** The relay server sees every byte of the terminal in cleartext: +typed commands, output, environment variables, secrets, keys. **Do not use it for sensitive data unless +you self-host the relay.** Access to a shared session requires **both** a magic-link **and** a per-session +**PIN** that is validated locally and never sent to the server in cleartext. End-to-end encryption is +planned behind the same transport interface. + +## Monorepo layout (npm workspaces) + +``` +shared/ @peershell/protocol — TS-only, framework-neutral wire protocol (published to npm) +clients/tabby/ tabby-peershell — the Tabby plugin (Angular/Electron); all Tabby-specific code +clients/web/ @peershell/web-client — standalone browser client (xterm.js), embedded + served by host +server/ @peershell/server — rendezvous + relay + tunnel + accounts (register/login/2FA) +``` + +> This repo uses **npm workspaces** (npm >= 9). It is independent of Tabby's package manager: the plugin +> is discovered by Tabby at runtime from its built `dist/`, not installed into Tabby's workspace. + +## Development + +Requires Node >= 18 and a checkout of the Tabby source at `/opt/tabby` (used for `tabby-*` types; the +plugin build is self-contained and does not need Tabby's `node_modules`). + +```sh +npm install # installs all workspaces (self-contained Angular 15 + webpack toolchain) +npm run build:all # shared -> web -> copy asset -> tabby -> server (in order) +npm run watch:tabby # iterate on the plugin (Tabby has no hot-reload; reload its window after a build) +``` + +Load the built plugin into a running Tabby (on your desktop): + +```sh +# option A: symlink into Tabby's user plugins dir +ln -s /opt/peershell/clients/tabby ~/.config/tabby/plugins/node_modules/tabby-peershell +# option B: dev env var (from a Tabby source checkout) +TABBY_DEV=1 TABBY_PLUGINS=/opt/peershell/clients/tabby yarn start +``` + +## Server configuration (env) + +`server/src/index.cjs` is a single stdlib file (only `ws`). Configure it via environment variables: + +| var | default | purpose | +|-----|---------|---------| +| `PORT` / `BIND` | `8787` / `0.0.0.0` | listen address | +| `PUBLIC_URL` | (derived) | base for minted magic-links, e.g. `https://panel.peershell.dev` | +| `PEERSHELL_DATA` | `server/data` | dir for `accounts.json` (atomic, mode 0600) | +| `TOKEN_TTL_MS` | 15 min | magic-link lifetime | +| `BREVO_API_KEY` | (unset) | Brevo transactional API key; unset ⇒ verification codes are logged instead of emailed | +| `EMAIL_FROM` / `EMAIL_FROM_NAME` | `noreply@peershell.dev` / `peershell` | verification sender | + +`create-session` is gated behind a valid account token; open registration requires email verification. +Email is relayed through **Brevo** (not direct VM SMTP) so the VM IP stays out of the sending path. +Authorise the domain in Brevo and add its **DKIM** records plus SPF (`include:spf.brevo.com`) and a +`_dmarc` policy to the domain's DNS so mail is authenticated. + +## Publishing + +`tabby-peershell` is published to npm from `clients/tabby/` (keyword `tabby-plugin`, so Tabby's plugin +manager can find it). See `scripts/publish-plugins.mjs`. diff --git a/USER_GUIDE.md b/USER_GUIDE.md new file mode 100644 index 0000000..7862568 --- /dev/null +++ b/USER_GUIDE.md @@ -0,0 +1,204 @@ +# peershell — User Guide + +> Take your terminal anywhere and work as if it were local. + +peershell lets you **share one live terminal session** with remote people and let them **see the exact +screen and type as if they were local** — the `tmate` / VS Code Live Share model. You share from a +desktop terminal (the **Tabby** plugin) and the other person joins from **another Tabby** or straight +from a **web browser** via a one-time link. A dedicated mobile app is planned. + +This guide is for **users**. It covers accounts, sharing, joining (desktop / browser / mobile), the web +dashboard, and security. Keep it as the living reference — we add to it as features land. + +--- + +## 1. Read this first — security + +peershell is designed to be simple and to work through firewalls with **no inbound ports**. Understand +what it does before sharing: + +- **A guest gets a full read‑write shell.** Whoever joins can see everything on that terminal and can + type commands. Only share with people you trust, and only the terminal you mean to. +- **No end‑to‑end encryption yet.** Traffic is encrypted in transit (HTTPS/WSS), but the **relay server + sees the terminal contents in clear text** (commands, output, environment variables, secrets). Do not + share sensitive sessions on a server you do not control. For sensitive use, **self‑host the server**. +- **Two things are always required to join:** the **magic link** *and* a **per‑session PIN**. The PIN + lives only on the host, is never sent to the server, and gates every incoming connection. The link + alone is not enough. +- **Passwords are never stored in plain text.** Accounts store a salted, one‑way **scrypt** hash only; + nobody (not even the operator) can recover your password — only reset it. + +The first time you share, peershell shows a one‑time confirmation of the above. You can proceed or cancel. + +--- + +## 2. Concepts at a glance + +| Term | Meaning | +|------|---------| +| **Host** | The person sharing their terminal (runs the Tabby plugin). | +| **Guest** | The person who joins — from another Tabby or a browser. | +| **Account** | Email + password (optional 2FA). Required to *share*; guests do not need one. | +| **Magic link** | A one‑time URL the host sends to a guest. Opens the shared terminal in a browser. | +| **PIN** | A per‑session code the host sets. The guest must enter it to connect. | +| **Server** | The rendezvous/relay. Hosted at `panel.peershell.dev`, or self‑hosted. | +| **Dashboard** | The web page at the server root to log in and see your sessions. | + +--- + +## 3. Accounts + +You need an account to **share** a terminal. Guests joining a link do **not** need an account. + +### Register / log in +You can manage your account in two places — they are the **same accounts**: +- In Tabby: the **peershell** toolbar button → **Log in**. +- In a browser: open the server (e.g. `https://panel.peershell.dev/`) → the login page. + +Enter your **email** and a **password** (at least 8 characters), then: +- **Log in** — sign in to an existing account. +- **Register** — create a new account (registers and signs you in directly). +- **Recover password** — start a password reset. + +### Email verification +When email delivery is enabled on your server, registering sends a **6‑digit code** to your email; enter +it to finish. If email delivery is not yet enabled, registration signs you in immediately (the code is +written to the server log instead). Either way you end up signed in. + +### Two‑factor authentication (2FA), optional +You can protect your account with an authenticator app (TOTP, e.g. Google Authenticator). When enabled, +logging in asks for the current 6‑digit code after your password. You enable/disable 2FA from the account +options (disabling requires your password). + +### Password reset +Choose **Recover password**, enter your email, then the reset **code** (from your email, or the server +log if email is not enabled) and a **new password**. + +### Log out +- Tabby: peershell menu → **Log out**. +- Browser dashboard: **logout** in the top bar. + +--- + +## 4. Installing the Tabby plugin + +The plugin adds peershell to **Tabby** (desktop terminal). Publishing to npm is planned; for now it is +installed manually. + +**Where Tabby keeps plugins:** its user data folder, under `plugins/node_modules/`. On Windows this is +`%APPDATA%\tabby\plugins\node_modules\`. (In Tabby: **Settings → Plugins** links to the folder.) + +**Install:** +1. Put the `tabby-peershell` folder (containing `package.json` and `dist/index.js`) into + `…\plugins\node_modules\tabby-peershell\`. +2. **Fully quit Tabby**, including from the system tray (right‑click the tray icon → Quit), then reopen. + Tabby only loads plugins at startup, so a full restart is required after installing or updating. + +**Verify it loaded:** you should see a **peershell** button in the toolbar and a **peershell** tab under +Settings. The server is preconfigured to `wss://panel.peershell.dev`; you can change it in +**Settings → peershell** if you self‑host. + +--- + +## 5. Sharing a terminal (host) + +1. Make sure you are **logged in** (peershell menu → Log in). +2. **Focus the terminal** you want to share (click into it). +3. Open the **peershell** toolbar menu → **Share this terminal**. (You can also right‑click inside a + terminal → *Share this terminal (peershell)*.) +4. Accept the one‑time **security notice**. +5. peershell shows a window with the **magic link** and the **PIN**, each with a **Copy** button. Send + **both** to your guest (over a trusted channel). Click **Done** — sharing keeps running in the + background while that terminal tab stays open. + +While sharing, the peershell menu entry for that terminal changes to **Stop sharing this terminal**. + +--- + +## 6. Joining a shared terminal (guest) + +### From a web browser (any device) +1. Open the **magic link**. +2. Enter the **PIN** when prompted. +3. The shared terminal appears. You can read it and type — it is full read‑write and adopts the host's + window size. + +### From another Tabby (desktop) +1. peershell menu → **Join a shared terminal**. +2. Enter the **room code** and the **PIN**. +3. A mirror tab opens with the shared terminal. + +### On a phone or tablet (browser) +Mobile keyboards lack arrow keys and modifiers, so the browser view shows an **on‑screen keys bar** at +the bottom: +- **Esc · Tab · Ctrl · Alt · ← ↓ ↑ → · ^C · Home · End · PgUp · PgDn · | / - ~** (scroll it sideways for + more). +- **Ctrl** and **Alt** are *sticky*: tap Ctrl (it highlights), then tap a letter to send e.g. Ctrl‑C. +- Arrows work correctly inside full‑screen apps like `vim`/`less`. +- The **⌨** button (top‑right) hides/shows the bar. On desktop the bar is hidden by default. + +--- + +## 7. Ending a session + +**Host** — any of: +- peershell menu → **Stop sharing this terminal**. +- Right‑click in the terminal → *Stop sharing (peershell)*. +- Close the terminal tab. + +**Guest** — close the browser tab (or the mirror tab in Tabby). + +**Automatic close on guest disconnect:** if the guest disconnects, the host waits about **10 seconds** +for them to come back before ending the session. A brief network blip is survived automatically — the +browser view reconnects on its own (re‑using the PIN) — but if the guest is really gone, the share ends. + +**Auto‑stop if never used:** if **no guest connects within about 5 minutes** of starting a share, the +host stops it automatically. + +**Link lifetime:** a magic link expires after ~15 minutes. + +--- + +## 8. The web dashboard + +Open the server in a browser (e.g. `https://panel.peershell.dev/`) and log in. You get: +- A top bar with your **email**, a **settings** button, and **logout**. +- **Settings** has two buttons: **Change password**, and **2FA** — see your two‑factor status and turn it + on or off. Turning it on shows a **QR code** to scan with your authenticator app (plus the text key). +- A table of **your sessions**, both live and ended: + - **Status** — *live* or *ended*. + - **Opened** / **Closed** — the times. + - **Link** — an **open** link for sessions that are still live. + +Use *Refresh* to update the list. + +--- + +## 9. Troubleshooting + +- **The plugin/menu didn't update after an install.** Quit Tabby completely (including the tray icon), + then reopen — plugins load only at startup. +- **"Cannot reach the peershell server."** Check **Settings → peershell → Server URL** (default + `wss://panel.peershell.dev`). +- **"Log in to share a terminal."** You must be signed in before sharing. +- **"Focus a terminal tab to share it."** Click into a terminal first, then use Share. +- **Share menu says Share, not Stop.** Make sure you are on the tab whose terminal is being shared. +- **Didn't get the email code.** If email delivery isn't enabled yet on your server, the code is written + to the server log; ask the operator, or you may already be signed in. + +--- + +## 10. Status & what's next + +**Working today:** accounts (register / login / optional 2FA / password reset), sharing from Tabby, +joining from another Tabby or a browser, the mobile keys bar, automatic reconnect/grace on guest drops, +the web dashboard, and scrypt‑hashed passwords. The server runs at `panel.peershell.dev` and is +self‑hostable. + +**Planned:** publishing the plugin to npm, a dedicated **mobile app**, and optional **end‑to‑end +encryption**. Email delivery (verification / reset codes) is being finalised with an external provider; +until then those codes appear in the server log. + +--- + +*This document is the living user reference for peershell. We extend it as features ship.* diff --git a/clients/tabby/package.json b/clients/tabby/package.json new file mode 100644 index 0000000..da935bc --- /dev/null +++ b/clients/tabby/package.json @@ -0,0 +1,62 @@ +{ + "name": "tabby-peershell", + "version": "0.1.0-beta", + "description": "Share your terminal session anywhere (peershell) — collaborative terminal for Tabby", + "keywords": [ + "tabby-plugin" + ], + "main": "dist/index.js", + "author": "tis24dev", + "license": "Apache-2.0", + "repository": "https://github.com/tis24dev/peershell", + "files": [ + "dist", + "assets" + ], + "scripts": { + "build": "webpack --progress --color --config ./webpack.config.mjs", + "watch": "webpack --progress --color --watch --config ./webpack.config.mjs", + "test": "node test/smoke-load.cjs" + }, + "dependencies": { + "@peershell/protocol": "*" + }, + "peerDependencies": { + "tabby-core": "*", + "tabby-settings": "*", + "tabby-terminal": "*" + }, + "devDependencies": { + "@angular/animations": "^15.2.6", + "@angular/common": "^15.2.6", + "@angular/compiler": "^15.2.6", + "@angular/compiler-cli": "^15.2.6", + "@angular/core": "^15.2.6", + "@angular/forms": "^15.2.6", + "@angular/platform-browser": "^15.2.6", + "@babel/core": "^7.22.0", + "@ng-bootstrap/ng-bootstrap": "^14.1.0", + "@ngtools/webpack": "^15.2.5", + "@tabby-gang/to-string-loader": "^1.1.7-beta.2", + "@types/jest": "^29.5.14", + "@types/node": "20.3.1", + "apply-loader": "2.0.0", + "babel-loader": "^9.1.2", + "css-loader": "^6.7.3", + "jest": "^29.7.0", + "ngx-toastr": "^16.0.2", + "pug-loader": "^2.4.0", + "rxjs": "^7.5.7", + "sass": "^1.63.4", + "sass-loader": "^13.2.0", + "source-map-loader": "^4.0.1", + "style-loader": "^3.3.1", + "svg-inline-loader": "^0.8.2", + "ts-jest": "^29.4.11", + "tslib": "^2.6.0", + "typescript": "^4.9.5", + "webpack": "^5.90.0", + "webpack-cli": "^5.0.1", + "yaml-loader": "0.8.0" + } +} diff --git a/clients/tabby/src/account/account.service.ts b/clients/tabby/src/account/account.service.ts new file mode 100644 index 0000000..2ecf270 --- /dev/null +++ b/clients/tabby/src/account/account.service.ts @@ -0,0 +1,134 @@ +import { Injectable } from '@angular/core' +import { ConfigService } from 'tabby-core' + +export interface AccountApiResult { + status: number + token?: string + expiresAt?: number + needsTotp?: boolean + sessionKey?: string + needsVerification?: boolean + ok?: boolean + error?: string + [k: string]: unknown +} + +/** + * Client-neutral account layer: talks the server's REST API (fetch) and keeps the bearer token. + * + * Token storage: Tabby config store (`peershell.account`), persisted via ConfigService.save(). This is + * an MVP tradeoff — the Tabby vault (encrypted at rest) is the intended hardening and can replace this + * behind the same getToken/persist surface without touching callers. + */ +@Injectable({ providedIn: 'root' }) +export class AccountService { + constructor(private readonly config: ConfigService) {} + + get email(): string | null { + return this.config.store.peershell?.account?.email ?? null + } + + getToken(): string | null { + const a = this.config.store.peershell?.account + if (a?.token && (!a.expiresAt || a.expiresAt > Date.now())) { + return a.token + } + return null + } + + isLoggedIn(): boolean { + return !!this.getToken() + } + + /** REST base derived from the configured ws(s):// server URL. */ + private base(): string { + const url: string = this.config.store.peershell?.serverUrl || '' + return url.replace(/^wss:/, 'https:').replace(/^ws:/, 'http:').replace(/\/+$/, '') + } + + private async api(method: string, path: string, body?: unknown, auth = false): Promise { + const headers: Record = { 'content-type': 'application/json' } + if (auth) { + const t = this.getToken() + if (t) { + headers.authorization = `Bearer ${t}` + } + } + let res: Response + try { + res = await fetch(this.base() + path, { + method, + headers, + body: body === undefined ? undefined : JSON.stringify(body), + }) + } catch (err) { + // eslint-disable-next-line no-console + console.error('[peershell] fetch failed:', method, this.base() + path, err) + return { status: 0, error: 'network-error', detail: String((err as any)?.message ?? err) } + } + let json: Record = {} + try { + json = await res.json() + } catch { /* empty/non-json body */ } + return { status: res.status, ...json } + } + + register(email: string, password: string): Promise { + return this.api('POST', '/register', { email, password }) + } + + verifyEmail(email: string, code: string): Promise { + return this.api('POST', '/verify-email', { email, code }) + } + + login(email: string, password: string): Promise { + return this.api('POST', '/login', { email, password }) + } + + verify2fa(sessionKey: string, code: string): Promise { + return this.api('POST', '/2fa/verify', { sessionKey, code }) + } + + requestPasswordReset(email: string): Promise { + return this.api('POST', '/request-password-reset', { email }) + } + + resetPassword(email: string, code: string, newPassword: string): Promise { + return this.api('POST', '/reset-password', { email, code, newPassword }) + } + + /** Dashboard: the account's live shares. Clears the local token on 401 (expired). */ + async getSessions(): Promise<{ account?: { email: string, totpEnabled: boolean }, sessions: any[], error?: string }> { + const r = await this.api('GET', '/sessions', undefined, true) + if (r.status === 200) { + return { account: (r as any).account, sessions: (r as any).sessions ?? [] } + } + if (r.status === 401) { + await this.clearLocal() + return { sessions: [], error: 'unauthorized' } + } + return { sessions: [], error: String(r.error ?? r.status) } + } + + /** Store the bearer token locally (config store). */ + async persist(email: string, token: string, expiresAt?: number): Promise { + // Top-level config keys are getter-only in Tabby: mutate the nested property, never reassign + // store.peershell (which throws "has only a getter"). `peershell` always exists via defaults. + this.config.store.peershell.account = { email, token, expiresAt: expiresAt ?? null } + await this.config.save() + } + + async clearLocal(): Promise { + if (this.config.store.peershell) { + this.config.store.peershell.account = null + await this.config.save() + } + } + + async logout(): Promise { + try { + await this.api('POST', '/logout', {}, true) + } catch { /* revoke is best-effort */ } + await this.clearLocal() + } +} diff --git a/clients/tabby/src/account/login-modal.component.ts b/clients/tabby/src/account/login-modal.component.ts new file mode 100644 index 0000000..7813b8e --- /dev/null +++ b/clients/tabby/src/account/login-modal.component.ts @@ -0,0 +1,245 @@ +import { Component } from '@angular/core' +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { AccountService, AccountApiResult } from './account.service' + +type Mode = 'account' | 'login' | 'verify' | '2fa' | 'reset-request' | 'reset' + +const ERRORS: Record = { + 'invalid-credentials': 'Email or password is not valid.', + 'needs-verification': 'Verify your email first (check email or the server log for the code).', + 'rate-limited': 'Too many attempts. Please try again later.', + 'password-too-weak': 'Password must be at least 8 characters.', + 'invalid-email': 'Enter a valid email address.', + 'invalid': 'Wrong or expired code.', + 'invalid-code': 'Wrong 2FA code.', + 'too-many-attempts': 'Too many attempts. Try again later.', + 'unauthorized': 'Session expired. Please log in again.', + 'network-error': 'Cannot reach the peershell server. Check the server URL in settings.', +} + +/** Login / create-account / verify / 2FA / password-reset / logout. Resolves modal.close(token) on login. */ +@Component({ + template: ` + + + + `, +}) +export class LoginModalComponent { + mode: Mode = 'login' + email = '' + password = '' + newPassword = '' + code = '' + sessionKey = '' + busy = false + error = '' + info = '' + + constructor(public readonly modal: NgbActiveModal, private readonly account: AccountService) { + if (this.account.isLoggedIn()) { + this.mode = 'account' + this.email = this.account.email ?? '' + } + } + + switch(mode: Mode): void { + this.mode = mode + this.error = '' + this.info = '' + this.code = '' + this.newPassword = '' + } + + private get normEmail(): string { + return this.email.trim().toLowerCase() + } + + private fail(r: AccountApiResult): void { + const base = ERRORS[String(r.error)] ?? (r.error ? String(r.error) : `Request failed (${r.status})`) + const detail = (r as { detail?: string }).detail + this.error = detail ? `${base} · ${detail}` : base + } + + async submitLogin(): Promise { + this.busy = true + this.error = '' + try { + const r = await this.account.login(this.normEmail, this.password) + if (r.needsTotp && r.sessionKey) { + this.sessionKey = r.sessionKey + this.switch('2fa') + return + } + if (r.status === 200 && r.token) { + await this.account.persist(this.normEmail, r.token, r.expiresAt) + this.modal.close(r.token) + return + } + if (r.error === 'needs-verification') { + this.switch('verify') + this.info = 'Please verify your email. The code is in your email or the server log.' + return + } + this.fail(r) + } catch (e) { + this.error = `Unexpected error: ${String((e as { message?: string })?.message ?? e)}` + } finally { + this.busy = false + } + } + + async submitRegister(): Promise { + this.busy = true + this.error = '' + try { + const r = await this.account.register(this.normEmail, this.password) + if (r.status === 200 && r.token) { + // Auto-verified (email delivery unavailable) -> logged in immediately. + await this.account.persist(this.normEmail, r.token, r.expiresAt) + this.modal.close(r.token) + return + } + if (r.status === 200 && r.needsVerification) { + this.switch('verify') + this.info = 'Check your email for the 6-digit code, then verify.' + return + } + if (r.status === 200 && r.alreadyRegistered) { + this.switch('login') + this.info = 'That email is already registered — please log in.' + return + } + this.fail(r) + } catch (e) { + this.error = `Unexpected error: ${String((e as { message?: string })?.message ?? e)}` + } finally { + this.busy = false + } + } + + async submitVerify(): Promise { + this.busy = true + this.error = '' + try { + const r = await this.account.verifyEmail(this.normEmail, this.code.trim()) + if (r.status === 200) { + this.switch('login') + this.info = 'Email verified. You can log in now.' + } else { + this.fail(r) + } + } finally { + this.busy = false + } + } + + async submit2fa(): Promise { + this.busy = true + this.error = '' + try { + const r = await this.account.verify2fa(this.sessionKey, this.code.trim()) + if (r.status === 200 && r.token) { + await this.account.persist(this.normEmail, r.token, r.expiresAt) + this.modal.close(r.token) + return + } + this.fail(r) + } finally { + this.busy = false + } + } + + async submitResetRequest(): Promise { + this.busy = true + this.error = '' + try { + await this.account.requestPasswordReset(this.normEmail) + this.switch('reset') + this.info = 'If that email exists, a reset code was sent (check your email or the server log).' + } finally { + this.busy = false + } + } + + async submitReset(): Promise { + this.busy = true + this.error = '' + try { + const r = await this.account.resetPassword(this.normEmail, this.code.trim(), this.newPassword) + if (r.status === 200) { + this.switch('login') + this.info = 'Password changed. Please log in.' + } else { + this.fail(r) + } + } finally { + this.busy = false + } + } + + async doLogout(): Promise { + this.busy = true + try { + await this.account.logout() + this.modal.close(null) + } finally { + this.busy = false + } + } +} diff --git a/clients/tabby/src/config.ts b/clients/tabby/src/config.ts new file mode 100644 index 0000000..84d2ceb --- /dev/null +++ b/clients/tabby/src/config.ts @@ -0,0 +1,14 @@ +import { ConfigProvider } from 'tabby-core' + +export class PeershellConfigProvider extends ConfigProvider { + defaults = { + peershell: { + serverUrl: 'wss://panel.peershell.dev', + magicLinkTtlMinutes: 15, + disclaimerAck: false, + account: null, + }, + } + + platformDefaults = {} +} diff --git a/clients/tabby/src/guest/mirrorSession.ts b/clients/tabby/src/guest/mirrorSession.ts new file mode 100644 index 0000000..3cc8067 --- /dev/null +++ b/clients/tabby/src/guest/mirrorSession.ts @@ -0,0 +1,68 @@ +import { Injector } from '@angular/core' +import { Observable, Subject } from 'rxjs' +import { LogService } from 'tabby-core' +import { BaseSession, UTF8SplitterMiddleware } from 'tabby-terminal' +import { SessionTransport, MirrorController, MirrorSink, PinProvider } from '@peershell/protocol' + +/** + * A "fake shell" session backing the guest mirror tab. Inbound frames become terminal output via + * emitOutput(); the guest's keystrokes arrive through write() and are forwarded to the host. + * Delegates all wire logic to the Tabby-agnostic MirrorController. + */ +export class MirrorSession extends BaseSession { + private readonly hostResize = new Subject<{ cols: number, rows: number }>() + private readonly controller: MirrorController + + constructor( + injector: Injector, + private readonly transport: SessionTransport, + private readonly room: string, + pinProvider: PinProvider, + ) { + super(injector.get(LogService).create('peershell')) + // Reassemble multibyte UTF-8 split across network frames before rendering (see PROTOCOL.md). + this.middleware.push(new UTF8SplitterMiddleware()) + + const sink: MirrorSink = { + emit: data => this.emitOutput(Buffer.from(data)), + hostResize: (cols, rows) => this.hostResize.next({ cols, rows }), + ended: reason => { + this.emitOutput(Buffer.from(`\r\n[peershell] ${reason}\r\n`)) + void this.destroy() + }, + } + this.controller = new MirrorController(this.transport, sink, pinProvider) + } + + get hostResize$(): Observable<{ cols: number, rows: number }> { + return this.hostResize + } + + async start(_options?: unknown): Promise { + this.open = true + this.controller.join({ room: this.room }) + } + + write(data: Buffer): void { + this.controller.writeInput(new Uint8Array(data)) + } + + // tmate model: the guest never resizes the host PTY; it only adopts the host's size. + resize(_columns: number, _rows: number): void { /* no-op */ } + + kill(_signal?: string): void { + this.controller.close() + } + + async gracefullyKillProcess(): Promise { + this.controller.close() + } + + supportsWorkingDirectory(): boolean { + return false + } + + async getWorkingDirectory(): Promise { + return null + } +} diff --git a/clients/tabby/src/guest/mirrorTab.component.ts b/clients/tabby/src/guest/mirrorTab.component.ts new file mode 100644 index 0000000..435a014 --- /dev/null +++ b/clients/tabby/src/guest/mirrorTab.component.ts @@ -0,0 +1,58 @@ +import { Component, Injector, Input } from '@angular/core' +import { BaseTerminalTabComponent } from 'tabby-terminal' +import { SessionTransport, PinProvider } from '@peershell/protocol' + +import { MirrorSession } from './mirrorSession' + +/** + * Guest tab that renders a mirrored remote terminal. Reuses BaseTerminalTabComponent's template so + * xterm.js rendering, selection, scrollback, etc. all work; only the session is our MirrorSession. + * + * NOTE: needs validation in a real Tabby GUI (module wiring + profile), which cannot run headless here. + */ +@Component({ + selector: 'peershell-mirror-tab', + template: BaseTerminalTabComponent.template, + styles: BaseTerminalTabComponent.styles, + animations: BaseTerminalTabComponent.animations, +}) +export class MirrorTabComponent extends BaseTerminalTabComponent { + @Input() transport!: SessionTransport + @Input() room!: string + @Input() pinProvider!: PinProvider + session: MirrorSession | null = null + + // eslint-disable-next-line @typescript-eslint/no-useless-constructor + constructor(injector: Injector) { + super(injector) + } + + ngOnInit(): void { + this.logger = this.log.create('peershell-mirror') + if (!this.profile) { + this.profile = { + name: `peershell: ${this.room}`, + type: 'peershell-mirror', + options: {}, + } + } + super.ngOnInit() + } + + protected onFrontendReady(): void { + const session = new MirrorSession(this.injector, this.transport, this.room, this.pinProvider) + this.setSession(session) + // Adopt the host's size (tmate model). Guest window resizes are ignored (no frontend.resize$ + // subscription) so there is no resize feedback loop. + this.subscribeUntilDestroyed(session.hostResize$, ({ cols, rows }) => { + this.frontend?.xterm?.resize(cols, rows) + }) + void session.start() + super.onFrontendReady() + } + + ngOnDestroy(): void { + super.ngOnDestroy() + void this.session?.destroy() + } +} diff --git a/clients/tabby/src/host/share-info-modal.component.ts b/clients/tabby/src/host/share-info-modal.component.ts new file mode 100644 index 0000000..0569e9f --- /dev/null +++ b/clients/tabby/src/host/share-info-modal.component.ts @@ -0,0 +1,49 @@ +import { Component } from '@angular/core' +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' + +/** Persistent, copyable display of a live share's magic-link + PIN (shown when sharing starts). */ +@Component({ + template: ` + + + + `, +}) +export class ShareInfoModalComponent { + magicLink = '' + pin = '' + copied = '' + + constructor(public readonly modal: NgbActiveModal) {} + + copy(text: string, what: string): void { + if (navigator.clipboard) { + void navigator.clipboard.writeText(text) + } + this.copied = what + } +} diff --git a/clients/tabby/src/host/shareController.ts b/clients/tabby/src/host/shareController.ts new file mode 100644 index 0000000..a4a0adc --- /dev/null +++ b/clients/tabby/src/host/shareController.ts @@ -0,0 +1,169 @@ +/** + * Host side of a shared session. Deliberately Tabby-agnostic: it drives a SessionTransport and a + * small HostTerminal port, so it is fully unit-testable with mocks. PeershellService adapts a real + * Tabby BaseTerminalTabComponent to HostTerminal. + * + * Flow: connect -> create session -> guest joins -> PIN challenge-response (rate-limited) -> on + * pin-ok send the snapshot, wait for snapshot-ack (barrier), then mirror output and inject input. + * Input frames are ignored until the guest is authenticated. + */ +import { Observable, Subscription } from 'rxjs' +import { + SessionTransport, ControlMessage, Channel, SINGLE_PEER, utf8ToBase64, + generateNonce, verifyPin, +} from '@peershell/protocol' + +const MAX_PIN_ATTEMPTS = 5 + +/** Port the controller needs from the host terminal (adapted from Tabby's tab). */ +export interface HostTerminal { + readonly output$: Observable + sendInput(data: Uint8Array): void + getSize(): { cols: number, rows: number } + readonly resize$: Observable<{ cols: number, rows: number }> + snapshot(): string + readonly closed$: Observable +} + +export interface ShareHandle { room: string, magicLink: string } + +export interface ShareHooks { + onSession?: (h: ShareHandle) => void + onPeerJoined?: () => void + onAuthenticated?: () => void + onPinFailed?: () => void + onPeerLeft?: (reason?: string) => void + onError?: (code: string, message?: string) => void +} + +export class ShareController { + room: string | null = null + magicLink: string | null = null + + private subs = new Subscription() + private streaming = false + private authenticated = false + private peerId = SINGLE_PEER + private stopped = false + private nonce = '' + private attemptsLeft = MAX_PIN_ATTEMPTS + + constructor( + private readonly transport: SessionTransport, + private readonly tab: HostTerminal, + private readonly pin: string, + private readonly hooks: ShareHooks = {}, + ) {} + + async start(serverUrl: string, token?: string): Promise { + this.transport.onControl(m => this.onControl(m)) + this.transport.onBinary(f => { + // Reject any input until the guest has passed the PIN. + if (f.channel === Channel.Input && this.authenticated) { + this.tab.sendInput(f.data) + } + }) + this.subs.add(this.tab.closed$.subscribe(() => this.stop('host-ended'))) + + await this.transport.connect(serverUrl, token) + this.transport.sendControl({ t: 'hello', role: 'host', kind: 'desktop', client: 'tabby-peershell' }) + this.transport.sendControl({ t: 'create-session' }) + } + + private onControl(m: ControlMessage): void { + switch (m.t) { + case 'session-created': + this.room = m.room + this.magicLink = m.magicLink + this.hooks.onSession?.({ room: m.room, magicLink: m.magicLink }) + break + case 'peer-joined': + this.peerId = m.peerId ?? SINGLE_PEER + this.authenticated = false + this.attemptsLeft = MAX_PIN_ATTEMPTS + this.hooks.onPeerJoined?.() + this.challenge() + break + case 'pin-response': + void this.verifyResponse(m.hash) + break + case 'snapshot-ack': + this.beginStream() + break + case 'peer-left': + this.streaming = false + this.authenticated = false + this.hooks.onPeerLeft?.(m.reason) + break + case 'error': + this.hooks.onError?.(m.code, m.message) + break + default: + break + } + } + + private challenge(): void { + this.nonce = generateNonce() + this.transport.sendControl({ t: 'pin-challenge', nonce: this.nonce }) + } + + private async verifyResponse(hash: string): Promise { + const ok = await verifyPin(this.pin, this.nonce, hash) + if (ok) { + this.authenticated = true + this.transport.sendControl({ t: 'pin-ok' }) + this.hooks.onAuthenticated?.() + this.sendSnapshot() + return + } + this.attemptsLeft -= 1 + this.transport.sendControl({ t: 'pin-fail', left: this.attemptsLeft }) + if (this.attemptsLeft > 0) { + this.challenge() + } else { + this.transport.sendControl({ t: 'peer-left', reason: 'pin-failed' }) + this.hooks.onPinFailed?.() + } + } + + private sendSnapshot(): void { + const size = this.tab.getSize() + this.transport.sendControl({ + t: 'snapshot', + cols: size.cols, + rows: size.rows, + data: utf8ToBase64(this.tab.snapshot()), + }) + } + + private beginStream(): void { + if (this.streaming || this.stopped || !this.authenticated) { + return + } + this.streaming = true + this.subs.add(this.tab.output$.subscribe(data => { + if (this.streaming) { + this.transport.sendData(this.peerId, Channel.Output, data) + } + })) + this.subs.add(this.tab.resize$.subscribe(sz => { + this.transport.sendControl({ t: 'resize', cols: sz.cols, rows: sz.rows }) + })) + } + + stop(reason = 'stopped'): void { + if (this.stopped) { + return + } + this.stopped = true + if (this.room !== null) { + this.transport.sendControl({ t: 'peer-left', reason }) + this.transport.sendControl({ t: 'session-close' }) + } + this.streaming = false + this.authenticated = false + this.subs.unsubscribe() + this.transport.close(1000, reason) + } +} diff --git a/clients/tabby/src/index.ts b/clients/tabby/src/index.ts new file mode 100644 index 0000000..fe4208a --- /dev/null +++ b/clients/tabby/src/index.ts @@ -0,0 +1,51 @@ +/* eslint-disable @typescript-eslint/no-extraneous-class */ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { FormsModule } from '@angular/forms' +import { NgbModule } from '@ng-bootstrap/ng-bootstrap' +import { ToastrModule } from 'ngx-toastr' +import TabbyCorePlugin, { ConfigProvider, ToolbarButtonProvider, TabContextMenuItemProvider } from 'tabby-core' +import TabbyTerminalModule from 'tabby-terminal' +import { SettingsTabProvider } from 'tabby-settings' + +import { PROTOCOL_VERSION } from '@peershell/protocol' +import { PeershellConfigProvider } from './config' +import { PeershellService } from './services/peershell.service' +import { PeershellToolbarButtonProvider } from './providers/toolbarButtonProvider' +import { PeershellContextMenu } from './providers/tabContextMenu' +import { MirrorTabComponent } from './guest/mirrorTab.component' +import { LoginModalComponent } from './account/login-modal.component' +import { ShareInfoModalComponent } from './host/share-info-modal.component' +import { PeershellSettingsTabProvider } from './settings/settings-tab.provider' +import { PeershellSettingsTabComponent } from './settings/settings-tab.component' + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + NgbModule, + ToastrModule, + TabbyCorePlugin, + TabbyTerminalModule, + ], + providers: [ + { provide: ConfigProvider, useClass: PeershellConfigProvider, multi: true }, + { provide: ToolbarButtonProvider, useClass: PeershellToolbarButtonProvider, multi: true }, + { provide: TabContextMenuItemProvider, useClass: PeershellContextMenu, multi: true }, + { provide: SettingsTabProvider, useClass: PeershellSettingsTabProvider, multi: true }, + ], + declarations: [ + MirrorTabComponent, + LoginModalComponent, + ShareInfoModalComponent, + PeershellSettingsTabComponent, + ], +}) +export default class PeershellModule { + constructor (_peershell: PeershellService) { + // eslint-disable-next-line no-console + console.log(`[peershell] plugin loaded — protocol v${PROTOCOL_VERSION}`) + } +} + +export { PeershellService } diff --git a/clients/tabby/src/providers/tabContextMenu.ts b/clients/tabby/src/providers/tabContextMenu.ts new file mode 100644 index 0000000..0371ae1 --- /dev/null +++ b/clients/tabby/src/providers/tabContextMenu.ts @@ -0,0 +1,32 @@ +import { Injectable } from '@angular/core' +import { BaseTabComponent, TabContextMenuItemProvider, MenuItemOptions } from 'tabby-core' +import { BaseTerminalTabComponent } from 'tabby-terminal' + +import { PeershellService } from '../services/peershell.service' + +@Injectable() +export class PeershellContextMenu extends TabContextMenuItemProvider { + weight = 5 + + constructor(private readonly peershell: PeershellService) { + super() + } + + async getItems(tab: BaseTabComponent, tabHeader?: boolean): Promise { + if (tabHeader || !(tab instanceof BaseTerminalTabComponent)) { + return [] + } + if (this.peershell.isSharing(tab)) { + return [{ + label: 'Stop sharing (peershell)', + click: () => this.peershell.stopSharing(tab), + }] + } + return [{ + label: 'Share this terminal (peershell)', + click: () => { + void this.peershell.startSharing(tab) + }, + }] + } +} diff --git a/clients/tabby/src/providers/toolbarButtonProvider.ts b/clients/tabby/src/providers/toolbarButtonProvider.ts new file mode 100644 index 0000000..0f7d013 --- /dev/null +++ b/clients/tabby/src/providers/toolbarButtonProvider.ts @@ -0,0 +1,28 @@ +import { Injectable } from '@angular/core' +import { ToolbarButtonProvider, ToolbarButton } from 'tabby-core' + +import { PeershellService } from '../services/peershell.service' + +const SHARE_ICON = ` + +` + +@Injectable() +export class PeershellToolbarButtonProvider extends ToolbarButtonProvider { + constructor(private readonly peershell: PeershellService) { + super() + } + + provide(): ToolbarButton[] { + return [ + { + icon: SHARE_ICON, + title: 'peershell', + weight: 10, + click: () => { + this.peershell.openMenu() + }, + }, + ] + } +} diff --git a/clients/tabby/src/services/peershell.service.ts b/clients/tabby/src/services/peershell.service.ts new file mode 100644 index 0000000..4e8b8d2 --- /dev/null +++ b/clients/tabby/src/services/peershell.service.ts @@ -0,0 +1,315 @@ +import { Injectable } from '@angular/core' +import { map } from 'rxjs' +import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { AppService, ConfigService, NotificationsService, BaseTabComponent, SplitTabComponent, PromptModalComponent, PlatformService } from 'tabby-core' +import { BaseTerminalTabComponent, ResizeEvent } from 'tabby-terminal' +import { + WebSocketTransport, normalizeRoomCode, isValidRoomCode, generatePin, PinProvider, HttpTunnelHandler, +} from '@peershell/protocol' + +import { ShareController, HostTerminal } from '../host/shareController' +import { MirrorTabComponent } from '../guest/mirrorTab.component' +import { AccountService } from '../account/account.service' +import { LoginModalComponent } from '../account/login-modal.component' +import { ShareInfoModalComponent } from '../host/share-info-modal.component' +import webClientHtml from '../../assets/web-client.html' + +/** Owns the active host shares and adapts a Tabby terminal tab to the transport-driven controller. */ +@Injectable({ providedIn: 'root' }) +export class PeershellService { + private readonly shares = new Map() + + constructor( + private readonly app: AppService, + private readonly config: ConfigService, + private readonly notifications: NotificationsService, + private readonly ngbModal: NgbModal, + private readonly account: AccountService, + private readonly platform: PlatformService, + ) {} + + isSharing(tab: BaseTabComponent): boolean { + return tab instanceof BaseTerminalTabComponent && this.shares.has(tab) + } + + /** + * The terminal to act on in the active tab (SplitTabComponent-aware). Prefers the focused pane, but + * getFocusedTab() can be null (e.g. focus moved to the toolbar), so fall back to the tab's terminals. + */ + private focusedTerminal(): BaseTerminalTabComponent | null { + const active = this.app.activeTab + if (active instanceof SplitTabComponent) { + const focused = active.getFocusedTab() + if (focused instanceof BaseTerminalTabComponent) { + return focused + } + const terms = active.getAllTabs().filter( + (t): t is BaseTerminalTabComponent => t instanceof BaseTerminalTabComponent) + // Prefer one that is currently shared; otherwise the first terminal in the tab. + return terms.find(t => this.shares.has(t)) ?? terms[0] ?? null + } + return active instanceof BaseTerminalTabComponent ? active : null + } + + async shareActive(): Promise { + const tab = this.focusedTerminal() + if (tab) { + await this.startSharing(tab) + } else { + this.notifications.error('peershell: focus a terminal tab to share it') + } + } + + /** Stop sharing the focused terminal, if it is currently shared. */ + stopActive(): void { + const tab = this.focusedTerminal() + if (tab && this.shares.has(tab)) { + this.stopSharing(tab) + } else { + this.notifications.notice('peershell: this terminal is not being shared') + } + } + + async startSharing(tab: BaseTerminalTabComponent): Promise { + if (this.shares.has(tab)) { + return + } + if (!(await this.confirmDisclaimer())) { + return + } + const serverUrl: string | null = this.config.store.peershell?.serverUrl + if (!serverUrl) { + this.notifications.error('peershell: set the server URL in settings first') + return + } + + // Sharing is gated behind a logged-in account: the account token authenticates the outbound + // connection so the server accepts create-session (open servers must not let anyone share). + let token = this.account.getToken() + if (!token) { + token = await this.openLogin() + if (!token) { + this.notifications.error('peershell: log in to share a terminal') + return + } + } + + // Per-session PIN, generated locally and shown to the host. Never sent to the server in + // cleartext (challenge-response only). The host shares it with the intended guest out-of-band. + const pin = generatePin(6) + const transport = new WebSocketTransport() + // Serve the embedded web-client to browsers opening the magic-link, tunneled over this same + // outbound connection. Path is whitelisted inside HttpTunnelHandler (only '/'). + // eslint-disable-next-line no-new + new HttpTunnelHandler(transport, () => webClientHtml) + // Grace window: a guest disconnect (closed tab or a brief network blip) does not kill the share + // immediately — wait ~10s for a reconnect before tearing it down. + let graceTimer: ReturnType | null = null + // Auto-kill a share that never gets a connected guest within 5 minutes of starting. + let established = false + let establishTimer: ReturnType | null = null + const controller = new ShareController(transport, this.adapt(tab), pin, { + onSession: h => { + const modal = this.ngbModal.open(ShareInfoModalComponent, { backdrop: 'static', size: 'lg' }) + modal.componentInstance.magicLink = h.magicLink + modal.componentInstance.pin = pin + }, + onPeerJoined: () => { + if (graceTimer) { + clearTimeout(graceTimer) + graceTimer = null + this.notifications.notice('peershell: guest reconnected') + } + }, + onAuthenticated: () => { + established = true + if (establishTimer) { + clearTimeout(establishTimer) + establishTimer = null + } + this.notifications.notice('peershell: guest connected') + }, + onPinFailed: () => this.notifications.error('peershell: guest failed the PIN'), + onPeerLeft: () => { + if (graceTimer) { + return + } + this.notifications.notice('peershell: guest disconnected — closing in 10s unless they reconnect') + graceTimer = setTimeout(() => { + graceTimer = null + this.stopSharing(tab, 'peershell: guest gone — sharing stopped') + }, 10000) + }, + onError: (code, message) => { + if (code === 'unauthorized') { + void this.account.clearLocal() + this.notifications.error('peershell: session expired — log in and share again') + } else { + this.notifications.error(`peershell: ${code}`, message) + } + }, + }) + + this.shares.set(tab, controller) + tab.destroyed$.subscribe(() => this.shares.delete(tab)) + establishTimer = setTimeout(() => { + if (!established) { + this.notifications.error('peershell: no one connected in time — sharing stopped') + this.stopSharing(tab) + } + }, 300000) + + try { + await controller.start(serverUrl, token) + } catch (err) { + if (establishTimer) { + clearTimeout(establishTimer) + establishTimer = null + } + this.shares.delete(tab) + this.notifications.error('peershell: could not connect to the server', String(err)) + } + } + + async joinShared(): Promise { + const serverUrl: string | null = this.config.store.peershell?.serverUrl + if (!serverUrl) { + this.notifications.error('peershell: set the server URL in settings first') + return + } + const room = await this.promptRoom() + if (!room) { + return + } + const transport = new WebSocketTransport() + try { + await transport.connect(serverUrl) + } catch (err) { + this.notifications.error('peershell: could not connect to the server', String(err)) + return + } + const pinProvider: PinProvider = () => this.promptPin() + this.app.openNewTab({ + type: MirrorTabComponent, + inputs: { + transport, + room, + pinProvider, + profile: { name: `peershell: ${room}`, type: 'peershell-mirror', options: {} }, + }, + }) + } + + private async promptRoom(): Promise { + const modal = this.ngbModal.open(PromptModalComponent) + modal.componentInstance.prompt = 'Room code' + const result = await modal.result.catch(() => null) + const value: string | undefined = result?.value + if (!value) { + return null + } + const room = normalizeRoomCode(value) + if (!isValidRoomCode(room)) { + this.notifications.error('peershell: invalid room code') + return null + } + return room + } + + private async promptPin(): Promise { + const modal = this.ngbModal.open(PromptModalComponent) + modal.componentInstance.prompt = 'Session PIN' + modal.componentInstance.password = true + const result = await modal.result.catch(() => null) + const value: string | undefined = result?.value + return value ? value.trim() : null + } + + /** + * One-time no-E2E disclosure before the first share: guests get a read-write shell and the relay + * sees traffic in clear text. Acknowledged once, remembered in config. + */ + private async confirmDisclaimer(): Promise { + if (this.config.store.peershell?.disclaimerAck) { + return true + } + const r = await this.platform.showMessageBox({ + type: 'warning', + message: 'Share this terminal with peershell?', + detail: 'Guests get full read-write access to this shell. The relay server sees all terminal ' + + 'traffic in clear text — there is no end-to-end encryption yet. Do not share sensitive ' + + 'sessions on a server you do not trust; self-host the server in production.', + buttons: ['Share', 'Cancel'], + defaultId: 1, + cancelId: 1, + }) + if (r.response === 0) { + this.config.store.peershell.disclaimerAck = true + await this.config.save() + return true + } + return false + } + + /** Toolbar entry: pops a native dropdown menu with the peershell actions. */ + openMenu(): void { + if (!this.account.isLoggedIn()) { + this.platform.popupContextMenu([ + { label: 'Log in', click: () => { this.openAccount() } }, + ]) + return + } + const term = this.focusedTerminal() + const sharing = !!term && this.shares.has(term) + this.platform.popupContextMenu([ + sharing + ? { label: 'Stop sharing this terminal', click: () => { this.stopActive() } } + : { label: 'Share this terminal', click: () => { void this.shareActive() } }, + { label: 'Join a shared terminal', click: () => { void this.joinShared() } }, + { type: 'separator' }, + { label: `Log out (${this.account.email})`, click: () => { void this.logout() } }, + ]) + } + + /** Opens the account modal (login / register / 2FA / password reset). */ + openAccount(): void { + this.ngbModal.open(LoginModalComponent) + } + + async logout(): Promise { + await this.account.logout() + this.notifications.notice('peershell: logged out') + } + + /** Opens the login modal, resolving with the bearer token on success or null if cancelled. */ + private async openLogin(): Promise { + const modal = this.ngbModal.open(LoginModalComponent) + return await modal.result.catch(() => null) + } + + stopSharing(tab: BaseTerminalTabComponent, note = 'peershell: sharing stopped'): void { + const controller = this.shares.get(tab) + if (controller) { + controller.stop('stopped') + this.shares.delete(tab) + this.notifications.notice(note) + } + } + + private adapt(tab: BaseTerminalTabComponent): HostTerminal { + return { + output$: tab.binaryOutput$.pipe(map((b: Buffer) => new Uint8Array(b))), + sendInput: (data: Uint8Array) => tab.sendInput(Buffer.from(data)), + getSize: () => ({ cols: tab.size?.columns ?? 80, rows: tab.size?.rows ?? 24 }), + resize$: tab.resize$.pipe(map((e: ResizeEvent) => ({ cols: e.columns, rows: e.rows }))), + snapshot: () => { + try { + return String(tab.frontend?.saveState() ?? '') + } catch { + return '' + } + }, + closed$: tab.destroyed$, + } + } +} diff --git a/clients/tabby/src/settings/settings-tab.component.ts b/clients/tabby/src/settings/settings-tab.component.ts new file mode 100644 index 0000000..219c5f0 --- /dev/null +++ b/clients/tabby/src/settings/settings-tab.component.ts @@ -0,0 +1,115 @@ +import { Component } from '@angular/core' +import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { ConfigService } from 'tabby-core' +import { AccountService } from '../account/account.service' +import { LoginModalComponent } from '../account/login-modal.component' + +interface LiveSession { room: string, magicLink: string, hasGuest: boolean, createdAt: number, live?: boolean } + +/** peershell settings tab: server URL, account (login/logout), live-shares dashboard, security note. */ +@Component({ + template: ` +
+

peershell

+
+ No end-to-end encryption yet: the relay server sees all terminal traffic in clear text, and + guests get a full read-write shell. Do not share sensitive sessions on a server you do not + trust; self-host the server in production. Access needs both the magic-link and the per-session PIN. +
+
+ +
+
Server URL
+
Rendezvous server, e.g. wss://panel.peershell.dev
+ +
+ +
+
Account
+
{{ account.isLoggedIn() ? ('Signed in as ' + account.email) : 'Not signed in' }}
+
+ + +
+
+ +
+
+

Active shares

+ +
+
{{ error }}
+

No live shares.

+ + + + + + + + + +
RoomGuestMagic-link
{{ s.room }}{{ s.hasGuest ? 'connected' : '—' }}{{ s.magicLink }}
+
+ `, +}) +export class PeershellSettingsTabComponent { + serverUrl = '' + sessions: LiveSession[] = [] + busy = false + loaded = false + error = '' + + constructor( + private readonly config: ConfigService, + private readonly ngbModal: NgbModal, + readonly account: AccountService, + ) { + this.serverUrl = this.config.store.peershell?.serverUrl ?? '' + if (this.account.isLoggedIn()) { + void this.refresh() + } + } + + async saveServerUrl(): Promise { + this.config.store.peershell.serverUrl = this.serverUrl.trim() || null + await this.config.save() + } + + async openLogin(): Promise { + const modal = this.ngbModal.open(LoginModalComponent) + await modal.result.catch(() => null) + if (this.account.isLoggedIn()) { + await this.refresh() + } + } + + async logout(): Promise { + this.busy = true + try { + await this.account.logout() + this.sessions = [] + this.loaded = false + } finally { + this.busy = false + } + } + + async refresh(): Promise { + this.busy = true + this.error = '' + try { + const r = await this.account.getSessions() + if (r.error) { + this.error = r.error === 'unauthorized' ? 'Session expired — log in again.' : `Could not load shares (${r.error}).` + this.sessions = [] + } else { + this.sessions = (r.sessions as LiveSession[]).filter(s => s.live !== false) + } + this.loaded = true + } finally { + this.busy = false + } + } +} diff --git a/clients/tabby/src/settings/settings-tab.provider.ts b/clients/tabby/src/settings/settings-tab.provider.ts new file mode 100644 index 0000000..8508d25 --- /dev/null +++ b/clients/tabby/src/settings/settings-tab.provider.ts @@ -0,0 +1,15 @@ +import { Injectable } from '@angular/core' +import { SettingsTabProvider } from 'tabby-settings' + +import { PeershellSettingsTabComponent } from './settings-tab.component' + +@Injectable() +export class PeershellSettingsTabProvider extends SettingsTabProvider { + id = 'peershell' + icon = 'share-nodes' + title = 'peershell' + + getComponentType(): any { + return PeershellSettingsTabComponent + } +} diff --git a/clients/tabby/src/types/tabby.d.ts b/clients/tabby/src/types/tabby.d.ts new file mode 100644 index 0000000..5ef7801 --- /dev/null +++ b/clients/tabby/src/types/tabby.d.ts @@ -0,0 +1,176 @@ +/** + * Minimal ambient type shims for the Tabby host packages we import. Lets the plugin build + * without compiling Tabby's full source tree (or installing all of Tabby's deps): the real + * implementations are provided by Tabby at runtime (these modules are webpack externals). + * Extend these declarations as later stages use more of the Tabby API. + */ +declare module '*.html' { + const content: string + export default content +} + +declare module 'tabby-core' { + import { Observable } from 'rxjs' + + const _default: any + export default _default + + export type Logger = any + + export class LogService { + create(name: string): Logger + } + + export abstract class BaseTabComponent { + get destroyed$(): Observable + subscribeUntilDestroyed(observable: Observable, callback: (value: T) => void): void + } + + export class SplitTabComponent extends BaseTabComponent { + getFocusedTab(): BaseTabComponent | null + getAllTabs(): BaseTabComponent[] + } + + export interface ToolbarButton { + icon?: string + title: string + weight?: number + click?: () => void + submenu?: () => Promise + } + + export abstract class ToolbarButtonProvider { + abstract provide(): ToolbarButton[] + } + + export interface MenuItemOptions { + label?: string + click?: () => void + type?: string + enabled?: boolean + submenu?: MenuItemOptions[] + } + + export abstract class TabContextMenuItemProvider { + weight: number + abstract getItems(tab: BaseTabComponent, tabHeader?: boolean): Promise + } + + export abstract class ConfigProvider { + defaults?: unknown + platformDefaults?: unknown + } + + export class ConfigService { + store: any + save(): Promise + } + + export interface NewTabParameters { + type: any + inputs?: Record + } + + export class AppService { + get activeTab(): BaseTabComponent | null + openNewTab(params: NewTabParameters): T + } + + export class NotificationsService { + notice(text: string): void + info(text: string, details?: string): void + error(text: string, details?: string): void + } + + export class PromptModalComponent { + prompt: string + value: string + password: boolean + } + + export interface MessageBoxOptions { + type?: string + message: string + detail?: string + buttons?: string[] + defaultId?: number + cancelId?: number + } + + export interface MessageBoxResult { + response: number + checkboxChecked?: boolean + } + + export class PlatformService { + showMessageBox(options: MessageBoxOptions): Promise + popupContextMenu(menu: MenuItemOptions[], event?: MouseEvent): void + } +} + +declare module 'tabby-settings' { + const _default: any + export default _default + + export abstract class SettingsTabProvider { + id: string + icon: string + title: string + abstract getComponentType(): unknown + } +} + +declare module 'tabby-terminal' { + import { Observable } from 'rxjs' + import { BaseTabComponent } from 'tabby-core' + + const _default: any + export default _default + + export interface ResizeEvent { columns: number, rows: number } + + export class UTF8SplitterMiddleware { + constructor() + } + + export abstract class BaseSession { + open: boolean + readonly middleware: { push(middleware: unknown): void } + constructor(logger: unknown) + protected emitOutput(data: Buffer): void + feedFromTerminal(data: Buffer): void + releaseInitialDataBuffer(): void + destroy(): Promise + get closed$(): Observable + get destroyed$(): Observable + abstract start(options: unknown): Promise + abstract resize(columns: number, rows: number): void + abstract write(data: Buffer): void + abstract kill(signal?: string): void + abstract gracefullyKillProcess(): Promise + abstract supportsWorkingDirectory(): boolean + abstract getWorkingDirectory(): Promise + } + + export abstract class BaseTerminalTabComponent

extends BaseTabComponent { + static template: any + static styles: any + static animations: any + protected injector: any + profile: P + session: BaseSession | null + size: ResizeEvent + frontend?: any + protected log: { create(name: string): any } + protected logger: any + protected config: { store: any } + constructor(injector: any) + setSession(session: BaseSession | null, destroyOnSessionClose?: boolean): void + sendInput(data: string | Buffer): void + get binaryOutput$(): Observable + get resize$(): Observable + protected onFrontendReady(): void + ngOnInit(): void + ngOnDestroy(): void + } +} diff --git a/clients/tabby/test/hostGuest.integration.test.ts b/clients/tabby/test/hostGuest.integration.test.ts new file mode 100644 index 0000000..d140802 --- /dev/null +++ b/clients/tabby/test/hostGuest.integration.test.ts @@ -0,0 +1,119 @@ +/** + * End-to-end interop of the two real controllers through the throwaway relay: ShareController (host, + * driving a mock terminal) <-> dev relay <-> MirrorController (guest, driving a mock sink). Verifies + * the PIN handshake, snapshot delivery + ack barrier, live output host->guest, and input guest->host. + */ +import WebSocket from 'ws' +import { Subject } from 'rxjs' +import { WebSocketTransport, WebSocketCtor, MirrorController, MirrorSink } from '@peershell/protocol' +import { ShareController, HostTerminal } from '../src/host/shareController' + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { startRelay } = require('../../../server/src/index.cjs') as { + startRelay: (port?: number, opts?: any) => Promise<{ url: string, close: () => Promise }> +} + +const WS = WebSocket as unknown as WebSocketCtor +const enc = (s: string) => new TextEncoder().encode(s) +const dec = (b: Uint8Array) => new TextDecoder().decode(b) +const PIN = '246810' + +function waitFor(pred: () => boolean, timeoutMs = 12000): Promise { + return new Promise((resolve, reject) => { + const iv = setInterval(() => { + if (pred()) { + clearInterval(iv) + clearTimeout(to) + resolve() + } + }, 10) + const to = setTimeout(() => { + clearInterval(iv) + reject(new Error('waitFor timed out')) + }, timeoutMs) + }) +} + +let relay: { url: string, close: () => Promise } +beforeAll(async () => { relay = await startRelay(0, { requireAuth: false }) }) +afterAll(async () => { await relay.close() }) + +function hostTerminal(output$: Subject, inputs: Uint8Array[]): HostTerminal { + return { + output$, + resize$: new Subject<{ cols: number, rows: number }>(), + closed$: new Subject(), + sendInput: d => inputs.push(d), + getSize: () => ({ cols: 111, rows: 33 }), + snapshot: () => 'SNAPSHOT-VT', + } +} + +it('PIN handshake, then mirrors snapshot + live output host->guest and input guest->host', async () => { + const hostTransport = new WebSocketTransport(WS) + const guestTransport = new WebSocketTransport(WS) + const output$ = new Subject() + const inputs: Uint8Array[] = [] + + const emits: Uint8Array[] = [] + let hostResize: { cols: number, rows: number } | null = null + let sawLive = false + const sink: MirrorSink = { + emit: d => { + emits.push(d) + if (dec(d).includes('LIVE')) { + sawLive = true + } + }, + hostResize: (cols, rows) => { hostResize = { cols, rows } }, + ended: () => { /* noop */ }, + } + const guest = new MirrorController(guestTransport, sink, async () => PIN) + const host = new ShareController(hostTransport, hostTerminal(output$, inputs), PIN, { + onSession: ({ room }) => guest.join({ room }), + }) + + await guestTransport.connect(relay.url) + await host.start(relay.url) + + const pump = setInterval(() => output$.next(enc('LIVE\r\n')), 15) + await waitFor(() => sawLive) + clearInterval(pump) + + guest.writeInput(enc('typed-by-guest\n')) + await waitFor(() => inputs.some(i => dec(i).includes('typed-by-guest'))) + + expect(dec(emits[0])).toBe('SNAPSHOT-VT') + expect(hostResize).toEqual({ cols: 111, rows: 33 }) + expect(emits.some(e => dec(e).includes('LIVE'))).toBe(true) + + host.stop('done') + guest.close() +}, 15000) + +it('a wrong PIN never streams and ends the guest', async () => { + const hostTransport = new WebSocketTransport(WS) + const guestTransport = new WebSocketTransport(WS) + const output$ = new Subject() + const inputs: Uint8Array[] = [] + + let endedReason: string | null = null + const sink: MirrorSink = { + emit: () => { /* should never receive a snapshot/output */ }, + hostResize: () => { /* noop */ }, + ended: reason => { endedReason = reason }, + } + const guest = new MirrorController(guestTransport, sink, async () => 'wrong-pin') + const host = new ShareController(hostTransport, hostTerminal(output$, inputs), PIN, { + onSession: ({ room }) => guest.join({ room }), + }) + + await guestTransport.connect(relay.url) + await host.start(relay.url) + + await waitFor(() => endedReason !== null) + expect(endedReason).toBe('wrong PIN') + + host.stop('done') + guest.close() +}, 15000) diff --git a/clients/tabby/test/shareController.test.ts b/clients/tabby/test/shareController.test.ts new file mode 100644 index 0000000..b5a80e9 --- /dev/null +++ b/clients/tabby/test/shareController.test.ts @@ -0,0 +1,155 @@ +import { Subject } from 'rxjs' +import { + SessionTransport, ControlMessage, BinaryPayload, Channel, TransportState, base64ToUtf8, hashPin, +} from '@peershell/protocol' +import { ShareController, HostTerminal } from '../src/host/shareController' + +const PIN = '135790' + +class MockTransport implements SessionTransport { + sentControl: ControlMessage[] = [] + sentData: Array<{ peerId: number, channel: Channel, data: Uint8Array }> = [] + closed = false + private controlCb?: (m: ControlMessage) => void + private binaryCb?: (f: BinaryPayload) => void + + connect(): Promise { + return Promise.resolve() + } + sendControl(m: ControlMessage): void { + this.sentControl.push(m) + } + sendData(peerId: number, channel: Channel, data: Uint8Array): void { + this.sentData.push({ peerId, channel, data }) + } + close(): void { + this.closed = true + } + onControl(cb: (m: ControlMessage) => void): void { + this.controlCb = cb + } + onBinary(cb: (f: BinaryPayload) => void): void { + this.binaryCb = cb + } + onState(_cb: (s: TransportState) => void): void { /* unused */ } + + emitControl(m: ControlMessage): void { + this.controlCb?.(m) + } + emitBinary(f: BinaryPayload): void { + this.binaryCb?.(f) + } + controlTypes(): string[] { + return this.sentControl.map(c => c.t) + } + last(t: T): Extract | undefined { + return [...this.sentControl].reverse().find(c => c.t === t) as never + } +} + +function mockTab() { + const output$ = new Subject() + const resize$ = new Subject<{ cols: number, rows: number }>() + const closed$ = new Subject() + const inputs: Uint8Array[] = [] + const tab: HostTerminal = { + output$, + resize$, + closed$, + sendInput: d => inputs.push(d), + getSize: () => ({ cols: 80, rows: 24 }), + snapshot: () => 'SNAPSHOT', + } + return { tab, output$, resize$, closed$, inputs } +} + +function waitUntil(pred: () => boolean, ms = 2000): Promise { + return new Promise((resolve, reject) => { + const iv = setInterval(() => { + if (pred()) { + clearInterval(iv) + clearTimeout(to) + resolve() + } + }, 5) + const to = setTimeout(() => { + clearInterval(iv) + reject(new Error('waitUntil timeout')) + }, ms) + }) +} + +async function respond(t: MockTransport, nonce: string, pin: string): Promise { + t.emitControl({ t: 'pin-response', hash: await hashPin(pin, nonce) }) +} + +it('gates on PIN (rate-limited), then mirrors output after snapshot-ack and injects input', async () => { + const t = new MockTransport() + const m = mockTab() + const c = new ShareController(t, m.tab, PIN) + + await c.start('ws://relay') + expect(t.controlTypes()).toEqual(['hello', 'create-session']) + + t.emitControl({ t: 'session-created', room: 'ABC234', magicLink: 'http://x/s/tok' }) + expect(c.room).toBe('ABC234') + + t.emitControl({ t: 'peer-joined', peerId: 0, kind: 'web' }) + const chal = t.last('pin-challenge') + expect(chal).toBeTruthy() + + // Wrong PIN -> pin-fail{left:4} + a fresh challenge; input still rejected. + await respond(t, chal!.nonce, '000000') + await waitUntil(() => t.sentControl.some(x => x.t === 'pin-fail')) + expect(t.last('pin-fail')!.left).toBe(4) + t.emitBinary({ peerId: 0, channel: Channel.Input, data: new Uint8Array([1]) }) + expect(m.inputs).toHaveLength(0) + + // Correct PIN on the new challenge -> pin-ok + snapshot. + await respond(t, t.last('pin-challenge')!.nonce, PIN) + await waitUntil(() => t.sentControl.some(x => x.t === 'snapshot')) + expect(t.sentControl.some(x => x.t === 'pin-ok')).toBe(true) + expect(base64ToUtf8(t.last('snapshot')!.data)).toBe('SNAPSHOT') + + // Barrier: no output before ack. + m.output$.next(new Uint8Array([9])) + expect(t.sentData).toHaveLength(0) + + t.emitControl({ t: 'snapshot-ack' }) + m.output$.next(new Uint8Array([9, 9])) + expect(t.sentData).toHaveLength(1) + expect(Array.from(t.sentData[0].data)).toEqual([9, 9]) + + // Authenticated: input now accepted. + t.emitBinary({ peerId: 0, channel: Channel.Input, data: new Uint8Array([108, 115]) }) + expect(Array.from(m.inputs[0])).toEqual([108, 115]) +}) + +it('kicks the peer after exhausting PIN attempts', async () => { + const t = new MockTransport() + const m = mockTab() + const c = new ShareController(t, m.tab, PIN) + await c.start('ws://relay') + t.emitControl({ t: 'session-created', room: 'ABC234', magicLink: 'http://x' }) + t.emitControl({ t: 'peer-joined', peerId: 0, kind: 'web' }) + + for (let i = 0; i < 5; i++) { + await respond(t, t.last('pin-challenge')!.nonce, '999999') + await waitUntil(() => t.sentControl.filter(x => x.t === 'pin-fail').length === i + 1) + } + expect(t.last('pin-fail')!.left).toBe(0) + expect(t.sentControl.some(x => x.t === 'peer-left' && x.reason === 'pin-failed')).toBe(true) + expect(c['authenticated']).toBe(false) +}) + +it('tears down on tab close', async () => { + const t = new MockTransport() + const m = mockTab() + const c = new ShareController(t, m.tab, PIN) + await c.start('ws://relay') + t.emitControl({ t: 'session-created', room: 'ABC234', magicLink: 'http://x' }) + + m.closed$.next() + expect(t.closed).toBe(true) + expect(t.controlTypes()).toEqual(expect.arrayContaining(['peer-left', 'session-close'])) +}) diff --git a/clients/tabby/test/smoke-load.cjs b/clients/tabby/test/smoke-load.cjs new file mode 100644 index 0000000..7138f31 --- /dev/null +++ b/clients/tabby/test/smoke-load.cjs @@ -0,0 +1,45 @@ +// Stage 0+ smoke test: load the built UMD bundle the way Tabby would (nodeRequire) with the +// externalized host packages (@angular, tabby-*, rxjs, ...) generically stubbed, and instantiate +// the default NgModule. Confirms the bundle is valid, @peershell/protocol is inlined, decorators +// apply, and the plugin constructs (logs) without a real Tabby. Full GUI verification happens by +// loading dist/ into a real Tabby (see README). +const Module = require('module') +const path = require('path') + +// A generic stub: any property access yields another stub; calling it (decorator factory) returns +// an identity decorator; `new`-ing it or `extends`-ing it works. +function makeStub() { + const f = function () {} + return new Proxy(f, { + get: (_t, p) => (typeof p === 'symbol' ? undefined : makeStub()), + apply: () => (target) => target, + construct: () => ({}), + }) +} + +const EXTERNAL_PREFIXES = ['@angular/', 'tabby-', 'rxjs', 'ngx-toastr', '@ng-bootstrap'] +const isExternal = req => EXTERNAL_PREFIXES.some(p => req === p || req.startsWith(p)) + +const origLoad = Module._load +Module._load = function (request, parent, isMain) { + if (isExternal(request)) { + return makeStub() + } + return origLoad.call(this, request, parent, isMain) +} + +const bundle = require(path.resolve(__dirname, '..', 'dist', 'index.js')) +const PluginModule = bundle.default || bundle + +if (typeof PluginModule !== 'function') { + console.error('FAIL: default export is not a class/function:', typeof PluginModule) + process.exit(1) +} + +const instance = new PluginModule() +if (!instance) { + console.error('FAIL: could not instantiate the plugin module') + process.exit(1) +} + +console.log('PASS: bundle loaded and PeershellModule instantiated:', PluginModule.name || '(anonymous)') diff --git a/clients/tabby/tsconfig.json b/clients/tabby/tsconfig.json new file mode 100644 index 0000000..8eaaf92 --- /dev/null +++ b/clients/tabby/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es2015", + "target": "es2016", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "strictNullChecks": true, + "noImplicitReturns": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "importHelpers": true, + "sourceMap": true, + "baseUrl": ".", + "lib": ["DOM", "ES2019", "ES2020"], + "paths": { + "@peershell/protocol": ["../../shared/src"] + } + }, + "angularCompilerOptions": { + "strictTemplates": true, + "enableResourceInlining": true, + "strictInjectionParameters": true + }, + "include": ["src"] +} diff --git a/clients/tabby/webpack.config.mjs b/clients/tabby/webpack.config.mjs new file mode 100644 index 0000000..5dea8f0 --- /dev/null +++ b/clients/tabby/webpack.config.mjs @@ -0,0 +1,132 @@ +// Self-contained plugin build. Mirrors Tabby's webpack.plugin.config.mjs but imports the toolchain +// from THIS repo's node_modules (the /opt/tabby checkout is source-only, not installed), and bundles +// our own code + @peershell/protocol (+ xterm later). Angular/RxJS/@ng-bootstrap/ngx-toastr/tabby-* +// are externalized: Tabby provides them at runtime. +import * as fs from 'fs' +import * as path from 'path' +import * as url from 'url' +import wp from 'webpack' +import { AngularWebpackPlugin } from '@ngtools/webpack' +import { createEs2015LinkerPlugin } from '@angular/compiler-cli/linker/babel' + +const __dirname = url.fileURLToPath(new URL('.', import.meta.url)) +const root = path.resolve(__dirname, '..', '..') + +const linkerPlugin = createEs2015LinkerPlugin({ + linkerJitMode: true, + fileSystem: { + resolve: path.resolve, + exists: fs.existsSync, + dirname: path.dirname, + relative: path.relative, + readFile: fs.readFileSync, + }, +}) + +export default () => { + const isDev = !!process.env.TABBY_DEV + return { + target: 'node', + entry: path.resolve(__dirname, 'src/index.ts'), + context: __dirname, + mode: isDev ? 'development' : 'production', + devtool: false, + optimization: { minimize: false }, + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'index.js', + pathinfo: true, + libraryTarget: 'umd', + publicPath: 'auto', + }, + resolve: { + modules: [ + path.join(__dirname, 'src'), + path.join(__dirname, 'node_modules'), + path.join(root, 'node_modules'), + 'node_modules', + ], + extensions: ['.ts', '.js'], + mainFields: ['esm2015', 'browser', 'module', 'main'], + }, + resolveLoader: { + modules: [path.join(root, 'node_modules'), path.join(__dirname, 'node_modules'), 'node_modules'], + }, + ignoreWarnings: [/Failed to parse source map/], + module: { + rules: [ + { + test: /\.js$/, + enforce: 'pre', + use: { + loader: 'source-map-loader', + options: { + filterSourceMappingUrl: (_url, resourcePath) => { + if (/node_modules/.test(resourcePath) && !resourcePath.includes('xterm')) { + return false + } + return true + }, + }, + }, + }, + { + test: /\.(m?)js$/, + loader: 'babel-loader', + options: { + plugins: [linkerPlugin], + compact: false, + cacheDirectory: true, + }, + resolve: { fullySpecified: false }, + }, + { + test: /\.ts$/, + use: [{ loader: '@ngtools/webpack' }], + }, + { + test: /\.pug$/, + use: [ + 'apply-loader', + { loader: 'pug-loader', options: { pretty: true } }, + ], + }, + { test: /\.scss$/, use: ['@tabby-gang/to-string-loader', 'css-loader', 'sass-loader'], include: /(theme.*|component)\.scss/ }, + { test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], exclude: /(theme.*|component)\.scss/ }, + { test: /\.css$/, use: ['@tabby-gang/to-string-loader', 'css-loader'], include: /component\.css/ }, + { test: /\.css$/, use: ['style-loader', 'css-loader'], exclude: /component\.css/ }, + { test: /\.yaml$/, use: ['yaml-loader'] }, + { test: /\.svg/, use: ['svg-inline-loader'] }, + { test: /\.html$/, type: 'asset/source' }, + ], + }, + externals: [ + '@electron/remote', + 'child_process', + 'electron', + 'fs', + 'net', + 'ngx-toastr', + 'os', + 'path', + 'readline', + 'stream', + /^@angular(?!\/common\/locales)/, + /^@ng-bootstrap/, + /^rxjs/, + /^tabby-/, + ], + plugins: [ + new wp.SourceMapDevToolPlugin({ + exclude: [/node_modules/, /vendor/], + filename: '[file].map', + moduleFilenameTemplate: 'webpack-tabby-peershell:///[resource-path]', + }), + new AngularWebpackPlugin({ + tsconfig: path.resolve(__dirname, 'tsconfig.json'), + directTemplateLoading: false, + jitMode: true, + }), + ], + } +} diff --git a/clients/web/package.json b/clients/web/package.json new file mode 100644 index 0000000..31da26a --- /dev/null +++ b/clients/web/package.json @@ -0,0 +1,26 @@ +{ + "name": "@peershell/web-client", + "version": "0.1.0-beta", + "private": true, + "description": "peershell standalone browser client (xterm.js) — served by the host over the tunnel", + "license": "Apache-2.0", + "scripts": { + "build": "webpack --config ./webpack.config.mjs", + "test": "echo \"(web-client: browser E2E; logic covered by @peershell/protocol tests)\"" + }, + "dependencies": { + "@peershell/protocol": "*", + "@xterm/addon-fit": "^0.10.0", + "@xterm/xterm": "^5.5.0" + }, + "devDependencies": { + "css-loader": "^6.11.0", + "html-inline-script-webpack-plugin": "^3.2.1", + "html-webpack-plugin": "^5.6.7", + "style-loader": "^3.3.4", + "ts-loader": "^9.6.2", + "typescript": "^4.9.5", + "webpack": "^5.108.4", + "webpack-cli": "^5.1.4" + } +} diff --git a/clients/web/src/index.html b/clients/web/src/index.html new file mode 100644 index 0000000..14708fb --- /dev/null +++ b/clients/web/src/index.html @@ -0,0 +1,71 @@ + + + + + + peershell + + + +

+
connecting…
+ +
+ + + + + + + + + + + + + + + + + +
+ + + diff --git a/clients/web/src/index.ts b/clients/web/src/index.ts new file mode 100644 index 0000000..fa64fd5 --- /dev/null +++ b/clients/web/src/index.ts @@ -0,0 +1,253 @@ +import { Terminal } from '@xterm/xterm' +import { FitAddon } from '@xterm/addon-fit' +import '@xterm/xterm/css/xterm.css' +import { + WebSocketTransport, MirrorController, MirrorSink, Utf8Splitter, PinProvider, +} from '@peershell/protocol' + +const el = (id: string): HTMLElement => document.getElementById(id) as HTMLElement +const setStatus = (s: string): void => { el('status').textContent = s } + +/** Token from the magic-link path (/s/) or ?token= query. */ +function getToken(): string | null { + const m = /\/s\/([^/?#]+)/.exec(location.pathname) + if (m) { + return decodeURIComponent(m[1]) + } + return new URLSearchParams(location.search).get('token') +} + +function wsUrl(): string { + const proto = location.protocol === 'https:' ? 'wss:' : 'ws:' + return `${proto}//${location.host}` +} + +/** PIN overlay -> resolves the entered PIN (or null if cancelled). */ +function askPin(): Promise { + return new Promise(resolve => { + const overlay = el('overlay') + const input = el('overlay-input') as HTMLInputElement + const ok = el('overlay-ok') + overlay.classList.remove('hidden') + input.value = '' + input.focus() + const done = (value: string | null): void => { + overlay.classList.add('hidden') + ok.removeEventListener('click', onOk) + input.removeEventListener('keydown', onKey) + resolve(value) + } + const onOk = (): void => done(input.value.trim() || null) + const onKey = (e: KeyboardEvent): void => { + if (e.key === 'Enter') { + onOk() + } else if (e.key === 'Escape') { + done(null) + } + } + ok.addEventListener('click', onOk) + input.addEventListener('keydown', onKey) + }) +} + +async function main(): Promise { + const token = getToken() + if (!token) { + setStatus('Missing session token in the URL.') + return + } + + const term = new Terminal({ + cursorBlink: true, + fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace', + theme: { background: '#000000' }, + }) + const fit = new FitAddon() + term.loadAddon(fit) + term.open(el('terminal')) + fit.fit() + + const splitter = new Utf8Splitter() + const encoder = new TextEncoder() + const transport = new WebSocketTransport() // browser global WebSocket + + let stopped = false // host ended the session (or wrong PIN / cancelled) -> do not reconnect + let cachedPin: string | null = null + let reconnectTimer: ReturnType | null = null + let reconnectDeadline = 0 + const RECONNECT_WINDOW_MS = 12000 // survive brief drops; a bit beyond the host's ~10s grace + + const sink: MirrorSink = { + // Reassemble multibyte UTF-8 split across frames before writing to xterm. + emit: data => term.write(splitter.write(data)), + // Adopt the host's size (tmate model); the browser window does not drive the size. + hostResize: (cols, rows) => term.resize(cols, rows), + ended: reason => { + stopped = true + if (reconnectTimer) { + clearTimeout(reconnectTimer) + reconnectTimer = null + } + term.write(`\r\n[peershell] ${reason}\r\n`) + setStatus(reason) + }, + } + // Cache the PIN so a reconnect re-authenticates without re-prompting the user. + const pinProvider: PinProvider = async () => { + if (cachedPin) { + return cachedPin + } + cachedPin = await askPin() + return cachedPin + } + const controller = new MirrorController(transport, sink, pinProvider) + + // --- input + mobile extra-keys bar --- + const sendSeq = (s: string): void => controller.writeInput(encoder.encode(s)) + let ctrlArmed = false + let altArmed = false + const updateMods = (): void => { + document.querySelectorAll('#keybar button[data-mod]').forEach(b => { + const on = (b.dataset.mod === 'ctrl' && ctrlArmed) || (b.dataset.mod === 'alt' && altArmed) + b.classList.toggle('armed', on) + }) + } + // Type input (soft keyboard or a literal key button), applying an armed modifier to the first char + // (Ctrl -> control char, Alt -> ESC prefix), then disarm. + const typed = (data: string): void => { + if (!ctrlArmed && !altArmed) { + sendSeq(data) + return + } + let first = data[0] ?? '' + if (ctrlArmed && first) { + const u = first.toUpperCase().charCodeAt(0) + if (u >= 0x40 && u <= 0x5f) { + first = String.fromCharCode(u & 0x1f) + } + } + if (altArmed && first) { + first = `\x1b${first}` + } + ctrlArmed = false + altArmed = false + updateMods() + sendSeq(first + data.slice(1)) + } + // Cursor keys respect DECCKM (application mode sends ESC O x instead of ESC [ x). + const ck = (c: string): string => `${term.modes.applicationCursorKeysMode ? '\x1bO' : '\x1b['}${c}` + const keySeq = (k: string): string | undefined => ({ + esc: '\x1b', tab: '\t', cc: '\x03', + up: ck('A'), down: ck('B'), right: ck('C'), left: ck('D'), + home: '\x1b[H', end: '\x1b[F', pgup: '\x1b[5~', pgdn: '\x1b[6~', + } as Record)[k] + + term.onData(typed) + + const keybar = el('keybar') + keybar.addEventListener('pointerdown', (e: Event) => { + const btn = (e.target as HTMLElement).closest('button') as HTMLButtonElement | null + if (!btn) { + return + } + e.preventDefault() // keep the terminal focused so the soft keyboard stays open + const { k, mod, lit } = btn.dataset + if (mod === 'ctrl') { + ctrlArmed = !ctrlArmed + updateMods() + } else if (mod === 'alt') { + altArmed = !altArmed + updateMods() + } else if (lit !== undefined) { + typed(lit) + } else if (k) { + const seq = keySeq(k) + if (seq !== undefined) { + sendSeq(seq) + } + } + term.focus() + }) + + // Keep the terminal sized above the bar and above the on-screen keyboard (VisualViewport). + const toggle = el('kbtoggle') + const termEl = el('terminal') + const isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0 + let barVisible = isTouch + keybar.classList.toggle('hidden', !barVisible) + const layout = (): void => { + const vv = window.visualViewport + const kb = vv ? Math.max(0, window.innerHeight - vv.height - vv.offsetTop) : 0 + const barH = barVisible ? keybar.offsetHeight : 0 + keybar.style.bottom = `${kb}px` + termEl.style.bottom = `${kb + barH}px` + fit.fit() + } + toggle.addEventListener('click', () => { + barVisible = !barVisible + keybar.classList.toggle('hidden', !barVisible) + layout() + }) + window.visualViewport?.addEventListener('resize', layout) + window.visualViewport?.addEventListener('scroll', layout) + setTimeout(layout, 50) + + // Reduce mobile IME weirdness (predictive text / autocapitalize) on the xterm input. + const helper = document.querySelector('.xterm-helper-textarea') + if (helper) { + helper.setAttribute('autocorrect', 'off') + helper.setAttribute('autocapitalize', 'off') + helper.setAttribute('autocomplete', 'off') + helper.setAttribute('spellcheck', 'false') + } + + const connectAndJoin = async (): Promise => { + await transport.connect(wsUrl(), token) + setStatus('') + controller.join({ token, kind: 'web' }) + } + + const scheduleReconnect = (): void => { + reconnectTimer = setTimeout(() => { + reconnectTimer = null + if (stopped) { + return + } + if (Date.now() > reconnectDeadline) { + setStatus('disconnected') + return + } + setStatus('reconnecting…') + connectAndJoin().catch(() => { + if (!stopped && !reconnectTimer && Date.now() <= reconnectDeadline) { + scheduleReconnect() + } + }) + }, 1500) + } + + transport.onState(s => { + if (s === 'open') { + reconnectDeadline = 0 + if (reconnectTimer) { + clearTimeout(reconnectTimer) + reconnectTimer = null + } + } else if (s === 'closed' && !stopped) { + if (reconnectDeadline === 0) { + reconnectDeadline = Date.now() + RECONNECT_WINDOW_MS + } + if (!reconnectTimer) { + scheduleReconnect() + } + } + }) + + try { + await connectAndJoin() + } catch { + setStatus('Could not connect to the server.') + } +} + +void main().catch(err => setStatus(`error: ${String(err)}`)) diff --git a/clients/web/tsconfig.json b/clients/web/tsconfig.json new file mode 100644 index 0000000..ecfaf3f --- /dev/null +++ b/clients/web/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2019", + "module": "ESNext", + "moduleResolution": "node", + "lib": ["DOM", "ES2020"], + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "baseUrl": ".", + "paths": { + "@peershell/protocol": ["../../shared/src"] + } + }, + "include": ["src"] +} diff --git a/clients/web/webpack.config.mjs b/clients/web/webpack.config.mjs new file mode 100644 index 0000000..435f0b8 --- /dev/null +++ b/clients/web/webpack.config.mjs @@ -0,0 +1,44 @@ +// Builds the browser web-client into a single self-contained dist/index.html (JS + CSS inlined), +// which the host embeds and serves over the reverse tunnel. Reuses @peershell/protocol from source. +import * as path from 'path' +import * as url from 'url' +import HtmlWebpackPlugin from 'html-webpack-plugin' +import HtmlInlineScriptPlugin from 'html-inline-script-webpack-plugin' + +const __dirname = url.fileURLToPath(new URL('.', import.meta.url)) + +export default () => ({ + target: 'web', + mode: 'production', + entry: path.resolve(__dirname, 'src/index.ts'), + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'bundle.js', + }, + resolve: { + extensions: ['.ts', '.js'], + alias: { + '@peershell/protocol': path.resolve(__dirname, '../../shared/src/index.ts'), + }, + }, + module: { + rules: [ + { + test: /\.ts$/, + use: { + loader: 'ts-loader', + options: { configFile: path.resolve(__dirname, 'tsconfig.json') }, + }, + }, + { test: /\.css$/, use: ['style-loader', 'css-loader'] }, + ], + }, + plugins: [ + new HtmlWebpackPlugin({ + template: path.resolve(__dirname, 'src/index.html'), + inject: 'body', + minify: false, + }), + new HtmlInlineScriptPlugin(), + ], +}) diff --git a/jest.config.cjs b/jest.config.cjs new file mode 100644 index 0000000..a6f7baa --- /dev/null +++ b/jest.config.cjs @@ -0,0 +1,15 @@ +/** Jest config for the monorepo (ts-jest, node env). Runs *.test.ts under shared/ and clients/. */ +module.exports = { + testEnvironment: 'node', + setupFiles: ['/jest.setup.cjs'], + // integration tests use real sockets; close them per-test but force-exit to avoid handle races + forceExit: true, + roots: ['/shared', '/clients'], + testMatch: ['**/*.test.ts'], + transform: { + '^.+\\.ts$': ['ts-jest', { tsconfig: '/tsconfig.jest.json' }], + }, + moduleNameMapper: { + '^@peershell/protocol$': '/shared/src/index.ts', + }, +} diff --git a/jest.setup.cjs b/jest.setup.cjs new file mode 100644 index 0000000..da91d3b --- /dev/null +++ b/jest.setup.cjs @@ -0,0 +1,11 @@ +// jest-environment-node (Node 18) does not expose the Web Crypto global; the real runtimes +// (browsers, Electron renderer, Node >= 20) do. Provide it for tests so pinAuth can run. +if (!globalThis.crypto) { + globalThis.crypto = require('crypto').webcrypto +} +if (!globalThis.btoa) { + globalThis.btoa = s => Buffer.from(s, 'binary').toString('base64') +} +if (!globalThis.atob) { + globalThis.atob = s => Buffer.from(s, 'base64').toString('binary') +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..6f1d882 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8649 @@ +{ + "name": "peershell", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "peershell", + "version": "0.0.0", + "license": "Apache-2.0", + "workspaces": [ + "shared", + "clients/web", + "clients/tabby", + "server" + ], + "devDependencies": { + "@types/ws": "^8.18.1", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "eslint": "^8.57.1", + "typescript": "^4.9.5", + "ws": "^8.21.0" + }, + "engines": { + "node": ">=18" + } + }, + "clients/tabby": { + "name": "tabby-peershell", + "version": "0.1.0", + "license": "Apache-2.0", + "dependencies": { + "@peershell/protocol": "*" + }, + "devDependencies": { + "@angular/animations": "^15.2.6", + "@angular/common": "^15.2.6", + "@angular/compiler": "^15.2.6", + "@angular/compiler-cli": "^15.2.6", + "@angular/core": "^15.2.6", + "@angular/forms": "^15.2.6", + "@angular/platform-browser": "^15.2.6", + "@babel/core": "^7.22.0", + "@ng-bootstrap/ng-bootstrap": "^14.1.0", + "@ngtools/webpack": "^15.2.5", + "@tabby-gang/to-string-loader": "^1.1.7-beta.2", + "@types/jest": "^29.5.14", + "@types/node": "20.3.1", + "apply-loader": "2.0.0", + "babel-loader": "^9.1.2", + "css-loader": "^6.7.3", + "jest": "^29.7.0", + "ngx-toastr": "^16.0.2", + "pug-loader": "^2.4.0", + "rxjs": "^7.5.7", + "sass": "^1.63.4", + "sass-loader": "^13.2.0", + "source-map-loader": "^4.0.1", + "style-loader": "^3.3.1", + "svg-inline-loader": "^0.8.2", + "ts-jest": "^29.4.11", + "tslib": "^2.6.0", + "typescript": "^4.9.5", + "webpack": "^5.90.0", + "webpack-cli": "^5.0.1", + "yaml-loader": "0.8.0" + }, + "peerDependencies": { + "tabby-core": "*", + "tabby-settings": "*", + "tabby-terminal": "*" + } + }, + "clients/web": { + "name": "@peershell/web-client", + "version": "0.1.0", + "license": "Apache-2.0", + "dependencies": { + "@peershell/protocol": "*", + "@xterm/addon-fit": "^0.10.0", + "@xterm/xterm": "^5.5.0" + }, + "devDependencies": { + "css-loader": "^6.11.0", + "html-inline-script-webpack-plugin": "^3.2.1", + "html-webpack-plugin": "^5.6.7", + "style-loader": "^3.3.4", + "ts-loader": "^9.6.2", + "typescript": "^4.9.5", + "webpack": "^5.108.4", + "webpack-cli": "^5.1.4" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@angular/animations": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-15.2.10.tgz", + "integrity": "sha512-yxfN8qQpMaukRU5LjFkJBmy85rqrOp86tYVCsf+hmPEFRiXBMUj6xYLeCMcpk3Mt1JtnWGBR34ivGx+7bNeAow==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/core": "15.2.10" + } + }, + "node_modules/@angular/common": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-15.2.10.tgz", + "integrity": "sha512-jdBn3fctkqoNrJn9VLsUHpcCEhCxWSczdsR+BBbD6T0oLl6vMrAVNjPwfBejnlgfWN1KoRU9kgOYsMxa5apIWQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/core": "15.2.10", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/compiler": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-15.2.10.tgz", + "integrity": "sha512-M0XkeU0O73UlJZwDvOyp8/apetz9UKj78eTFDseMYJDLcxe6MpkbkxqpsGZnKYDj7LIep8PmCAKEkhtenE82zw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/core": "15.2.10" + }, + "peerDependenciesMeta": { + "@angular/core": { + "optional": true + } + } + }, + "node_modules/@angular/compiler-cli": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-15.2.10.tgz", + "integrity": "sha512-mCFIxrs60XicKfA2o42hA7LrQvhybi9BQveWuZn/2iIEOXx7R62Iemz8E21pLWftAZHGxEW3NECfBrY1d3gVmA==", + "dependencies": { + "@babel/core": "7.19.3", + "@jridgewell/sourcemap-codec": "^1.4.14", + "chokidar": "^3.0.0", + "convert-source-map": "^1.5.1", + "dependency-graph": "^0.11.0", + "magic-string": "^0.27.0", + "reflect-metadata": "^0.1.2", + "semver": "^7.0.0", + "tslib": "^2.3.0", + "yargs": "^17.2.1" + }, + "bin": { + "ng-xi18n": "bundles/src/bin/ng_xi18n.js", + "ngc": "bundles/src/bin/ngc.js", + "ngcc": "bundles/ngcc/main-ngcc.js" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/compiler": "15.2.10", + "typescript": ">=4.8.2 <5.0" + } + }, + "node_modules/@angular/compiler-cli/node_modules/@babel/core": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@angular/compiler-cli/node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@angular/core": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-15.2.10.tgz", + "integrity": "sha512-meGGidnitQJGDxYd9/LrqYiVlId+vGaLoiLgJdKBz+o2ZO6OmXQGuNw2VBqf17/Cc0/UjzrOY7+kILNFKkk/WQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "rxjs": "^6.5.3 || ^7.4.0", + "zone.js": "~0.11.4 || ~0.12.0 || ~0.13.0" + } + }, + "node_modules/@angular/forms": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-15.2.10.tgz", + "integrity": "sha512-NIntGsNcN6o8L1txsbWXOf6f3K/CUBizdKsxsYVYGJIXEW5qU6UnWmfAZffNNXsT/XvbgUCjgDwT0cAwcqZPuQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/common": "15.2.10", + "@angular/core": "15.2.10", + "@angular/platform-browser": "15.2.10", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/localize": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/localize/-/localize-15.2.10.tgz", + "integrity": "sha512-RHN+mUR4H34c/LLnNPAyQbfuZME4i9JgodK5YRRX8cSAFPafYLT0SspSuLsKtcCCEDadAZNDHzb8qv5MBtzJtg==", + "peer": true, + "dependencies": { + "@babel/core": "7.19.3", + "glob": "8.1.0", + "yargs": "^17.2.1" + }, + "bin": { + "localize-extract": "tools/bundles/src/extract/cli.js", + "localize-migrate": "tools/bundles/src/migrate/cli.js", + "localize-translate": "tools/bundles/src/translate/cli.js" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/compiler": "15.2.10", + "@angular/compiler-cli": "15.2.10" + } + }, + "node_modules/@angular/localize/node_modules/@babel/core": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", + "peer": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@angular/localize/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@angular/platform-browser": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-15.2.10.tgz", + "integrity": "sha512-9tbgVGSJqwfrOzT8aA/kWBLNhJSQ9gUg0CJxwFBSJm8VkBUJrszoBlDsnSvlxx8/W2ejNULKHFTXeUzq0O/+RQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/animations": "15.2.10", + "@angular/common": "15.2.10", + "@angular/core": "15.2.10" + }, + "peerDependenciesMeta": { + "@angular/animations": { + "optional": true + } + } + }, + "node_modules/@angular/platform-browser-dynamic": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-15.2.10.tgz", + "integrity": "sha512-JHP6W+FX715Qv7DhqvfZLuBZXSDJrboiQsR06gUAgDSjAUyhbqmpVg/2YOtgeWpPkzNDtXdPU2PhcRdIv5J3Yg==", + "peer": true, + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/common": "15.2.10", + "@angular/compiler": "15.2.10", + "@angular/core": "15.2.10", + "@angular/platform-browser": "15.2.10" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", + "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", + "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", + "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", + "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@jest/reporters/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@ng-bootstrap/ng-bootstrap": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-14.2.0.tgz", + "integrity": "sha512-nqEKVXauSontGKqC5WSKpch5TiAGDZB3hluvxkINS0r9LUE6sBQRP3qeYOe7Uwu+UbQcj28NG3qFHhpfnG8KHw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": "^15.0.0", + "@angular/core": "^15.0.0", + "@angular/forms": "^15.0.0", + "@angular/localize": "^15.0.0", + "@popperjs/core": "^2.11.6", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@ngtools/webpack": { + "version": "15.2.11", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.2.11.tgz", + "integrity": "sha512-yqp+FziuJ+wIVij4eTqfhuiTPNaG1PU8ukeGOdqkVH4nQMlmzs9UldXy1iYC/6swzn6XO/pkqisU3m/jxemMzA==", + "dev": true, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^15.0.0", + "typescript": ">=4.8.2 <5.0", + "webpack": "^5.54.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", + "integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.6", + "@parcel/watcher-darwin-arm64": "2.5.6", + "@parcel/watcher-darwin-x64": "2.5.6", + "@parcel/watcher-freebsd-x64": "2.5.6", + "@parcel/watcher-linux-arm-glibc": "2.5.6", + "@parcel/watcher-linux-arm-musl": "2.5.6", + "@parcel/watcher-linux-arm64-glibc": "2.5.6", + "@parcel/watcher-linux-arm64-musl": "2.5.6", + "@parcel/watcher-linux-x64-glibc": "2.5.6", + "@parcel/watcher-linux-x64-musl": "2.5.6", + "@parcel/watcher-win32-arm64": "2.5.6", + "@parcel/watcher-win32-ia32": "2.5.6", + "@parcel/watcher-win32-x64": "2.5.6" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.6.tgz", + "integrity": "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz", + "integrity": "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.6.tgz", + "integrity": "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.6.tgz", + "integrity": "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.6.tgz", + "integrity": "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.6.tgz", + "integrity": "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.6.tgz", + "integrity": "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.6.tgz", + "integrity": "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz", + "integrity": "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.6.tgz", + "integrity": "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.6.tgz", + "integrity": "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.6.tgz", + "integrity": "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.6.tgz", + "integrity": "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@peershell/protocol": { + "resolved": "shared", + "link": true + }, + "node_modules/@peershell/server": { + "resolved": "server", + "link": true + }, + "node_modules/@peershell/web-client": { + "resolved": "clients/web", + "link": true + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tabby-gang/to-string-loader": { + "version": "1.1.7-beta.2", + "resolved": "https://registry.npmjs.org/@tabby-gang/to-string-loader/-/to-string-loader-1.1.7-beta.2.tgz", + "integrity": "sha512-2hgj8KMl2Qm4dcruu1iFZqeIMXLvMpNrEKIDjEjei5NbQ/aOagOozPQV4B/jlTDybiLiXzx33Ys6Xj/8tVXZMw==", + "dev": true, + "dependencies": { + "loader-utils": "^1.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/babel-types": { + "version": "7.0.16", + "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.16.tgz", + "integrity": "sha512-5QXs9GBFTNTmilLlWBhnsprqpjfrotyrnzUdwDrywEL/DA4LuCWQT300BTOXA3Y9ngT9F2uvmCoIxI6z8DlJEA==", + "dev": true, + "peer": true + }, + "node_modules/@types/babylon": { + "version": "6.16.9", + "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.9.tgz", + "integrity": "sha512-sEKyxMVEowhcr8WLfN0jJYe4gS4Z9KC2DGz0vqfC7+MXFbmvOF7jSjALC77thvAO2TLgFUPa9vDeOak+AcUrZA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/babel-types": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==", + "dev": true + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", + "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", + "dev": true + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.2.tgz", + "integrity": "sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==", + "dev": true + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xterm/addon-fit": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz", + "integrity": "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/xterm": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz", + "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==" + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==", + "dev": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha512-uWttZCk96+7itPxK8xCzY86PnxKTMrReKDqrHzv42VQY0K30PUO8WY13WMOuI+cOdX4EIdzdvQ8k6jkuGRFMYw==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "^4.0.4" + } + }, + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dev": true, + "peer": true, + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/align-text/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "peer": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/apply-loader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/apply-loader/-/apply-loader-2.0.0.tgz", + "integrity": "sha512-6DYvIuO7d5z6xixh3ZYt8bRiH+IZvqROYGrESFEGrOatfpk1uDq0d5tH7lxhzhnbFbLH9XjIOhXcTHiUgIBl8g==", + "dev": true, + "dependencies": { + "loader-utils": "^1.1.0" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "peer": true + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-loader": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz", + "integrity": "sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==", + "dev": true, + "dependencies": { + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dev": true, + "peer": true, + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "dev": true, + "peer": true, + "dependencies": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "node_modules/babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true, + "peer": true, + "bin": { + "babylon": "bin/babylon.js" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.42", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.42.tgz", + "integrity": "sha512-c/jurFrDLyui7o1J86yLkRu4LMsTYcBohveus7/I2Hzdn9KIP2bdJPTue/lR1KH46enoPbD77GKeSYNdyPoD3Q==", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz", + "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.5.tgz", + "integrity": "sha512-Cu2E6QejHWzuDMTkuwgpABFgDfZrXLQq5V13YOACZx4mFAG4IwGTbTfHPMr4WtxlHoXSM8FIuRwYYCz5XiabaQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "baseline-browser-mapping": "^2.10.42", + "caniuse-lite": "^1.0.30001800", + "electron-to-chromium": "^1.5.387", + "node-releases": "^2.0.50", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001803", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001803.tgz", + "integrity": "sha512-g/uHREV2ZpK9qMalCsWaxmA6ol+DX8GYhuf3T40RKoP+oL7vhRJh8LNt73PCjpnR6l14FzfPrB5Yux4PKm2meg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dev": true, + "peer": true, + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/character-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", + "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==", + "dev": true, + "peer": true, + "dependencies": { + "is-regex": "^1.0.3" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true + }, + "node_modules/clean-css": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", + "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", + "dev": true, + "peer": true, + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/constantinople": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz", + "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==", + "dev": true, + "peer": true, + "dependencies": { + "@types/babel-types": "^7.0.0", + "@types/babylon": "^6.16.2", + "babel-types": "^6.26.0", + "babylon": "^6.18.0" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "dev": true, + "hasInstallScript": true, + "peer": true + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-loader": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", + "integrity": "sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==", + "dev": true, + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/doctypes": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", + "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==", + "dev": true, + "peer": true + }, + "node_modules/dom-converter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "dev": true, + "dependencies": { + "utila": "~0.4" + } + }, + "node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.388", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.388.tgz", + "integrity": "sha512-Pl/aJaqOOxYxda3vcx1IKSJimwYXHDkEnGn0F+kG2EE68dDtx2uCinaS+Vih8Z91B9t8CSAbiF/HKyWcnXjhzw==" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.24.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.2.tgz", + "integrity": "sha512-rpsZEGT1jFuve6QlpyRp9ckQ+kN61hvF9BzCPyMdaKTm8UJce96KBn3sorXOFXlzjPrs3Vc4T1NsSroZ3PxlFw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.21.0.tgz", + "integrity": "sha512-Lw7I8Zp5YKHFCXL7+Dz95g4CcbMEpgvqZNNq3AmlT5XAV6CgAAk6gyAMqn2zjw08K9BHfcNuKrMiCPLByGafow==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.0.tgz", + "integrity": "sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==", + "dev": true + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "peer": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/espree/node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fast-uri": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.3.tgz", + "integrity": "sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ] + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", + "dev": true, + "dependencies": { + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "peer": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/handlebars": { + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/handlebars/node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "peer": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/html-inline-script-webpack-plugin": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/html-inline-script-webpack-plugin/-/html-inline-script-webpack-plugin-3.2.1.tgz", + "integrity": "sha512-PEj9Ve31BE0dva6eTD6wHMOztgIdPxF6gx3wad7ohBkCn7MXpuUvPC9t5ThMJ2NrVi1jWGBYU76DfoS+8dabRw==", + "dev": true, + "engines": { + "node": ">=14.0.0", + "npm": ">=6.0.0" + }, + "peerDependencies": { + "html-webpack-plugin": "^5.0.0", + "webpack": "^5.0.0" + } + }, + "node_modules/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==", + "dev": true, + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "^5.2.2", + "commander": "^8.3.0", + "he": "^1.2.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.10.0" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/html-minifier-terser/node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "dev": true, + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/html-minifier-terser/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/html-webpack-plugin": { + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.7.tgz", + "integrity": "sha512-md+vXtdCAe60s1k6AU3dUyMJnDxUyQAwfwPKoLisvgUF1IXjtlLsk2se54+qfL9Mdm26bbwvjJybpNx48NKRLw==", + "dev": true, + "dependencies": { + "@types/html-minifier-terser": "^6.0.0", + "html-minifier-terser": "^6.0.2", + "lodash": "^4.17.21", + "pretty-error": "^4.0.0", + "tapable": "^2.0.0" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/html-webpack-plugin" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.20.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.9.tgz", + "integrity": "sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "peer": true + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-expression": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz", + "integrity": "sha512-vyMeQMq+AiH5uUnoBfMTwf18tO3bM6k1QXBE9D6ueAAquEfCZe3AJPtud9g6qS0+4X8xA7ndpZiDyeb2l2qOBw==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "~4.0.2", + "object-assign": "^4.0.1" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true, + "peer": true + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "peer": true, + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/javascript-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", + "integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==", + "dev": true + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-config/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-haste-map/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runner/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", + "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==", + "dev": true, + "peer": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz", + "integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jstransformer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", + "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==", + "dev": true, + "peer": true, + "dependencies": { + "is-promise": "^2.0.0", + "promise": "^7.0.1" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/loader-runner": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.2.tgz", + "integrity": "sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==", + "dev": true, + "engines": { + "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/loader-utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/loader-utils/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimizer-webpack-plugin": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.6.1.tgz", + "integrity": "sha512-DoeAZz8Q1C1znwsUzej1fdoi4jCf7/+Em27ouLqfK/+3m8G+D7yDhUwrc3CNhjSzGUN1kn7Iv4sWmjflQHenpw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@minify-html/node": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "@swc/css": { + "optional": true + }, + "@swc/html": { + "optional": true + }, + "clean-css": { + "optional": true + }, + "cssnano": { + "optional": true + }, + "csso": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "html-minifier-terser": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "postcss": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/nanoid": { + "version": "3.3.15", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", + "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/ngx-toastr": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-16.2.0.tgz", + "integrity": "sha512-7X6UhOKiaUeC2eTOsUqctZH0ZWKG8VlzDxWJhdEF1N3kPod46SU/Vn2l0hbt8EDwTjxHKfKyevU2idkYDoZYog==", + "dev": true, + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": ">=14.0.0-0", + "@angular/core": ">=14.0.0-0", + "@angular/platform-browser": ">=14.0.0-0" + } + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "optional": true + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.50", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.50.tgz", + "integrity": "sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==", + "engines": { + "node": ">=18" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "dependencies": { + "find-up": "^6.3.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/postcss": { + "version": "8.5.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz", + "integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz", + "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.4.tgz", + "integrity": "sha512-HeP7D2wyhkR+XaK6v4W8oRF62Dsz4flyuczALJp61GckGm42u1saSSJ/0auvcBqxs3jMRFEcPK34At/0JBKdOg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pretty-error": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz", + "integrity": "sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.20", + "renderkid": "^3.0.0" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "peer": true, + "dependencies": { + "asap": "~2.0.3" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pug": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.4.tgz", + "integrity": "sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw==", + "dev": true, + "peer": true, + "dependencies": { + "pug-code-gen": "^2.0.2", + "pug-filters": "^3.1.1", + "pug-lexer": "^4.1.0", + "pug-linker": "^3.0.6", + "pug-load": "^2.0.12", + "pug-parser": "^5.0.1", + "pug-runtime": "^2.0.5", + "pug-strip-comments": "^1.0.4" + } + }, + "node_modules/pug-attrs": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.4.tgz", + "integrity": "sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==", + "dev": true, + "peer": true, + "dependencies": { + "constantinople": "^3.0.1", + "js-stringify": "^1.0.1", + "pug-runtime": "^2.0.5" + } + }, + "node_modules/pug-code-gen": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-2.0.3.tgz", + "integrity": "sha512-r9sezXdDuZJfW9J91TN/2LFbiqDhmltTFmGpHTsGdrNGp3p4SxAjjXEfnuK2e4ywYsRIVP0NeLbSAMHUcaX1EA==", + "dev": true, + "peer": true, + "dependencies": { + "constantinople": "^3.1.2", + "doctypes": "^1.1.0", + "js-stringify": "^1.0.1", + "pug-attrs": "^2.0.4", + "pug-error": "^1.3.3", + "pug-runtime": "^2.0.5", + "void-elements": "^2.0.1", + "with": "^5.0.0" + } + }, + "node_modules/pug-error": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz", + "integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==", + "dev": true, + "peer": true + }, + "node_modules/pug-filters": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-3.1.1.tgz", + "integrity": "sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg==", + "dev": true, + "peer": true, + "dependencies": { + "clean-css": "^4.1.11", + "constantinople": "^3.0.1", + "jstransformer": "1.0.0", + "pug-error": "^1.3.3", + "pug-walk": "^1.1.8", + "resolve": "^1.1.6", + "uglify-js": "^2.6.1" + } + }, + "node_modules/pug-lexer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-4.1.0.tgz", + "integrity": "sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA==", + "dev": true, + "peer": true, + "dependencies": { + "character-parser": "^2.1.1", + "is-expression": "^3.0.0", + "pug-error": "^1.3.3" + } + }, + "node_modules/pug-linker": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-3.0.6.tgz", + "integrity": "sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg==", + "dev": true, + "peer": true, + "dependencies": { + "pug-error": "^1.3.3", + "pug-walk": "^1.1.8" + } + }, + "node_modules/pug-load": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.12.tgz", + "integrity": "sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==", + "dev": true, + "peer": true, + "dependencies": { + "object-assign": "^4.1.0", + "pug-walk": "^1.1.8" + } + }, + "node_modules/pug-loader": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pug-loader/-/pug-loader-2.4.0.tgz", + "integrity": "sha512-cD4bU2wmkZ1EEVyu0IfKOsh1F26KPva5oglO1Doc3knx8VpBIXmFHw16k9sITYIjQMCnRv1vb4vfQgy7VdR6eg==", + "dev": true, + "dependencies": { + "loader-utils": "^1.1.0", + "pug-walk": "^1.0.0", + "resolve": "^1.1.7" + }, + "peerDependencies": { + "pug": "^2.0.0" + } + }, + "node_modules/pug-parser": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-5.0.1.tgz", + "integrity": "sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA==", + "dev": true, + "peer": true, + "dependencies": { + "pug-error": "^1.3.3", + "token-stream": "0.0.1" + } + }, + "node_modules/pug-runtime": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz", + "integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==", + "dev": true, + "peer": true + }, + "node_modules/pug-strip-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz", + "integrity": "sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==", + "dev": true, + "peer": true, + "dependencies": { + "pug-error": "^1.3.3" + } + }, + "node_modules/pug-walk": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz", + "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==", + "dev": true + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", + "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==" + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true, + "peer": true + }, + "node_modules/relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/renderkid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz", + "integrity": "sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==", + "dev": true, + "dependencies": { + "css-select": "^4.1.3", + "dom-converter": "^0.2.0", + "htmlparser2": "^6.1.0", + "lodash": "^4.17.21", + "strip-ansi": "^6.0.1" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "dev": true, + "peer": true, + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sass": { + "version": "1.101.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.101.0.tgz", + "integrity": "sha512-OL3GoQyoUdDt843DpVmDO6y2k1sc5IhUDSpu8XucEI+35neq5QivZ1iuegnpraEVTJXlQGK1gl27zKcTLEPbQw==", + "dev": true, + "dependencies": { + "chokidar": "^5.0.0", + "immutable": "^5.1.5", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=20.19.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/sass-loader": { + "version": "13.3.3", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.3.3.tgz", + "integrity": "sha512-mt5YN2F1MOZr3d/wBRcZxeFgwgkH44wVc2zohO2YF6JiOMkiXe4BYRZpSu2sO1g71mo/j16txzUhsKZlqjVGzA==", + "dev": true, + "dependencies": { + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + } + } + }, + "node_modules/sass/node_modules/chokidar": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", + "dev": true, + "dependencies": { + "readdirp": "^5.0.0" + }, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sass/node_modules/readdirp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", + "dev": true, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/simple-html-tokenizer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.1.1.tgz", + "integrity": "sha512-Mc/gH3RvlKvB/gkp9XwgDKEWrSYyefIJPGG8Jk1suZms/rISdUuVEMx5O1WBnTWaScvxXDvGJrZQWblUmQHjkQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-loader": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.2.tgz", + "integrity": "sha512-oYwAqCuL0OZhBoSgmdrLa7mv9MjommVMiQIWgcztf+eS4+8BfcUee6nenFnDhKOhzAVnk5gpZdfnz1iiBv+5sg==", + "dev": true, + "dependencies": { + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.72.1" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/style-loader": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.4.tgz", + "integrity": "sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==", + "dev": true, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-inline-loader": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/svg-inline-loader/-/svg-inline-loader-0.8.2.tgz", + "integrity": "sha512-kbrcEh5n5JkypaSC152eGfGcnT4lkR0eSfvefaUJkLqgGjRQJyKDvvEE/CCv5aTSdfXuc+N98w16iAojhShI3g==", + "dev": true, + "dependencies": { + "loader-utils": "^1.1.0", + "object-assign": "^4.0.1", + "simple-html-tokenizer": "^0.1.1" + } + }, + "node_modules/tabby-core": { + "version": "1.0.231-nightly.0", + "resolved": "https://registry.npmjs.org/tabby-core/-/tabby-core-1.0.231-nightly.0.tgz", + "integrity": "sha512-CpOLTw9XWLeSJoAXGf6CIH1m5DULvmNTIncy0n0n8PAewQZmhMf5JYMzwiBzey+54LDZ/yit9aBRgat7yGx+Eg==", + "peer": true, + "peerDependencies": { + "@angular/animations": "^15", + "@angular/common": "^15", + "@angular/core": "^15", + "@angular/forms": "^15", + "@angular/platform-browser": "^15", + "@angular/platform-browser-dynamic": "^15", + "rxjs": "^7" + } + }, + "node_modules/tabby-peershell": { + "resolved": "clients/tabby", + "link": true + }, + "node_modules/tabby-settings": { + "version": "1.0.231-nightly.0", + "resolved": "https://registry.npmjs.org/tabby-settings/-/tabby-settings-1.0.231-nightly.0.tgz", + "integrity": "sha512-qKhpga8qIl+fEi0HL2KEKzCGpl/m6hRbN8HCeFl6bqxw+3e9xO2xuMW/Uh50xAonYBwlvmU9daJl7HuUWvIC4w==", + "peer": true, + "peerDependencies": { + "@angular/animations": "^15", + "@angular/common": "^15", + "@angular/core": "^15", + "@angular/forms": "^15", + "@angular/platform-browser": "^15", + "@ng-bootstrap/ng-bootstrap": "^14", + "rxjs": "^7", + "tabby-core": "*" + } + }, + "node_modules/tabby-terminal": { + "version": "1.0.231-nightly.0", + "resolved": "https://registry.npmjs.org/tabby-terminal/-/tabby-terminal-1.0.231-nightly.0.tgz", + "integrity": "sha512-Ou2b0VVai+B5nL1g0BEmxE0OeB6HmTCaqFgnooZj9ffeohyUwdzfklOimE2a6Huvdb7g8eSp4sWACw5L4botwQ==", + "peer": true, + "peerDependencies": { + "@angular/animations": "^15", + "@angular/common": "^15", + "@angular/core": "^15", + "@angular/forms": "^15", + "@angular/platform-browser": "^15", + "@ng-bootstrap/ng-bootstrap": "^14", + "rxjs": "^7", + "tabby-core": "*", + "tabby-settings": "*" + } + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser": { + "version": "5.48.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.48.0.tgz", + "integrity": "sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/acorn": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/token-stream": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz", + "integrity": "sha512-nfjOAu/zAWmX9tgwi5NRp7O7zTDUD1miHiB40klUnAh9qnL1iXdgzcz/i5dMaL5jahcBAaSfmNOBBJBLJW8TEg==", + "dev": true, + "peer": true + }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-jest": { + "version": "29.4.11", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.11.tgz", + "integrity": "sha512-IrFl7l9AuB/qrNw5quqvAv/hmKMb8dhWOH4jQOGo0Oq8tCeo1O86/iTFG1FaRimgUkF13l4PcepO8ATFT6Ns4g==", + "dev": true, + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.9", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.8.0", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <7" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-loader": { + "version": "9.6.2", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.6.2.tgz", + "integrity": "sha512-R4iuczmtgxvtuI556s+hTZ6/7Ee03VCAk/l/M8LY1OAsUgB7YydsCxkgq9D9pKRaD7GJqUi2u8fp9zZP/ufjKA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "picomatch": "^4.0.0", + "source-map": "^0.7.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "loader-utils": "*", + "typescript": "*", + "webpack": "^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "loader-utils": { + "optional": true + } + } + }, + "node_modules/ts-loader/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/ts-loader/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "dev": true, + "peer": true, + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + } + }, + "node_modules/uglify-js/node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dev": true, + "peer": true, + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/uglify-js/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uglify-js/node_modules/yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "dev": true, + "peer": true, + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/watchpack": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.2.tgz", + "integrity": "sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.108.4", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.108.4.tgz", + "integrity": "sha512-yur8LyJoeiWh47dErD+Ok7vlbmDsJ3UbbRPAoxbGJ54WpE2y5yVo5G/inUzujnYgw3tPmBRdn+G7PoxXaYC33w==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.16.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.28.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.22.2", + "es-module-lexer": "^2.1.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "graceful-fs": "^4.2.11", + "loader-runner": "^4.3.2", + "mime-db": "^1.54.0", + "minimizer-webpack-plugin": "^5.6.1", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "watchpack": "^2.5.2", + "webpack-sources": "^3.5.0" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.5.1.tgz", + "integrity": "sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/acorn": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/webpack/node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "node_modules/window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/with": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz", + "integrity": "sha512-uAnSsFGfSpF6DNhBXStvlZILfHJfJu4eUkfbRGk94kGO1Ta7bg6FwfvoOhhyHAJuFbCw+0xk4uJ3u57jLvlCJg==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "^3.1.0", + "acorn-globals": "^3.0.0" + } + }, + "node_modules/with/node_modules/acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==", + "dev": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ws": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yaml-loader": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/yaml-loader/-/yaml-loader-0.8.0.tgz", + "integrity": "sha512-LjeKnTzVBKWiQBeE2L9ssl6WprqaUIxCSNs5tle8PaDydgu3wVFXTbMfsvF2MSErpy9TDVa092n4q6adYwJaWg==", + "dev": true, + "dependencies": { + "javascript-stringify": "^2.0.1", + "loader-utils": "^2.0.0", + "yaml": "^2.0.0" + }, + "engines": { + "node": ">= 12.13" + } + }, + "node_modules/yaml-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/yargs": { + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zone.js": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.13.3.tgz", + "integrity": "sha512-MKPbmZie6fASC/ps4dkmIhaT5eonHkEt6eAy80K42tAm0G2W+AahLJjbfi6X9NPdciOE9GRFTTM8u2IiF6O3ww==", + "peer": true, + "dependencies": { + "tslib": "^2.3.0" + } + }, + "server": { + "name": "@peershell/server", + "version": "0.1.0", + "license": "Apache-2.0", + "dependencies": { + "ws": "^8.18.0" + } + }, + "shared": { + "name": "@peershell/protocol", + "version": "0.1.0", + "license": "Apache-2.0" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c73d25c --- /dev/null +++ b/package.json @@ -0,0 +1,37 @@ +{ + "name": "peershell", + "version": "0.0.0", + "private": true, + "description": "Take your terminal anywhere and work as if it were local", + "license": "Apache-2.0", + "repository": "https://github.com/tis24dev/peershell", + "workspaces": [ + "shared", + "clients/web", + "clients/tabby", + "server" + ], + "engines": { + "node": ">=18" + }, + "devDependencies": { + "@types/ws": "^8.18.1", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "eslint": "^8.57.1", + "typescript": "^4.9.5", + "ws": "^8.21.0" + }, + "scripts": { + "build:shared": "npm run build -w @peershell/protocol", + "build:web": "npm run build -w @peershell/web-client", + "copy:web-asset": "node scripts/copy-web-asset.mjs", + "build:tabby": "npm run build -w tabby-peershell", + "build:server": "npm run build -w @peershell/server", + "build:all": "npm run build:shared && npm run build:web && npm run copy:web-asset && npm run build:tabby && npm run build:server", + "watch:tabby": "npm run watch -w tabby-peershell", + "test": "jest", + "test:smoke": "node clients/tabby/test/smoke-load.cjs", + "lint": "eslint . --ext .ts,.cjs,.mjs" + } +} diff --git a/scripts/check-version-lockstep.mjs b/scripts/check-version-lockstep.mjs new file mode 100644 index 0000000..528d970 --- /dev/null +++ b/scripts/check-version-lockstep.mjs @@ -0,0 +1,23 @@ +// The publishable/workspace package.json versions must stay in lockstep (the release +// pipeline bumps them together). Fails CI if they diverge. +import { readFileSync } from 'node:fs' + +const pkgs = [ + 'shared/package.json', + 'clients/web/package.json', + 'clients/tabby/package.json', + 'server/package.json', +] + +const versions = pkgs.map(p => [p, JSON.parse(readFileSync(p, 'utf8')).version]) +const distinct = [...new Set(versions.map(([, v]) => v))] + +if (distinct.length !== 1) { + console.error('Version lockstep FAILED — workspaces disagree:') + for (const [p, v] of versions) { + console.error(` ${p} = ${v}`) + } + process.exit(1) +} + +console.log(`version lockstep OK: all workspaces at ${distinct[0]}`) diff --git a/scripts/copy-web-asset.mjs b/scripts/copy-web-asset.mjs new file mode 100644 index 0000000..96294be --- /dev/null +++ b/scripts/copy-web-asset.mjs @@ -0,0 +1,22 @@ +#!/usr/bin/env node +// Copies the built, self-contained web-client HTML into the Tabby plugin so it can +// be embedded (asset/source) and served over the outbound tunnel (httpTunnelHandler). +// Fails loudly if the source is missing so `build:all` never silently ships a stale/absent page. +import * as fs from 'fs' +import * as path from 'path' +import * as url from 'url' + +const root = path.resolve(url.fileURLToPath(new URL('.', import.meta.url)), '..') +const src = path.join(root, 'clients', 'web', 'dist', 'index.html') +const destDir = path.join(root, 'clients', 'tabby', 'assets') +const dest = path.join(destDir, 'web-client.html') + +if (!fs.existsSync(src)) { + console.error(`[copy-web-asset] ERROR: web-client build not found at ${src}`) + console.error('[copy-web-asset] Run `npm run build:web` first (build:all does this in order).') + process.exit(1) +} + +fs.mkdirSync(destDir, { recursive: true }) +fs.copyFileSync(src, dest) +console.log(`[copy-web-asset] ${path.relative(root, src)} -> ${path.relative(root, dest)}`) diff --git a/scripts/package-plugin.mjs b/scripts/package-plugin.mjs new file mode 100644 index 0000000..cc3e5e6 --- /dev/null +++ b/scripts/package-plugin.mjs @@ -0,0 +1,31 @@ +// Stage the loadable Tabby plugin (package.json + built dist/) and zip it to +// tabby-peershell.zip at the repo root. The web-client HTML is bundled into +// dist/index.js at build time, so only package.json + dist/ are needed. +// Uses python3 for the zip (the `zip` CLI is not present everywhere). +import { mkdirSync, rmSync, copyFileSync, existsSync } from 'node:fs' +import { execFileSync } from 'node:child_process' +import path from 'node:path' + +const root = process.cwd() +const tabby = path.join(root, 'clients', 'tabby') +const distIndex = path.join(tabby, 'dist', 'index.js') +if (!existsSync(distIndex)) { + throw new Error('build first: clients/tabby/dist/index.js missing (run `npm run build:all`)') +} + +const stage = path.join(root, 'build') +const pkgDir = path.join(stage, 'tabby-peershell') +rmSync(stage, { recursive: true, force: true }) +mkdirSync(path.join(pkgDir, 'dist'), { recursive: true }) + +copyFileSync(path.join(tabby, 'package.json'), path.join(pkgDir, 'package.json')) +copyFileSync(distIndex, path.join(pkgDir, 'dist', 'index.js')) +const map = path.join(tabby, 'dist', 'index.js.map') +if (existsSync(map)) { + copyFileSync(map, path.join(pkgDir, 'dist', 'index.js.map')) +} + +const outBase = path.join(root, 'tabby-peershell') +rmSync(`${outBase}.zip`, { force: true }) +execFileSync('python3', ['-c', `import shutil;shutil.make_archive(${JSON.stringify(outBase)},'zip',${JSON.stringify(stage)})`], { stdio: 'inherit' }) +console.log(`packaged ${outBase}.zip`) diff --git a/scripts/publish-plugins.mjs b/scripts/publish-plugins.mjs new file mode 100644 index 0000000..6e24d7a --- /dev/null +++ b/scripts/publish-plugins.mjs @@ -0,0 +1,22 @@ +#!/usr/bin/env node +// Publishes the Tabby plugin (clients/tabby -> npm "tabby-peershell") from the monorepo subdir. +// Verifies the bundle exists before publishing. Version bump/tagging is expected to be done +// beforehand (or by CI on a release tag). Kept intentionally small. +import * as fs from 'fs' +import * as path from 'path' +import * as url from 'url' +import { execFileSync } from 'child_process' + +const root = path.resolve(url.fileURLToPath(new URL('.', import.meta.url)), '..') +const pluginDir = path.join(root, 'clients', 'tabby') +const bundle = path.join(pluginDir, 'dist', 'index.js') + +if (!fs.existsSync(bundle)) { + console.error(`[publish] ERROR: built bundle missing at ${bundle}. Run \`npm run build:all\` first.`) + process.exit(1) +} + +const dry = process.argv.includes('--dry-run') +const args = ['publish', ...(dry ? ['--dry-run'] : []), '--access', 'public'] +console.log(`[publish] npm ${args.join(' ')} (cwd=${pluginDir})`) +execFileSync('npm', args, { cwd: pluginDir, stdio: 'inherit' }) diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..b5c5213 --- /dev/null +++ b/server/package.json @@ -0,0 +1,16 @@ +{ + "name": "@peershell/server", + "version": "0.1.0-beta", + "private": true, + "description": "peershell rendezvous + blind relay + reverse HTTP tunnel (MVP; accounts/dashboard in Stage 6)", + "license": "Apache-2.0", + "main": "src/index.cjs", + "scripts": { + "start": "node src/index.cjs", + "build": "echo \"(server: plain CJS, no build step)\"", + "test": "echo \"(server: covered by shared/ + clients/tabby integration tests)\"" + }, + "dependencies": { + "ws": "^8.18.0" + } +} diff --git a/server/src/README.md b/server/src/README.md new file mode 100644 index 0000000..266e14f --- /dev/null +++ b/server/src/README.md @@ -0,0 +1,8 @@ +# @peershell/server (Stage 5) + +Placeholder. The rendezvous + blind relay + reverse HTTP tunnel + accounts/dashboard server is +implemented in Stage 5 (deployed on the user's Proxmox behind a cloudflared tunnel). It consumes +`@peershell/protocol` and must implement the contract in `../../PROTOCOL.md`. + +A throwaway ~120-line Node `ws`+`http` relay (per the plan's verification section) is the precursor +used to smoke-test the clients before this is built. diff --git a/server/src/index.cjs b/server/src/index.cjs new file mode 100644 index 0000000..2ad784b --- /dev/null +++ b/server/src/index.cjs @@ -0,0 +1,1006 @@ +/** + * @peershell/server — rendezvous + blind relay + reverse HTTP tunnel + accounts. + * + * Relay: pairs one host + one guest by room-code / magic-link token, forwards every frame verbatim, + * and serves the host-embedded web-client to browsers that open the magic-link (GET /s/). + * + * Accounts (Stage 6): open registration + email verification (mock-logged for MVP; SMTP = Stage 7), + * login -> opaque bearer token, optional TOTP 2FA, logout/refresh, dashboard (GET /sessions). + * create-session over WS is GATED behind a valid account token (?token= on the WS upgrade URL): + * without it, anyone reaching the public server could open sessions. Guests do NOT need an account + * (they authenticate to the host with the per-session PIN, peer-to-peer). + * + * Persistence: atomic JSON file (data/accounts.json, mode 0600). Falls back to in-memory (ephemeral) + * when the data dir is not writable, or when opts.ephemeral is set (tests). + * + * Library: const { startRelay } = require('./index.cjs'); const s = await startRelay(0, { requireAuth:false }) + * Standalone: node server/src/index.cjs (env: PORT, BIND, PUBLIC_URL, TOKEN_TTL_MS, PEERSHELL_DATA) + */ +const http = require('http') +const https = require('https') +const crypto = require('crypto') +const fs = require('fs') +const path = require('path') +const { WebSocketServer } = require('ws') + +const CODE_ALPHABET = '23456789ABCDEFGHJKMNPQRSTUVWXYZ' +const DEFAULT_TOKEN_TTL_MS = 15 * 60 * 1000 // magic-link +const DEFAULT_AUTH_TTL_MS = 24 * 60 * 60 * 1000 // account bearer token +const IDLE_TIMEOUT_MS = 90 * 1000 +const PBKDF2_ITERS = 100000 +const MIN_PASSWORD = 8 +const MAX_BODY = 64 * 1024 +const LOGIN_MAX_FAILS = 5 +const LOGIN_LOCK_MS = 15 * 60 * 1000 +const REG_MAX_PER_IP = 5 +const REG_WINDOW_MS = 24 * 60 * 60 * 1000 +const TOTP_SESSION_TTL_MS = 5 * 60 * 1000 +const TOTP_MAX_FAILS = 3 +const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/ +const B32 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' + +function genCode(n = 6) { + const bytes = crypto.randomBytes(n) + let out = '' + for (let i = 0; i < n; i++) { + out += CODE_ALPHABET[bytes[i] % CODE_ALPHABET.length] + } + return out +} +const genToken = () => crypto.randomBytes(18).toString('base64url') +const genAuthToken = () => crypto.randomBytes(32).toString('base64url') +const sha256hex = s => crypto.createHash('sha256').update(s).digest('hex') +const j = obj => JSON.stringify({ v: 1, ...obj }) + +// --- email delivery (Brevo transactional API; stdlib https, zero deps) --- +// We relay through Brevo (not direct VM SMTP) so mail is DKIM/SPF-authoritative for the domain and +// the VM IP is never in the sending path (no blacklist risk). No key configured -> log the code. +function brevoSend(opts) { + return new Promise((resolve, reject) => { + const payload = JSON.stringify({ + sender: { email: opts.from, name: opts.fromName || 'peershell' }, + to: [{ email: opts.to }], + subject: opts.subject, + textContent: opts.text, + }) + const req = https.request({ + hostname: 'api.brevo.com', + path: '/v3/smtp/email', + method: 'POST', + headers: { + 'api-key': opts.apiKey, + accept: 'application/json', + 'content-type': 'application/json', + 'content-length': Buffer.byteLength(payload), + }, + }, res => { + let b = '' + res.on('data', c => { b += c }) + res.on('end', () => { + if ((res.statusCode || 500) < 300) { + resolve({ status: res.statusCode, body: b }) + } else { + reject(new Error(`brevo ${res.statusCode}: ${b.slice(0, 200)}`)) + } + }) + }) + req.on('error', reject) + req.setTimeout(10000, () => req.destroy(new Error('brevo timeout'))) + req.write(payload) + req.end() + }) +} + +async function deliverVerifyCode(email, code, cfg = {}, kind = 'verification') { + const isReset = kind === 'reset' + const subject = isReset ? 'Your peershell password reset code' : 'Your peershell verification code' + const text = isReset + ? `Your peershell password reset code is: ${code}\n\nEnter it in the app to set a new password.\nIf you did not request this, you can ignore this email.` + : `Your peershell verification code is: ${code}\n\nEnter it in the app to finish creating your account.\nIf you did not request this, you can ignore this email.` + const label = isReset ? 'reset code' : 'verify code' + if (cfg.apiKey) { + const send = cfg.sendFn || brevoSend + try { + await send({ + apiKey: cfg.apiKey, + from: cfg.from || 'noreply@peershell.dev', + fromName: cfg.fromName || 'peershell', + to: email, + subject, + text, + }) + return { delivered: 'email' } + } catch (e) { + console.warn(`[peershell] ${label} email to ${email} failed (${e.message}); logging as fallback`) + console.log(`[peershell] ${label} for ${email}: ${code}`) + return { delivered: 'log-fallback' } + } + } + console.log(`[peershell] ${label} for ${email}: ${code}`) + return { delivered: 'log' } +} + +// Passwords are stored ONLY as a salted, one-way scrypt hash (memory-hard) — never plaintext, and not +// recoverable by anyone (including us). Self-describing format: scrypt$N$r$p$saltHex$hashHex. Legacy +// pbkdf2 accounts (salt+hash fields) still verify and are upgraded to scrypt on next successful login. +const SCRYPT = { N: 16384, r: 8, p: 1, keylen: 32 } +function hashPassword(password) { + const salt = crypto.randomBytes(16) + const derived = crypto.scryptSync(password, salt, SCRYPT.keylen, { N: SCRYPT.N, r: SCRYPT.r, p: SCRYPT.p }) + return `scrypt$${SCRYPT.N}$${SCRYPT.r}$${SCRYPT.p}$${salt.toString('hex')}$${derived.toString('hex')}` +} +function verifyPassword(account, password) { + const stored = account && account.pwhash + if (typeof stored === 'string' && stored.startsWith('scrypt$')) { + const parts = stored.split('$') + if (parts.length !== 6) { + return false + } + const expected = Buffer.from(parts[5], 'hex') + let derived + try { + derived = crypto.scryptSync(password, Buffer.from(parts[4], 'hex'), expected.length, + { N: Number(parts[1]), r: Number(parts[2]), p: Number(parts[3]) }) + } catch { + return false + } + return derived.length === expected.length && crypto.timingSafeEqual(derived, expected) + } + // legacy pbkdf2 (salt + base64 hash) + if (account && account.salt && account.hash) { + const h = crypto.pbkdf2Sync(password, account.salt, PBKDF2_ITERS, 32, 'sha256').toString('base64') + const a = Buffer.from(h) + const b = Buffer.from(account.hash) + return a.length === b.length && crypto.timingSafeEqual(a, b) + } + return false +} + +// --- TOTP (RFC 6238, SHA-1/30s/6-digit) — inline, zero deps --- +function base32Encode(buf) { + let bits = '' + for (const byte of buf) { + bits += byte.toString(2).padStart(8, '0') + } + let out = '' + for (let i = 0; i + 5 <= bits.length; i += 5) { + out += B32[parseInt(bits.slice(i, i + 5), 2)] + } + return out +} +function base32Decode(str) { + let bits = '' + for (const c of String(str).toUpperCase().replace(/=+$/, '')) { + const idx = B32.indexOf(c) + if (idx >= 0) { + bits += idx.toString(2).padStart(5, '0') + } + } + const bytes = [] + for (let i = 0; i + 8 <= bits.length; i += 8) { + bytes.push(parseInt(bits.slice(i, i + 8), 2)) + } + return Buffer.from(bytes) +} +function totpAt(secretB32, counter) { + const key = base32Decode(secretB32) + const buf = Buffer.alloc(8) + buf.writeBigUInt64BE(BigInt(counter)) + const hmac = crypto.createHmac('sha1', key).update(buf).digest() + const off = hmac[hmac.length - 1] & 0xf + const bin = hmac.readUInt32BE(off) & 0x7fffffff + return (bin % 1000000).toString().padStart(6, '0') +} +function verifyTOTP(secretB32, code, atMs, window = 1) { + if (!/^\d{6}$/.test(String(code || ''))) { + return false + } + const counter = Math.floor(atMs / 30000) + for (let i = -window; i <= window; i++) { + if (totpAt(secretB32, counter + i) === String(code)) { + return true + } + } + return false +} + +// Minimal account dashboard served at GET / (same-origin -> no CORS). Login/register/recover, then a +// top bar (email + logout) and the account's sessions (live + closed/expired) with times and link. +const DASHBOARD_HTML = ` +peershell + +
+
+

peershell

+ + +
+
+
+
+

Your sessions

+
StatusOpenedClosedLink
+
+
+

Settings

+

+ + +
+ +` + +// QR code generator (qrcode-generator, MIT, zero-dep) served at GET /qrcode.js so the dashboard can +// render the 2FA QR locally in the browser (the TOTP secret never leaves us for a third-party service). +let QRCODE_JS = '' +try { + QRCODE_JS = fs.readFileSync(path.join(__dirname, 'qrcode.js'), 'utf8') +} catch { /* QR is optional; the dashboard falls back to the text key */ } + +/** + * @param {number} port + * @param {{ host?, publicUrl?, tokenTtlMs?, authTtlMs?, requireAuth?, ephemeral?, dataDir? }} [opts] + */ +function startRelay(port = 0, opts = {}) { + return new Promise(resolve => { + const bindHost = opts.host || '127.0.0.1' + const tokenTtlMs = opts.tokenTtlMs || DEFAULT_TOKEN_TTL_MS + const authTtlMs = opts.authTtlMs || DEFAULT_AUTH_TTL_MS + const requireAuth = opts.requireAuth !== false // default ON (production-safe) + const emailCfg = opts.email || { + apiKey: process.env.BREVO_API_KEY || '', + from: process.env.EMAIL_FROM || 'noreply@peershell.dev', + fromName: process.env.EMAIL_FROM_NAME || 'peershell', + } + let boundPort = port + let publicUrl = opts.publicUrl || '' + + const rooms = new Map() // room -> { host, guest, accountId, magicLink, createdAt } + const magicTokens = new Map() // magic-link token -> { room, expiresAt } + const pendingHttp = new Map() // reqId -> http res + const loginFails = new Map() // email -> { count, until, blocks } + const regByIp = new Map() // ip -> { count, resetAt } + const totpSessions = new Map() // sessionKey -> { accountId, expiresAt, fails } + + const now = () => Date.now() + + // ---------- account store (atomic JSON, or ephemeral) ---------- + const dataDir = opts.dataDir || process.env.PEERSHELL_DATA || path.join(__dirname, '..', 'data') + const accountsFile = path.join(dataDir, 'accounts.json') + let store = { accounts: [], tokens: [], shares: [] } + let ephemeral = !!opts.ephemeral + if (!ephemeral) { + try { + const raw = JSON.parse(fs.readFileSync(accountsFile, 'utf8')) + store = { accounts: raw.accounts || [], tokens: raw.tokens || [], shares: raw.shares || [] } + } catch { /* fresh store */ } + try { + fs.mkdirSync(dataDir, { recursive: true, mode: 0o700 }) + fs.accessSync(dataDir, fs.constants.W_OK) + } catch { + ephemeral = true + console.warn('[peershell-server] data dir not writable -> ephemeral accounts (lost on restart)') + } + } + function saveStore() { + if (ephemeral) { + return + } + try { + const tmp = `${accountsFile}.tmp` + fs.writeFileSync(tmp, JSON.stringify(store), { mode: 0o600 }) + fs.renameSync(tmp, accountsFile) + } catch (e) { + console.warn('[peershell-server] saveStore failed:', e && e.message) + } + } + const findAccount = email => store.accounts.find(a => a.email === String(email || '').toLowerCase()) + function accountFromToken(token) { + if (!token) { + return null + } + const th = sha256hex(token) + const rec = store.tokens.find(t => t.tokenHash === th) + if (!rec || rec.revokedAt || rec.expiresAt < now()) { + return null + } + return store.accounts.find(a => a.id === rec.accountId && !a.revoked) || null + } + function issueAuthToken(accountId) { + const token = genAuthToken() + const expiresAt = now() + authTtlMs + store.tokens.push({ tokenHash: sha256hex(token), accountId, createdAt: now(), expiresAt, revokedAt: null }) + saveStore() + return { token, expiresAt } + } + + // ---------- rate-limit helpers ---------- + const loginLockedUntil = email => { + const r = loginFails.get(email) + return r && r.until > now() ? r.until : 0 + } + function recordLoginFail(email) { + const r = loginFails.get(email) || { count: 0, until: 0, blocks: 0 } + r.count++ + if (r.count >= LOGIN_MAX_FAILS) { + r.blocks++ + r.until = now() + LOGIN_LOCK_MS * Math.min(4, r.blocks) + r.count = 0 + } + loginFails.set(email, r) + } + function regAllowed(ip) { + const r = regByIp.get(ip) + if (!r || r.resetAt < now()) { + regByIp.set(ip, { count: 1, resetAt: now() + REG_WINDOW_MS }) + return true + } + if (r.count >= REG_MAX_PER_IP) { + return false + } + r.count++ + return true + } + const clientIp = req => + req.headers['cf-connecting-ip'] || + String(req.headers['x-forwarded-for'] || '').split(',')[0].trim() || + (req.socket && req.socket.remoteAddress) || 'unknown' + const failDelay = () => new Promise(r => setTimeout(r, 100 + (crypto.randomBytes(1)[0] / 255) * 400)) + + // ---------- HTTP helpers ---------- + function sendJson(res, status, obj) { + const b = Buffer.from(JSON.stringify(obj)) + res.writeHead(status, { 'content-type': 'application/json', 'content-length': b.length }) + res.end(b) + } + function readJson(req, cb) { + let body = '' + let bad = false + req.on('data', c => { + body += c + if (body.length > MAX_BODY) { + bad = true + req.destroy() + } + }) + req.on('end', () => { + if (bad) { + return cb(null) + } + try { + cb(JSON.parse(body || '{}')) + } catch { + cb(null) + } + }) + req.on('error', () => cb(null)) + } + const bearer = req => { + const h = req.headers.authorization || '' + return h.startsWith('Bearer ') ? h.slice(7) : null + } + + function magicRoom(token) { + const rec = magicTokens.get(token) + if (!rec) { + return null + } + if (rec.expiresAt < now()) { + magicTokens.delete(token) + return null + } + return rec.room + } + function dropRoom(room) { + endShare(room) + rooms.delete(room) + for (const [tok, rec] of magicTokens) { + if (rec.room === room) { + magicTokens.delete(tok) + } + } + } + // Persisted share history for the dashboard: one record per created session, closed on host exit. + function recordShare(room, accountId, magicLink) { + store.shares.push({ room, accountId: accountId || null, magicLink, createdAt: now(), endedAt: null }) + if (store.shares.length > 1000) { + store.shares = store.shares.slice(-1000) + } + saveStore() + } + function endShare(room) { + for (let i = store.shares.length - 1; i >= 0; i--) { + if (store.shares[i].room === room && !store.shares[i].endedAt) { + store.shares[i].endedAt = now() + saveStore() + return + } + } + } + function safeSend(sock, data, binary) { + if (sock && sock.readyState === sock.OPEN) { + sock.send(data, { binary: !!binary }) + } + } + function resolveHttp(msg) { + const res = pendingHttp.get(msg.reqId) + if (res) { + pendingHttp.delete(msg.reqId) + res.writeHead(msg.status || 200, msg.headers || {}) + res.end(Buffer.from(msg.bodyBase64 || '', 'base64')) + } + } + + // ---------- REST endpoints ---------- + function handleRest(req, res) { + const url = (req.url || '').split('?')[0] + const method = req.method || 'GET' + + if (method === 'GET' && url === '/sessions') { + const acct = accountFromToken(bearer(req)) + if (!acct) { + return sendJson(res, 401, { error: 'unauthorized' }) + } + const sessions = store.shares + .filter(s => s.accountId === acct.id) + .sort((a, b) => b.createdAt - a.createdAt) + .map(s => { + const live = !s.endedAt && rooms.has(s.room) + return { + room: s.room, + magicLink: s.magicLink, + createdAt: s.createdAt, + endedAt: s.endedAt, + live, + hasGuest: live ? !!rooms.get(s.room).guest : false, + } + }) + return sendJson(res, 200, { + account: { email: acct.email, totpEnabled: !!acct.totpEnabled, totpEnabledAt: acct.totpEnabledAt || null }, + sessions, + }) + } + if (method !== 'POST') { + return sendJson(res, 404, { error: 'not-found' }) + } + + readJson(req, async body => { + if (!body) { + return sendJson(res, 400, { error: 'bad-request' }) + } + switch (url) { + case '/register': { + const ip = clientIp(req) + const email = String(body.email || '').toLowerCase().trim() + const password = String(body.password || '') + if (!EMAIL_RE.test(email)) { + return sendJson(res, 400, { error: 'invalid-email' }) + } + if (password.length < MIN_PASSWORD) { + return sendJson(res, 400, { error: 'password-too-weak', min: MIN_PASSWORD }) + } + if (!regAllowed(ip)) { + return sendJson(res, 429, { error: 'rate-limited', retryAfter: REG_WINDOW_MS / 1000 }) + } + const existing = findAccount(email) + if (existing) { + if (existing.verified) { + return sendJson(res, 200, { ok: true, alreadyRegistered: true }) + } + existing.verifyCode = crypto.randomInt(0, 1000000).toString().padStart(6, '0') + saveStore() + await deliverVerifyCode(email, existing.verifyCode, emailCfg) + return sendJson(res, 200, { ok: true, needsVerification: true }) + } + const verifyCode = crypto.randomInt(0, 1000000).toString().padStart(6, '0') + const acct = { + id: crypto.randomUUID(), email, pwhash: hashPassword(password), + verified: false, verifyCode, + totpSecret: null, totpEnabled: false, pendingTotpSecret: null, + createdAt: now(), lastLogin: null, revoked: false, + } + store.accounts.push(acct) + const d = await deliverVerifyCode(email, verifyCode, emailCfg) + if (d.delivered === 'email') { + saveStore() + return sendJson(res, 200, { ok: true, needsVerification: true }) + } + // Email not deliverable (no SMTP / send failed): don't strand the user behind a + // code they can't receive — auto-verify and log them in immediately. + acct.verified = true + acct.verifyCode = null + acct.lastLogin = now() + const t = issueAuthToken(acct.id) + return sendJson(res, 200, { token: t.token, expiresAt: t.expiresAt, autoVerified: true }) + } + case '/verify-email': { + const email = String(body.email || '').toLowerCase().trim() + const code = String(body.code || '') + const acct = findAccount(email) + if (acct && !acct.verified && acct.verifyCode && + code.length === acct.verifyCode.length && + crypto.timingSafeEqual(Buffer.from(code), Buffer.from(acct.verifyCode))) { + acct.verified = true + acct.verifyCode = null + saveStore() + return sendJson(res, 200, { ok: true }) + } + return sendJson(res, 400, { error: 'invalid' }) + } + case '/login': { + const email = String(body.email || '').toLowerCase().trim() + const password = String(body.password || '') + const lockUntil = loginLockedUntil(email) + if (lockUntil) { + return sendJson(res, 429, { error: 'rate-limited', retryAfter: Math.ceil((lockUntil - now()) / 1000) }) + } + const acct = findAccount(email) + const ok = !!acct && verifyPassword(acct, password) + if (!ok) { + recordLoginFail(email) + await failDelay() + return sendJson(res, 401, { error: 'invalid-credentials' }) + } + if (!acct.verified) { + return sendJson(res, 403, { error: 'needs-verification' }) + } + loginFails.delete(email) + if (!acct.pwhash) { // upgrade a legacy pbkdf2 hash to scrypt on login + acct.pwhash = hashPassword(password) + delete acct.salt + delete acct.hash + } + acct.lastLogin = now() + if (acct.totpEnabled) { + const sessionKey = genAuthToken() + totpSessions.set(sessionKey, { accountId: acct.id, expiresAt: now() + TOTP_SESSION_TTL_MS, fails: 0 }) + saveStore() + return sendJson(res, 200, { needsTotp: true, sessionKey }) + } + saveStore() + const t = issueAuthToken(acct.id) + return sendJson(res, 200, { token: t.token, expiresAt: t.expiresAt }) + } + case '/2fa/verify': { + const sk = String(body.sessionKey || '') + const sess = totpSessions.get(sk) + if (!sess || sess.expiresAt < now()) { + totpSessions.delete(sk) + return sendJson(res, 401, { error: 'expired' }) + } + const acct = store.accounts.find(a => a.id === sess.accountId) + if (!acct || !verifyTOTP(acct.totpSecret, body.code, now())) { + sess.fails++ + if (sess.fails >= TOTP_MAX_FAILS) { + totpSessions.delete(sk) + if (acct) { + recordLoginFail(acct.email) + } + return sendJson(res, 429, { error: 'too-many-attempts' }) + } + return sendJson(res, 401, { error: 'invalid-code', remaining: TOTP_MAX_FAILS - sess.fails }) + } + totpSessions.delete(sk) + const t = issueAuthToken(acct.id) + return sendJson(res, 200, { token: t.token, expiresAt: t.expiresAt }) + } + case '/2fa/setup': { + const acct = accountFromToken(bearer(req)) + if (!acct) { + return sendJson(res, 401, { error: 'unauthorized' }) + } + const secret = base32Encode(crypto.randomBytes(20)) + acct.pendingTotpSecret = secret + saveStore() + const label = encodeURIComponent(`peershell:${acct.email}`) + const otpauthUrl = `otpauth://totp/${label}?secret=${secret}&issuer=peershell` + return sendJson(res, 200, { secret, otpauthUrl }) + } + case '/2fa/enable': { + const acct = accountFromToken(bearer(req)) + if (!acct) { + return sendJson(res, 401, { error: 'unauthorized' }) + } + if (!acct.pendingTotpSecret || !verifyTOTP(acct.pendingTotpSecret, body.code, now())) { + return sendJson(res, 400, { error: 'invalid-code' }) + } + acct.totpSecret = acct.pendingTotpSecret + acct.pendingTotpSecret = null + acct.totpEnabled = true + acct.totpEnabledAt = now() + saveStore() + console.log(`[peershell] 2fa enabled for ${acct.email}`) + return sendJson(res, 200, { ok: true }) + } + case '/2fa/disable': { + const acct = accountFromToken(bearer(req)) + if (!acct) { + return sendJson(res, 401, { error: 'unauthorized' }) + } + if (!verifyPassword(acct, String(body.password || ''))) { + return sendJson(res, 401, { error: 'invalid-credentials' }) + } + acct.totpEnabled = false + acct.totpSecret = null + acct.pendingTotpSecret = null + acct.totpEnabledAt = null + saveStore() + console.log(`[peershell] 2fa disabled for ${acct.email}`) + return sendJson(res, 200, { ok: true }) + } + case '/logout': { + const token = bearer(req) + const th = token && sha256hex(token) + const rec = th && store.tokens.find(t => t.tokenHash === th) + if (rec) { + rec.revokedAt = now() + saveStore() + } + return sendJson(res, 200, { ok: true }) + } + case '/session/refresh': { + const token = bearer(req) + const acct = accountFromToken(token) + if (!acct) { + return sendJson(res, 401, { error: 'unauthorized' }) + } + const rec = store.tokens.find(t => t.tokenHash === sha256hex(token)) + if (rec) { + rec.revokedAt = now() + } + const t = issueAuthToken(acct.id) + return sendJson(res, 200, { token: t.token, expiresAt: t.expiresAt }) + } + case '/request-password-reset': { + const email = String(body.email || '').toLowerCase().trim() + const acct = findAccount(email) + if (acct && acct.verified) { + acct.resetCode = crypto.randomInt(0, 1000000).toString().padStart(6, '0') + acct.resetExpiresAt = now() + 15 * 60 * 1000 + saveStore() + await deliverVerifyCode(email, acct.resetCode, emailCfg, 'reset') + } + // anti-enumeration: always the same response + return sendJson(res, 200, { ok: true }) + } + case '/reset-password': { + const email = String(body.email || '').toLowerCase().trim() + const code = String(body.code || '') + const newPassword = String(body.newPassword || '') + if (newPassword.length < MIN_PASSWORD) { + return sendJson(res, 400, { error: 'password-too-weak', min: MIN_PASSWORD }) + } + const acct = findAccount(email) + if (acct && acct.resetCode && acct.resetExpiresAt > now() && + code.length === acct.resetCode.length && + crypto.timingSafeEqual(Buffer.from(code), Buffer.from(acct.resetCode))) { + acct.pwhash = hashPassword(newPassword) + delete acct.salt + delete acct.hash + acct.resetCode = null + acct.resetExpiresAt = null + acct.verified = true + saveStore() + return sendJson(res, 200, { ok: true }) + } + return sendJson(res, 400, { error: 'invalid' }) + } + case '/change-password': { + const acct = accountFromToken(bearer(req)) + if (!acct) { + return sendJson(res, 401, { error: 'unauthorized' }) + } + if (!verifyPassword(acct, String(body.currentPassword || ''))) { + return sendJson(res, 401, { error: 'invalid-credentials' }) + } + const np = String(body.newPassword || '') + if (np.length < MIN_PASSWORD) { + return sendJson(res, 400, { error: 'password-too-weak', min: MIN_PASSWORD }) + } + acct.pwhash = hashPassword(np) + delete acct.salt + delete acct.hash + saveStore() + return sendJson(res, 200, { ok: true }) + } + default: + return sendJson(res, 404, { error: 'not-found' }) + } + }) + } + + const REST_POST = new Set(['/register', '/verify-email', '/login', '/2fa/verify', '/2fa/setup', '/2fa/enable', '/2fa/disable', '/logout', '/session/refresh', '/request-password-reset', '/reset-password', '/change-password']) + + const server = http.createServer((req, res) => { + const url = (req.url || '').split('?')[0] + const method = req.method || 'GET' + // CORS: the account REST API is called cross-origin from the Tabby/Electron renderer (and + // the browser web-client). No cookies are used (bearer token in a header), so '*' is safe. + res.setHeader('Access-Control-Allow-Origin', '*') + res.setHeader('Access-Control-Allow-Headers', 'authorization, content-type') + res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS') + if (method === 'OPTIONS') { + res.writeHead(204) + res.end() + return + } + if ((method === 'GET' && url === '/sessions') || (method === 'POST' && REST_POST.has(url))) { + return handleRest(req, res) + } + if (url === '/health') { + res.writeHead(200, { 'content-type': 'application/json' }) + res.end(JSON.stringify({ ok: true, sessions: rooms.size, accounts: store.accounts.length })) + return + } + if (method === 'GET' && url === '/qrcode.js') { + res.writeHead(200, { 'content-type': 'application/javascript; charset=utf-8', 'cache-control': 'max-age=86400' }) + res.end(QRCODE_JS) + return + } + const m = /^\/s\/([^/?#]+)/.exec(req.url || '') + if (!m) { + if (method === 'GET' && (url === '/' || url === '/index.html')) { + res.writeHead(200, { 'content-type': 'text/html; charset=utf-8' }) + res.end(DASHBOARD_HTML) + } else { + res.writeHead(404, { 'content-type': 'text/plain' }) + res.end('not found\n') + } + return + } + const room = magicRoom(m[1]) + const entry = room && rooms.get(room) + if (!entry || !entry.host) { + res.writeHead(410, { 'content-type': 'text/plain' }) + res.end('link expired or unknown session') + return + } + const reqId = crypto.randomBytes(6).toString('hex') + pendingHttp.set(reqId, res) + safeSend(entry.host, j({ t: 'http-get', peerId: 0, reqId, path: '/' }), false) + const to = setTimeout(() => { + if (pendingHttp.has(reqId)) { + pendingHttp.delete(reqId) + res.writeHead(504) + res.end('tunnel timeout') + } + }, 5000) + if (typeof to.unref === 'function') { + to.unref() + } + }) + + const wss = new WebSocketServer({ server }) + + wss.on('connection', (sock, req) => { + sock._room = null + sock._peer = null + sock._kind = 'desktop' + sock._role = 'guest' + sock._lastSeen = now() + // account token (host) rides on the WS upgrade URL query: ?token= + let acct = null + try { + const q = new URL(req.url || '/', 'http://x').searchParams.get('token') + acct = q ? accountFromToken(q) : null + } catch { /* ignore */ } + sock._account = acct + + sock.on('message', (data, isBinary) => { + sock._lastSeen = now() + if (isBinary) { + if (sock._peer) { + safeSend(sock._peer, data, true) + } + return + } + const text = data.toString() + let msg = null + try { + msg = JSON.parse(text) + } catch { /* ignore non-JSON text */ } + if (msg && msg.t === 'ping') { + safeSend(sock, j({ t: 'pong' }), false) + return + } + if (msg && msg.t === 'pong') { + return + } + if (msg && msg.t === 'http-response') { + resolveHttp(msg) + return + } + if (sock._peer) { + safeSend(sock._peer, text, false) + return + } + if (msg) { + handleSignal(sock, msg) + } + }) + + sock.on('close', () => { + const room = sock._room + if (room && rooms.has(room)) { + const entry = rooms.get(room) + const other = entry.host === sock ? entry.guest : entry.host + safeSend(other, j({ t: 'peer-left', reason: 'socket-closed' }), false) + if (entry.host === sock) { + dropRoom(room) + } else { + entry.guest = null + entry.host._peer = null + } + } + }) + }) + + function handleSignal(sock, msg) { + switch (msg.t) { + case 'hello': + sock._kind = msg.kind || 'desktop' + sock._role = msg.role || 'guest' + break + case 'create-session': { + if (requireAuth && !sock._account) { + safeSend(sock, j({ t: 'error', code: 'unauthorized', message: 'login required to share' }), false) + return + } + const room = genCode() + const token = genToken() + const base = publicUrl || `http://127.0.0.1:${boundPort}` + const magicLink = `${base}/s/${token}` + rooms.set(room, { + host: sock, guest: null, + accountId: sock._account ? sock._account.id : null, + magicLink, createdAt: now(), + }) + magicTokens.set(token, { room, expiresAt: now() + tokenTtlMs }) + sock._room = room + recordShare(room, sock._account ? sock._account.id : null, magicLink) + safeSend(sock, j({ t: 'session-created', room, magicLink }), false) + break + } + case 'join': { + const room = msg.room ? String(msg.room).toUpperCase() : (msg.token ? magicRoom(msg.token) : null) + const entry = room && rooms.get(room) + if (!entry) { + safeSend(sock, j({ t: 'error', code: msg.token ? 'link-expired' : 'no-such-room' }), false) + return + } + if (entry.guest) { + safeSend(sock, j({ t: 'error', code: 'session-busy' }), false) + return + } + entry.guest = sock + sock._room = room + sock._peer = entry.host + entry.host._peer = sock + safeSend(entry.host, j({ t: 'peer-joined', peerId: 0, kind: sock._kind }), false) + break + } + default: + break + } + } + + // Reap idle sockets + prune expired auth tokens / totp sessions. + const reaper = setInterval(() => { + const cutoff = now() - IDLE_TIMEOUT_MS + for (const c of wss.clients) { + if (c._lastSeen < cutoff) { + try { c.terminate() } catch { /* ignore */ } + } + } + const before = store.tokens.length + store.tokens = store.tokens.filter(t => t.expiresAt > now() && !t.revokedAt) + if (store.tokens.length !== before) { + saveStore() + } + for (const [k, s] of totpSessions) { + if (s.expiresAt < now()) { + totpSessions.delete(k) + } + } + }, 30000) + if (typeof reaper.unref === 'function') { + reaper.unref() + } + + server.listen(port, bindHost, () => { + boundPort = server.address().port + if (!publicUrl) { + publicUrl = `http://${bindHost}:${boundPort}` + } + resolve({ + port: boundPort, + url: `ws://${bindHost === '0.0.0.0' ? '127.0.0.1' : bindHost}:${boundPort}`, + publicUrl, + requireAuth, + ephemeral, + close: () => new Promise(res => { + clearInterval(reaper) + for (const c of wss.clients) { + try { c.terminate() } catch { /* ignore */ } + } + wss.close(() => server.close(() => res())) + }), + }) + }) + }) +} + +module.exports = { startRelay, hashPassword, verifyPassword, base32Encode, base32Decode, totpAt, verifyTOTP, brevoSend, deliverVerifyCode } + +if (require.main === module) { + const port = Number(process.env.PORT || 8787) + const host = process.env.BIND || '0.0.0.0' + const publicUrl = process.env.PUBLIC_URL || '' + const tokenTtlMs = process.env.TOKEN_TTL_MS ? Number(process.env.TOKEN_TTL_MS) : undefined + startRelay(port, { host, publicUrl, tokenTtlMs }).then(s => { + console.log(`[peershell-server] listening ws://${host}:${s.port} public=${s.publicUrl || '(none)'} auth=${s.requireAuth} ${s.ephemeral ? 'EPHEMERAL' : 'persisted'}`) + }) +} diff --git a/server/src/qrcode.js b/server/src/qrcode.js new file mode 100644 index 0000000..76889b5 --- /dev/null +++ b/server/src/qrcode.js @@ -0,0 +1,2297 @@ +//--------------------------------------------------------------------- +// +// QR Code Generator for JavaScript +// +// Copyright (c) 2009 Kazuhiko Arase +// +// URL: http://www.d-project.com/ +// +// Licensed under the MIT license: +// http://www.opensource.org/licenses/mit-license.php +// +// The word 'QR Code' is registered trademark of +// DENSO WAVE INCORPORATED +// http://www.denso-wave.com/qrcode/faqpatent-e.html +// +//--------------------------------------------------------------------- + +var qrcode = function() { + + //--------------------------------------------------------------------- + // qrcode + //--------------------------------------------------------------------- + + /** + * qrcode + * @param typeNumber 1 to 40 + * @param errorCorrectionLevel 'L','M','Q','H' + */ + var qrcode = function(typeNumber, errorCorrectionLevel) { + + var PAD0 = 0xEC; + var PAD1 = 0x11; + + var _typeNumber = typeNumber; + var _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel]; + var _modules = null; + var _moduleCount = 0; + var _dataCache = null; + var _dataList = []; + + var _this = {}; + + var makeImpl = function(test, maskPattern) { + + _moduleCount = _typeNumber * 4 + 17; + _modules = function(moduleCount) { + var modules = new Array(moduleCount); + for (var row = 0; row < moduleCount; row += 1) { + modules[row] = new Array(moduleCount); + for (var col = 0; col < moduleCount; col += 1) { + modules[row][col] = null; + } + } + return modules; + }(_moduleCount); + + setupPositionProbePattern(0, 0); + setupPositionProbePattern(_moduleCount - 7, 0); + setupPositionProbePattern(0, _moduleCount - 7); + setupPositionAdjustPattern(); + setupTimingPattern(); + setupTypeInfo(test, maskPattern); + + if (_typeNumber >= 7) { + setupTypeNumber(test); + } + + if (_dataCache == null) { + _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList); + } + + mapData(_dataCache, maskPattern); + }; + + var setupPositionProbePattern = function(row, col) { + + for (var r = -1; r <= 7; r += 1) { + + if (row + r <= -1 || _moduleCount <= row + r) continue; + + for (var c = -1; c <= 7; c += 1) { + + if (col + c <= -1 || _moduleCount <= col + c) continue; + + if ( (0 <= r && r <= 6 && (c == 0 || c == 6) ) + || (0 <= c && c <= 6 && (r == 0 || r == 6) ) + || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) { + _modules[row + r][col + c] = true; + } else { + _modules[row + r][col + c] = false; + } + } + } + }; + + var getBestMaskPattern = function() { + + var minLostPoint = 0; + var pattern = 0; + + for (var i = 0; i < 8; i += 1) { + + makeImpl(true, i); + + var lostPoint = QRUtil.getLostPoint(_this); + + if (i == 0 || minLostPoint > lostPoint) { + minLostPoint = lostPoint; + pattern = i; + } + } + + return pattern; + }; + + var setupTimingPattern = function() { + + for (var r = 8; r < _moduleCount - 8; r += 1) { + if (_modules[r][6] != null) { + continue; + } + _modules[r][6] = (r % 2 == 0); + } + + for (var c = 8; c < _moduleCount - 8; c += 1) { + if (_modules[6][c] != null) { + continue; + } + _modules[6][c] = (c % 2 == 0); + } + }; + + var setupPositionAdjustPattern = function() { + + var pos = QRUtil.getPatternPosition(_typeNumber); + + for (var i = 0; i < pos.length; i += 1) { + + for (var j = 0; j < pos.length; j += 1) { + + var row = pos[i]; + var col = pos[j]; + + if (_modules[row][col] != null) { + continue; + } + + for (var r = -2; r <= 2; r += 1) { + + for (var c = -2; c <= 2; c += 1) { + + if (r == -2 || r == 2 || c == -2 || c == 2 + || (r == 0 && c == 0) ) { + _modules[row + r][col + c] = true; + } else { + _modules[row + r][col + c] = false; + } + } + } + } + } + }; + + var setupTypeNumber = function(test) { + + var bits = QRUtil.getBCHTypeNumber(_typeNumber); + + for (var i = 0; i < 18; i += 1) { + var mod = (!test && ( (bits >> i) & 1) == 1); + _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod; + } + + for (var i = 0; i < 18; i += 1) { + var mod = (!test && ( (bits >> i) & 1) == 1); + _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod; + } + }; + + var setupTypeInfo = function(test, maskPattern) { + + var data = (_errorCorrectionLevel << 3) | maskPattern; + var bits = QRUtil.getBCHTypeInfo(data); + + // vertical + for (var i = 0; i < 15; i += 1) { + + var mod = (!test && ( (bits >> i) & 1) == 1); + + if (i < 6) { + _modules[i][8] = mod; + } else if (i < 8) { + _modules[i + 1][8] = mod; + } else { + _modules[_moduleCount - 15 + i][8] = mod; + } + } + + // horizontal + for (var i = 0; i < 15; i += 1) { + + var mod = (!test && ( (bits >> i) & 1) == 1); + + if (i < 8) { + _modules[8][_moduleCount - i - 1] = mod; + } else if (i < 9) { + _modules[8][15 - i - 1 + 1] = mod; + } else { + _modules[8][15 - i - 1] = mod; + } + } + + // fixed module + _modules[_moduleCount - 8][8] = (!test); + }; + + var mapData = function(data, maskPattern) { + + var inc = -1; + var row = _moduleCount - 1; + var bitIndex = 7; + var byteIndex = 0; + var maskFunc = QRUtil.getMaskFunction(maskPattern); + + for (var col = _moduleCount - 1; col > 0; col -= 2) { + + if (col == 6) col -= 1; + + while (true) { + + for (var c = 0; c < 2; c += 1) { + + if (_modules[row][col - c] == null) { + + var dark = false; + + if (byteIndex < data.length) { + dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1); + } + + var mask = maskFunc(row, col - c); + + if (mask) { + dark = !dark; + } + + _modules[row][col - c] = dark; + bitIndex -= 1; + + if (bitIndex == -1) { + byteIndex += 1; + bitIndex = 7; + } + } + } + + row += inc; + + if (row < 0 || _moduleCount <= row) { + row -= inc; + inc = -inc; + break; + } + } + } + }; + + var createBytes = function(buffer, rsBlocks) { + + var offset = 0; + + var maxDcCount = 0; + var maxEcCount = 0; + + var dcdata = new Array(rsBlocks.length); + var ecdata = new Array(rsBlocks.length); + + for (var r = 0; r < rsBlocks.length; r += 1) { + + var dcCount = rsBlocks[r].dataCount; + var ecCount = rsBlocks[r].totalCount - dcCount; + + maxDcCount = Math.max(maxDcCount, dcCount); + maxEcCount = Math.max(maxEcCount, ecCount); + + dcdata[r] = new Array(dcCount); + + for (var i = 0; i < dcdata[r].length; i += 1) { + dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset]; + } + offset += dcCount; + + var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); + var rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1); + + var modPoly = rawPoly.mod(rsPoly); + ecdata[r] = new Array(rsPoly.getLength() - 1); + for (var i = 0; i < ecdata[r].length; i += 1) { + var modIndex = i + modPoly.getLength() - ecdata[r].length; + ecdata[r][i] = (modIndex >= 0)? modPoly.getAt(modIndex) : 0; + } + } + + var totalCodeCount = 0; + for (var i = 0; i < rsBlocks.length; i += 1) { + totalCodeCount += rsBlocks[i].totalCount; + } + + var data = new Array(totalCodeCount); + var index = 0; + + for (var i = 0; i < maxDcCount; i += 1) { + for (var r = 0; r < rsBlocks.length; r += 1) { + if (i < dcdata[r].length) { + data[index] = dcdata[r][i]; + index += 1; + } + } + } + + for (var i = 0; i < maxEcCount; i += 1) { + for (var r = 0; r < rsBlocks.length; r += 1) { + if (i < ecdata[r].length) { + data[index] = ecdata[r][i]; + index += 1; + } + } + } + + return data; + }; + + var createData = function(typeNumber, errorCorrectionLevel, dataList) { + + var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel); + + var buffer = qrBitBuffer(); + + for (var i = 0; i < dataList.length; i += 1) { + var data = dataList[i]; + buffer.put(data.getMode(), 4); + buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) ); + data.write(buffer); + } + + // calc num max data. + var totalDataCount = 0; + for (var i = 0; i < rsBlocks.length; i += 1) { + totalDataCount += rsBlocks[i].dataCount; + } + + if (buffer.getLengthInBits() > totalDataCount * 8) { + throw 'code length overflow. (' + + buffer.getLengthInBits() + + '>' + + totalDataCount * 8 + + ')'; + } + + // end code + if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) { + buffer.put(0, 4); + } + + // padding + while (buffer.getLengthInBits() % 8 != 0) { + buffer.putBit(false); + } + + // padding + while (true) { + + if (buffer.getLengthInBits() >= totalDataCount * 8) { + break; + } + buffer.put(PAD0, 8); + + if (buffer.getLengthInBits() >= totalDataCount * 8) { + break; + } + buffer.put(PAD1, 8); + } + + return createBytes(buffer, rsBlocks); + }; + + _this.addData = function(data, mode) { + + mode = mode || 'Byte'; + + var newData = null; + + switch(mode) { + case 'Numeric' : + newData = qrNumber(data); + break; + case 'Alphanumeric' : + newData = qrAlphaNum(data); + break; + case 'Byte' : + newData = qr8BitByte(data); + break; + case 'Kanji' : + newData = qrKanji(data); + break; + default : + throw 'mode:' + mode; + } + + _dataList.push(newData); + _dataCache = null; + }; + + _this.isDark = function(row, col) { + if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) { + throw row + ',' + col; + } + return _modules[row][col]; + }; + + _this.getModuleCount = function() { + return _moduleCount; + }; + + _this.make = function() { + if (_typeNumber < 1) { + var typeNumber = 1; + + for (; typeNumber < 40; typeNumber++) { + var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel); + var buffer = qrBitBuffer(); + + for (var i = 0; i < _dataList.length; i++) { + var data = _dataList[i]; + buffer.put(data.getMode(), 4); + buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) ); + data.write(buffer); + } + + var totalDataCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + totalDataCount += rsBlocks[i].dataCount; + } + + if (buffer.getLengthInBits() <= totalDataCount * 8) { + break; + } + } + + _typeNumber = typeNumber; + } + + makeImpl(false, getBestMaskPattern() ); + }; + + _this.createTableTag = function(cellSize, margin) { + + cellSize = cellSize || 2; + margin = (typeof margin == 'undefined')? cellSize * 4 : margin; + + var qrHtml = ''; + + qrHtml += ''; + qrHtml += ''; + + for (var r = 0; r < _this.getModuleCount(); r += 1) { + + qrHtml += ''; + + for (var c = 0; c < _this.getModuleCount(); c += 1) { + qrHtml += ''; + } + + qrHtml += ''; + qrHtml += '
'; + } + + qrHtml += '
'; + + return qrHtml; + }; + + _this.createSvgTag = function(cellSize, margin, alt, title) { + + var opts = {}; + if (typeof arguments[0] == 'object') { + // Called by options. + opts = arguments[0]; + // overwrite cellSize and margin. + cellSize = opts.cellSize; + margin = opts.margin; + alt = opts.alt; + title = opts.title; + } + + cellSize = cellSize || 2; + margin = (typeof margin == 'undefined')? cellSize * 4 : margin; + + // Compose alt property surrogate + alt = (typeof alt === 'string') ? {text: alt} : alt || {}; + alt.text = alt.text || null; + alt.id = (alt.text) ? alt.id || 'qrcode-description' : null; + + // Compose title property surrogate + title = (typeof title === 'string') ? {text: title} : title || {}; + title.text = title.text || null; + title.id = (title.text) ? title.id || 'qrcode-title' : null; + + var size = _this.getModuleCount() * cellSize + margin * 2; + var c, mc, r, mr, qrSvg='', rect; + + rect = 'l' + cellSize + ',0 0,' + cellSize + + ' -' + cellSize + ',0 0,-' + cellSize + 'z '; + + qrSvg += '' + + escapeXml(title.text) + '' : ''; + qrSvg += (alt.text) ? '' + + escapeXml(alt.text) + '' : ''; + qrSvg += ''; + qrSvg += ''; + qrSvg += ''; + + return qrSvg; + }; + + _this.createDataURL = function(cellSize, margin) { + + cellSize = cellSize || 2; + margin = (typeof margin == 'undefined')? cellSize * 4 : margin; + + var size = _this.getModuleCount() * cellSize + margin * 2; + var min = margin; + var max = size - margin; + + return createDataURL(size, size, function(x, y) { + if (min <= x && x < max && min <= y && y < max) { + var c = Math.floor( (x - min) / cellSize); + var r = Math.floor( (y - min) / cellSize); + return _this.isDark(r, c)? 0 : 1; + } else { + return 1; + } + } ); + }; + + _this.createImgTag = function(cellSize, margin, alt) { + + cellSize = cellSize || 2; + margin = (typeof margin == 'undefined')? cellSize * 4 : margin; + + var size = _this.getModuleCount() * cellSize + margin * 2; + + var img = ''; + img += '': escaped += '>'; break; + case '&': escaped += '&'; break; + case '"': escaped += '"'; break; + default : escaped += c; break; + } + } + return escaped; + }; + + var _createHalfASCII = function(margin) { + var cellSize = 1; + margin = (typeof margin == 'undefined')? cellSize * 2 : margin; + + var size = _this.getModuleCount() * cellSize + margin * 2; + var min = margin; + var max = size - margin; + + var y, x, r1, r2, p; + + var blocks = { + '██': '█', + '█ ': '▀', + ' █': '▄', + ' ': ' ' + }; + + var blocksLastLineNoMargin = { + '██': '▀', + '█ ': '▀', + ' █': ' ', + ' ': ' ' + }; + + var ascii = ''; + for (y = 0; y < size; y += 2) { + r1 = Math.floor((y - min) / cellSize); + r2 = Math.floor((y + 1 - min) / cellSize); + for (x = 0; x < size; x += 1) { + p = '█'; + + if (min <= x && x < max && min <= y && y < max && _this.isDark(r1, Math.floor((x - min) / cellSize))) { + p = ' '; + } + + if (min <= x && x < max && min <= y+1 && y+1 < max && _this.isDark(r2, Math.floor((x - min) / cellSize))) { + p += ' '; + } + else { + p += '█'; + } + + // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square. + ascii += (margin < 1 && y+1 >= max) ? blocksLastLineNoMargin[p] : blocks[p]; + } + + ascii += '\n'; + } + + if (size % 2 && margin > 0) { + return ascii.substring(0, ascii.length - size - 1) + Array(size+1).join('▀'); + } + + return ascii.substring(0, ascii.length-1); + }; + + _this.createASCII = function(cellSize, margin) { + cellSize = cellSize || 1; + + if (cellSize < 2) { + return _createHalfASCII(margin); + } + + cellSize -= 1; + margin = (typeof margin == 'undefined')? cellSize * 2 : margin; + + var size = _this.getModuleCount() * cellSize + margin * 2; + var min = margin; + var max = size - margin; + + var y, x, r, p; + + var white = Array(cellSize+1).join('██'); + var black = Array(cellSize+1).join(' '); + + var ascii = ''; + var line = ''; + for (y = 0; y < size; y += 1) { + r = Math.floor( (y - min) / cellSize); + line = ''; + for (x = 0; x < size; x += 1) { + p = 1; + + if (min <= x && x < max && min <= y && y < max && _this.isDark(r, Math.floor((x - min) / cellSize))) { + p = 0; + } + + // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square. + line += p ? white : black; + } + + for (r = 0; r < cellSize; r += 1) { + ascii += line + '\n'; + } + } + + return ascii.substring(0, ascii.length-1); + }; + + _this.renderTo2dContext = function(context, cellSize) { + cellSize = cellSize || 2; + var length = _this.getModuleCount(); + for (var row = 0; row < length; row++) { + for (var col = 0; col < length; col++) { + context.fillStyle = _this.isDark(row, col) ? 'black' : 'white'; + context.fillRect(row * cellSize, col * cellSize, cellSize, cellSize); + } + } + } + + return _this; + }; + + //--------------------------------------------------------------------- + // qrcode.stringToBytes + //--------------------------------------------------------------------- + + qrcode.stringToBytesFuncs = { + 'default' : function(s) { + var bytes = []; + for (var i = 0; i < s.length; i += 1) { + var c = s.charCodeAt(i); + bytes.push(c & 0xff); + } + return bytes; + } + }; + + qrcode.stringToBytes = qrcode.stringToBytesFuncs['default']; + + //--------------------------------------------------------------------- + // qrcode.createStringToBytes + //--------------------------------------------------------------------- + + /** + * @param unicodeData base64 string of byte array. + * [16bit Unicode],[16bit Bytes], ... + * @param numChars + */ + qrcode.createStringToBytes = function(unicodeData, numChars) { + + // create conversion map. + + var unicodeMap = function() { + + var bin = base64DecodeInputStream(unicodeData); + var read = function() { + var b = bin.read(); + if (b == -1) throw 'eof'; + return b; + }; + + var count = 0; + var unicodeMap = {}; + while (true) { + var b0 = bin.read(); + if (b0 == -1) break; + var b1 = read(); + var b2 = read(); + var b3 = read(); + var k = String.fromCharCode( (b0 << 8) | b1); + var v = (b2 << 8) | b3; + unicodeMap[k] = v; + count += 1; + } + if (count != numChars) { + throw count + ' != ' + numChars; + } + + return unicodeMap; + }(); + + var unknownChar = '?'.charCodeAt(0); + + return function(s) { + var bytes = []; + for (var i = 0; i < s.length; i += 1) { + var c = s.charCodeAt(i); + if (c < 128) { + bytes.push(c); + } else { + var b = unicodeMap[s.charAt(i)]; + if (typeof b == 'number') { + if ( (b & 0xff) == b) { + // 1byte + bytes.push(b); + } else { + // 2bytes + bytes.push(b >>> 8); + bytes.push(b & 0xff); + } + } else { + bytes.push(unknownChar); + } + } + } + return bytes; + }; + }; + + //--------------------------------------------------------------------- + // QRMode + //--------------------------------------------------------------------- + + var QRMode = { + MODE_NUMBER : 1 << 0, + MODE_ALPHA_NUM : 1 << 1, + MODE_8BIT_BYTE : 1 << 2, + MODE_KANJI : 1 << 3 + }; + + //--------------------------------------------------------------------- + // QRErrorCorrectionLevel + //--------------------------------------------------------------------- + + var QRErrorCorrectionLevel = { + L : 1, + M : 0, + Q : 3, + H : 2 + }; + + //--------------------------------------------------------------------- + // QRMaskPattern + //--------------------------------------------------------------------- + + var QRMaskPattern = { + PATTERN000 : 0, + PATTERN001 : 1, + PATTERN010 : 2, + PATTERN011 : 3, + PATTERN100 : 4, + PATTERN101 : 5, + PATTERN110 : 6, + PATTERN111 : 7 + }; + + //--------------------------------------------------------------------- + // QRUtil + //--------------------------------------------------------------------- + + var QRUtil = function() { + + var PATTERN_POSITION_TABLE = [ + [], + [6, 18], + [6, 22], + [6, 26], + [6, 30], + [6, 34], + [6, 22, 38], + [6, 24, 42], + [6, 26, 46], + [6, 28, 50], + [6, 30, 54], + [6, 32, 58], + [6, 34, 62], + [6, 26, 46, 66], + [6, 26, 48, 70], + [6, 26, 50, 74], + [6, 30, 54, 78], + [6, 30, 56, 82], + [6, 30, 58, 86], + [6, 34, 62, 90], + [6, 28, 50, 72, 94], + [6, 26, 50, 74, 98], + [6, 30, 54, 78, 102], + [6, 28, 54, 80, 106], + [6, 32, 58, 84, 110], + [6, 30, 58, 86, 114], + [6, 34, 62, 90, 118], + [6, 26, 50, 74, 98, 122], + [6, 30, 54, 78, 102, 126], + [6, 26, 52, 78, 104, 130], + [6, 30, 56, 82, 108, 134], + [6, 34, 60, 86, 112, 138], + [6, 30, 58, 86, 114, 142], + [6, 34, 62, 90, 118, 146], + [6, 30, 54, 78, 102, 126, 150], + [6, 24, 50, 76, 102, 128, 154], + [6, 28, 54, 80, 106, 132, 158], + [6, 32, 58, 84, 110, 136, 162], + [6, 26, 54, 82, 110, 138, 166], + [6, 30, 58, 86, 114, 142, 170] + ]; + var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0); + var G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0); + var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1); + + var _this = {}; + + var getBCHDigit = function(data) { + var digit = 0; + while (data != 0) { + digit += 1; + data >>>= 1; + } + return digit; + }; + + _this.getBCHTypeInfo = function(data) { + var d = data << 10; + while (getBCHDigit(d) - getBCHDigit(G15) >= 0) { + d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15) ) ); + } + return ( (data << 10) | d) ^ G15_MASK; + }; + + _this.getBCHTypeNumber = function(data) { + var d = data << 12; + while (getBCHDigit(d) - getBCHDigit(G18) >= 0) { + d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18) ) ); + } + return (data << 12) | d; + }; + + _this.getPatternPosition = function(typeNumber) { + return PATTERN_POSITION_TABLE[typeNumber - 1]; + }; + + _this.getMaskFunction = function(maskPattern) { + + switch (maskPattern) { + + case QRMaskPattern.PATTERN000 : + return function(i, j) { return (i + j) % 2 == 0; }; + case QRMaskPattern.PATTERN001 : + return function(i, j) { return i % 2 == 0; }; + case QRMaskPattern.PATTERN010 : + return function(i, j) { return j % 3 == 0; }; + case QRMaskPattern.PATTERN011 : + return function(i, j) { return (i + j) % 3 == 0; }; + case QRMaskPattern.PATTERN100 : + return function(i, j) { return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; }; + case QRMaskPattern.PATTERN101 : + return function(i, j) { return (i * j) % 2 + (i * j) % 3 == 0; }; + case QRMaskPattern.PATTERN110 : + return function(i, j) { return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; }; + case QRMaskPattern.PATTERN111 : + return function(i, j) { return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; }; + + default : + throw 'bad maskPattern:' + maskPattern; + } + }; + + _this.getErrorCorrectPolynomial = function(errorCorrectLength) { + var a = qrPolynomial([1], 0); + for (var i = 0; i < errorCorrectLength; i += 1) { + a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0) ); + } + return a; + }; + + _this.getLengthInBits = function(mode, type) { + + if (1 <= type && type < 10) { + + // 1 - 9 + + switch(mode) { + case QRMode.MODE_NUMBER : return 10; + case QRMode.MODE_ALPHA_NUM : return 9; + case QRMode.MODE_8BIT_BYTE : return 8; + case QRMode.MODE_KANJI : return 8; + default : + throw 'mode:' + mode; + } + + } else if (type < 27) { + + // 10 - 26 + + switch(mode) { + case QRMode.MODE_NUMBER : return 12; + case QRMode.MODE_ALPHA_NUM : return 11; + case QRMode.MODE_8BIT_BYTE : return 16; + case QRMode.MODE_KANJI : return 10; + default : + throw 'mode:' + mode; + } + + } else if (type < 41) { + + // 27 - 40 + + switch(mode) { + case QRMode.MODE_NUMBER : return 14; + case QRMode.MODE_ALPHA_NUM : return 13; + case QRMode.MODE_8BIT_BYTE : return 16; + case QRMode.MODE_KANJI : return 12; + default : + throw 'mode:' + mode; + } + + } else { + throw 'type:' + type; + } + }; + + _this.getLostPoint = function(qrcode) { + + var moduleCount = qrcode.getModuleCount(); + + var lostPoint = 0; + + // LEVEL1 + + for (var row = 0; row < moduleCount; row += 1) { + for (var col = 0; col < moduleCount; col += 1) { + + var sameCount = 0; + var dark = qrcode.isDark(row, col); + + for (var r = -1; r <= 1; r += 1) { + + if (row + r < 0 || moduleCount <= row + r) { + continue; + } + + for (var c = -1; c <= 1; c += 1) { + + if (col + c < 0 || moduleCount <= col + c) { + continue; + } + + if (r == 0 && c == 0) { + continue; + } + + if (dark == qrcode.isDark(row + r, col + c) ) { + sameCount += 1; + } + } + } + + if (sameCount > 5) { + lostPoint += (3 + sameCount - 5); + } + } + }; + + // LEVEL2 + + for (var row = 0; row < moduleCount - 1; row += 1) { + for (var col = 0; col < moduleCount - 1; col += 1) { + var count = 0; + if (qrcode.isDark(row, col) ) count += 1; + if (qrcode.isDark(row + 1, col) ) count += 1; + if (qrcode.isDark(row, col + 1) ) count += 1; + if (qrcode.isDark(row + 1, col + 1) ) count += 1; + if (count == 0 || count == 4) { + lostPoint += 3; + } + } + } + + // LEVEL3 + + for (var row = 0; row < moduleCount; row += 1) { + for (var col = 0; col < moduleCount - 6; col += 1) { + if (qrcode.isDark(row, col) + && !qrcode.isDark(row, col + 1) + && qrcode.isDark(row, col + 2) + && qrcode.isDark(row, col + 3) + && qrcode.isDark(row, col + 4) + && !qrcode.isDark(row, col + 5) + && qrcode.isDark(row, col + 6) ) { + lostPoint += 40; + } + } + } + + for (var col = 0; col < moduleCount; col += 1) { + for (var row = 0; row < moduleCount - 6; row += 1) { + if (qrcode.isDark(row, col) + && !qrcode.isDark(row + 1, col) + && qrcode.isDark(row + 2, col) + && qrcode.isDark(row + 3, col) + && qrcode.isDark(row + 4, col) + && !qrcode.isDark(row + 5, col) + && qrcode.isDark(row + 6, col) ) { + lostPoint += 40; + } + } + } + + // LEVEL4 + + var darkCount = 0; + + for (var col = 0; col < moduleCount; col += 1) { + for (var row = 0; row < moduleCount; row += 1) { + if (qrcode.isDark(row, col) ) { + darkCount += 1; + } + } + } + + var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; + lostPoint += ratio * 10; + + return lostPoint; + }; + + return _this; + }(); + + //--------------------------------------------------------------------- + // QRMath + //--------------------------------------------------------------------- + + var QRMath = function() { + + var EXP_TABLE = new Array(256); + var LOG_TABLE = new Array(256); + + // initialize tables + for (var i = 0; i < 8; i += 1) { + EXP_TABLE[i] = 1 << i; + } + for (var i = 8; i < 256; i += 1) { + EXP_TABLE[i] = EXP_TABLE[i - 4] + ^ EXP_TABLE[i - 5] + ^ EXP_TABLE[i - 6] + ^ EXP_TABLE[i - 8]; + } + for (var i = 0; i < 255; i += 1) { + LOG_TABLE[EXP_TABLE[i] ] = i; + } + + var _this = {}; + + _this.glog = function(n) { + + if (n < 1) { + throw 'glog(' + n + ')'; + } + + return LOG_TABLE[n]; + }; + + _this.gexp = function(n) { + + while (n < 0) { + n += 255; + } + + while (n >= 256) { + n -= 255; + } + + return EXP_TABLE[n]; + }; + + return _this; + }(); + + //--------------------------------------------------------------------- + // qrPolynomial + //--------------------------------------------------------------------- + + function qrPolynomial(num, shift) { + + if (typeof num.length == 'undefined') { + throw num.length + '/' + shift; + } + + var _num = function() { + var offset = 0; + while (offset < num.length && num[offset] == 0) { + offset += 1; + } + var _num = new Array(num.length - offset + shift); + for (var i = 0; i < num.length - offset; i += 1) { + _num[i] = num[i + offset]; + } + return _num; + }(); + + var _this = {}; + + _this.getAt = function(index) { + return _num[index]; + }; + + _this.getLength = function() { + return _num.length; + }; + + _this.multiply = function(e) { + + var num = new Array(_this.getLength() + e.getLength() - 1); + + for (var i = 0; i < _this.getLength(); i += 1) { + for (var j = 0; j < e.getLength(); j += 1) { + num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) ); + } + } + + return qrPolynomial(num, 0); + }; + + _this.mod = function(e) { + + if (_this.getLength() - e.getLength() < 0) { + return _this; + } + + var ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) ); + + var num = new Array(_this.getLength() ); + for (var i = 0; i < _this.getLength(); i += 1) { + num[i] = _this.getAt(i); + } + + for (var i = 0; i < e.getLength(); i += 1) { + num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio); + } + + // recursive call + return qrPolynomial(num, 0).mod(e); + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // QRRSBlock + //--------------------------------------------------------------------- + + var QRRSBlock = function() { + + var RS_BLOCK_TABLE = [ + + // L + // M + // Q + // H + + // 1 + [1, 26, 19], + [1, 26, 16], + [1, 26, 13], + [1, 26, 9], + + // 2 + [1, 44, 34], + [1, 44, 28], + [1, 44, 22], + [1, 44, 16], + + // 3 + [1, 70, 55], + [1, 70, 44], + [2, 35, 17], + [2, 35, 13], + + // 4 + [1, 100, 80], + [2, 50, 32], + [2, 50, 24], + [4, 25, 9], + + // 5 + [1, 134, 108], + [2, 67, 43], + [2, 33, 15, 2, 34, 16], + [2, 33, 11, 2, 34, 12], + + // 6 + [2, 86, 68], + [4, 43, 27], + [4, 43, 19], + [4, 43, 15], + + // 7 + [2, 98, 78], + [4, 49, 31], + [2, 32, 14, 4, 33, 15], + [4, 39, 13, 1, 40, 14], + + // 8 + [2, 121, 97], + [2, 60, 38, 2, 61, 39], + [4, 40, 18, 2, 41, 19], + [4, 40, 14, 2, 41, 15], + + // 9 + [2, 146, 116], + [3, 58, 36, 2, 59, 37], + [4, 36, 16, 4, 37, 17], + [4, 36, 12, 4, 37, 13], + + // 10 + [2, 86, 68, 2, 87, 69], + [4, 69, 43, 1, 70, 44], + [6, 43, 19, 2, 44, 20], + [6, 43, 15, 2, 44, 16], + + // 11 + [4, 101, 81], + [1, 80, 50, 4, 81, 51], + [4, 50, 22, 4, 51, 23], + [3, 36, 12, 8, 37, 13], + + // 12 + [2, 116, 92, 2, 117, 93], + [6, 58, 36, 2, 59, 37], + [4, 46, 20, 6, 47, 21], + [7, 42, 14, 4, 43, 15], + + // 13 + [4, 133, 107], + [8, 59, 37, 1, 60, 38], + [8, 44, 20, 4, 45, 21], + [12, 33, 11, 4, 34, 12], + + // 14 + [3, 145, 115, 1, 146, 116], + [4, 64, 40, 5, 65, 41], + [11, 36, 16, 5, 37, 17], + [11, 36, 12, 5, 37, 13], + + // 15 + [5, 109, 87, 1, 110, 88], + [5, 65, 41, 5, 66, 42], + [5, 54, 24, 7, 55, 25], + [11, 36, 12, 7, 37, 13], + + // 16 + [5, 122, 98, 1, 123, 99], + [7, 73, 45, 3, 74, 46], + [15, 43, 19, 2, 44, 20], + [3, 45, 15, 13, 46, 16], + + // 17 + [1, 135, 107, 5, 136, 108], + [10, 74, 46, 1, 75, 47], + [1, 50, 22, 15, 51, 23], + [2, 42, 14, 17, 43, 15], + + // 18 + [5, 150, 120, 1, 151, 121], + [9, 69, 43, 4, 70, 44], + [17, 50, 22, 1, 51, 23], + [2, 42, 14, 19, 43, 15], + + // 19 + [3, 141, 113, 4, 142, 114], + [3, 70, 44, 11, 71, 45], + [17, 47, 21, 4, 48, 22], + [9, 39, 13, 16, 40, 14], + + // 20 + [3, 135, 107, 5, 136, 108], + [3, 67, 41, 13, 68, 42], + [15, 54, 24, 5, 55, 25], + [15, 43, 15, 10, 44, 16], + + // 21 + [4, 144, 116, 4, 145, 117], + [17, 68, 42], + [17, 50, 22, 6, 51, 23], + [19, 46, 16, 6, 47, 17], + + // 22 + [2, 139, 111, 7, 140, 112], + [17, 74, 46], + [7, 54, 24, 16, 55, 25], + [34, 37, 13], + + // 23 + [4, 151, 121, 5, 152, 122], + [4, 75, 47, 14, 76, 48], + [11, 54, 24, 14, 55, 25], + [16, 45, 15, 14, 46, 16], + + // 24 + [6, 147, 117, 4, 148, 118], + [6, 73, 45, 14, 74, 46], + [11, 54, 24, 16, 55, 25], + [30, 46, 16, 2, 47, 17], + + // 25 + [8, 132, 106, 4, 133, 107], + [8, 75, 47, 13, 76, 48], + [7, 54, 24, 22, 55, 25], + [22, 45, 15, 13, 46, 16], + + // 26 + [10, 142, 114, 2, 143, 115], + [19, 74, 46, 4, 75, 47], + [28, 50, 22, 6, 51, 23], + [33, 46, 16, 4, 47, 17], + + // 27 + [8, 152, 122, 4, 153, 123], + [22, 73, 45, 3, 74, 46], + [8, 53, 23, 26, 54, 24], + [12, 45, 15, 28, 46, 16], + + // 28 + [3, 147, 117, 10, 148, 118], + [3, 73, 45, 23, 74, 46], + [4, 54, 24, 31, 55, 25], + [11, 45, 15, 31, 46, 16], + + // 29 + [7, 146, 116, 7, 147, 117], + [21, 73, 45, 7, 74, 46], + [1, 53, 23, 37, 54, 24], + [19, 45, 15, 26, 46, 16], + + // 30 + [5, 145, 115, 10, 146, 116], + [19, 75, 47, 10, 76, 48], + [15, 54, 24, 25, 55, 25], + [23, 45, 15, 25, 46, 16], + + // 31 + [13, 145, 115, 3, 146, 116], + [2, 74, 46, 29, 75, 47], + [42, 54, 24, 1, 55, 25], + [23, 45, 15, 28, 46, 16], + + // 32 + [17, 145, 115], + [10, 74, 46, 23, 75, 47], + [10, 54, 24, 35, 55, 25], + [19, 45, 15, 35, 46, 16], + + // 33 + [17, 145, 115, 1, 146, 116], + [14, 74, 46, 21, 75, 47], + [29, 54, 24, 19, 55, 25], + [11, 45, 15, 46, 46, 16], + + // 34 + [13, 145, 115, 6, 146, 116], + [14, 74, 46, 23, 75, 47], + [44, 54, 24, 7, 55, 25], + [59, 46, 16, 1, 47, 17], + + // 35 + [12, 151, 121, 7, 152, 122], + [12, 75, 47, 26, 76, 48], + [39, 54, 24, 14, 55, 25], + [22, 45, 15, 41, 46, 16], + + // 36 + [6, 151, 121, 14, 152, 122], + [6, 75, 47, 34, 76, 48], + [46, 54, 24, 10, 55, 25], + [2, 45, 15, 64, 46, 16], + + // 37 + [17, 152, 122, 4, 153, 123], + [29, 74, 46, 14, 75, 47], + [49, 54, 24, 10, 55, 25], + [24, 45, 15, 46, 46, 16], + + // 38 + [4, 152, 122, 18, 153, 123], + [13, 74, 46, 32, 75, 47], + [48, 54, 24, 14, 55, 25], + [42, 45, 15, 32, 46, 16], + + // 39 + [20, 147, 117, 4, 148, 118], + [40, 75, 47, 7, 76, 48], + [43, 54, 24, 22, 55, 25], + [10, 45, 15, 67, 46, 16], + + // 40 + [19, 148, 118, 6, 149, 119], + [18, 75, 47, 31, 76, 48], + [34, 54, 24, 34, 55, 25], + [20, 45, 15, 61, 46, 16] + ]; + + var qrRSBlock = function(totalCount, dataCount) { + var _this = {}; + _this.totalCount = totalCount; + _this.dataCount = dataCount; + return _this; + }; + + var _this = {}; + + var getRsBlockTable = function(typeNumber, errorCorrectionLevel) { + + switch(errorCorrectionLevel) { + case QRErrorCorrectionLevel.L : + return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; + case QRErrorCorrectionLevel.M : + return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; + case QRErrorCorrectionLevel.Q : + return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; + case QRErrorCorrectionLevel.H : + return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; + default : + return undefined; + } + }; + + _this.getRSBlocks = function(typeNumber, errorCorrectionLevel) { + + var rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel); + + if (typeof rsBlock == 'undefined') { + throw 'bad rs block @ typeNumber:' + typeNumber + + '/errorCorrectionLevel:' + errorCorrectionLevel; + } + + var length = rsBlock.length / 3; + + var list = []; + + for (var i = 0; i < length; i += 1) { + + var count = rsBlock[i * 3 + 0]; + var totalCount = rsBlock[i * 3 + 1]; + var dataCount = rsBlock[i * 3 + 2]; + + for (var j = 0; j < count; j += 1) { + list.push(qrRSBlock(totalCount, dataCount) ); + } + } + + return list; + }; + + return _this; + }(); + + //--------------------------------------------------------------------- + // qrBitBuffer + //--------------------------------------------------------------------- + + var qrBitBuffer = function() { + + var _buffer = []; + var _length = 0; + + var _this = {}; + + _this.getBuffer = function() { + return _buffer; + }; + + _this.getAt = function(index) { + var bufIndex = Math.floor(index / 8); + return ( (_buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1; + }; + + _this.put = function(num, length) { + for (var i = 0; i < length; i += 1) { + _this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1); + } + }; + + _this.getLengthInBits = function() { + return _length; + }; + + _this.putBit = function(bit) { + + var bufIndex = Math.floor(_length / 8); + if (_buffer.length <= bufIndex) { + _buffer.push(0); + } + + if (bit) { + _buffer[bufIndex] |= (0x80 >>> (_length % 8) ); + } + + _length += 1; + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // qrNumber + //--------------------------------------------------------------------- + + var qrNumber = function(data) { + + var _mode = QRMode.MODE_NUMBER; + var _data = data; + + var _this = {}; + + _this.getMode = function() { + return _mode; + }; + + _this.getLength = function(buffer) { + return _data.length; + }; + + _this.write = function(buffer) { + + var data = _data; + + var i = 0; + + while (i + 2 < data.length) { + buffer.put(strToNum(data.substring(i, i + 3) ), 10); + i += 3; + } + + if (i < data.length) { + if (data.length - i == 1) { + buffer.put(strToNum(data.substring(i, i + 1) ), 4); + } else if (data.length - i == 2) { + buffer.put(strToNum(data.substring(i, i + 2) ), 7); + } + } + }; + + var strToNum = function(s) { + var num = 0; + for (var i = 0; i < s.length; i += 1) { + num = num * 10 + chatToNum(s.charAt(i) ); + } + return num; + }; + + var chatToNum = function(c) { + if ('0' <= c && c <= '9') { + return c.charCodeAt(0) - '0'.charCodeAt(0); + } + throw 'illegal char :' + c; + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // qrAlphaNum + //--------------------------------------------------------------------- + + var qrAlphaNum = function(data) { + + var _mode = QRMode.MODE_ALPHA_NUM; + var _data = data; + + var _this = {}; + + _this.getMode = function() { + return _mode; + }; + + _this.getLength = function(buffer) { + return _data.length; + }; + + _this.write = function(buffer) { + + var s = _data; + + var i = 0; + + while (i + 1 < s.length) { + buffer.put( + getCode(s.charAt(i) ) * 45 + + getCode(s.charAt(i + 1) ), 11); + i += 2; + } + + if (i < s.length) { + buffer.put(getCode(s.charAt(i) ), 6); + } + }; + + var getCode = function(c) { + + if ('0' <= c && c <= '9') { + return c.charCodeAt(0) - '0'.charCodeAt(0); + } else if ('A' <= c && c <= 'Z') { + return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10; + } else { + switch (c) { + case ' ' : return 36; + case '$' : return 37; + case '%' : return 38; + case '*' : return 39; + case '+' : return 40; + case '-' : return 41; + case '.' : return 42; + case '/' : return 43; + case ':' : return 44; + default : + throw 'illegal char :' + c; + } + } + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // qr8BitByte + //--------------------------------------------------------------------- + + var qr8BitByte = function(data) { + + var _mode = QRMode.MODE_8BIT_BYTE; + var _data = data; + var _bytes = qrcode.stringToBytes(data); + + var _this = {}; + + _this.getMode = function() { + return _mode; + }; + + _this.getLength = function(buffer) { + return _bytes.length; + }; + + _this.write = function(buffer) { + for (var i = 0; i < _bytes.length; i += 1) { + buffer.put(_bytes[i], 8); + } + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // qrKanji + //--------------------------------------------------------------------- + + var qrKanji = function(data) { + + var _mode = QRMode.MODE_KANJI; + var _data = data; + + var stringToBytes = qrcode.stringToBytesFuncs['SJIS']; + if (!stringToBytes) { + throw 'sjis not supported.'; + } + !function(c, code) { + // self test for sjis support. + var test = stringToBytes(c); + if (test.length != 2 || ( (test[0] << 8) | test[1]) != code) { + throw 'sjis not supported.'; + } + }('\u53cb', 0x9746); + + var _bytes = stringToBytes(data); + + var _this = {}; + + _this.getMode = function() { + return _mode; + }; + + _this.getLength = function(buffer) { + return ~~(_bytes.length / 2); + }; + + _this.write = function(buffer) { + + var data = _bytes; + + var i = 0; + + while (i + 1 < data.length) { + + var c = ( (0xff & data[i]) << 8) | (0xff & data[i + 1]); + + if (0x8140 <= c && c <= 0x9FFC) { + c -= 0x8140; + } else if (0xE040 <= c && c <= 0xEBBF) { + c -= 0xC140; + } else { + throw 'illegal char at ' + (i + 1) + '/' + c; + } + + c = ( (c >>> 8) & 0xff) * 0xC0 + (c & 0xff); + + buffer.put(c, 13); + + i += 2; + } + + if (i < data.length) { + throw 'illegal char at ' + (i + 1); + } + }; + + return _this; + }; + + //===================================================================== + // GIF Support etc. + // + + //--------------------------------------------------------------------- + // byteArrayOutputStream + //--------------------------------------------------------------------- + + var byteArrayOutputStream = function() { + + var _bytes = []; + + var _this = {}; + + _this.writeByte = function(b) { + _bytes.push(b & 0xff); + }; + + _this.writeShort = function(i) { + _this.writeByte(i); + _this.writeByte(i >>> 8); + }; + + _this.writeBytes = function(b, off, len) { + off = off || 0; + len = len || b.length; + for (var i = 0; i < len; i += 1) { + _this.writeByte(b[i + off]); + } + }; + + _this.writeString = function(s) { + for (var i = 0; i < s.length; i += 1) { + _this.writeByte(s.charCodeAt(i) ); + } + }; + + _this.toByteArray = function() { + return _bytes; + }; + + _this.toString = function() { + var s = ''; + s += '['; + for (var i = 0; i < _bytes.length; i += 1) { + if (i > 0) { + s += ','; + } + s += _bytes[i]; + } + s += ']'; + return s; + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // base64EncodeOutputStream + //--------------------------------------------------------------------- + + var base64EncodeOutputStream = function() { + + var _buffer = 0; + var _buflen = 0; + var _length = 0; + var _base64 = ''; + + var _this = {}; + + var writeEncoded = function(b) { + _base64 += String.fromCharCode(encode(b & 0x3f) ); + }; + + var encode = function(n) { + if (n < 0) { + // error. + } else if (n < 26) { + return 0x41 + n; + } else if (n < 52) { + return 0x61 + (n - 26); + } else if (n < 62) { + return 0x30 + (n - 52); + } else if (n == 62) { + return 0x2b; + } else if (n == 63) { + return 0x2f; + } + throw 'n:' + n; + }; + + _this.writeByte = function(n) { + + _buffer = (_buffer << 8) | (n & 0xff); + _buflen += 8; + _length += 1; + + while (_buflen >= 6) { + writeEncoded(_buffer >>> (_buflen - 6) ); + _buflen -= 6; + } + }; + + _this.flush = function() { + + if (_buflen > 0) { + writeEncoded(_buffer << (6 - _buflen) ); + _buffer = 0; + _buflen = 0; + } + + if (_length % 3 != 0) { + // padding + var padlen = 3 - _length % 3; + for (var i = 0; i < padlen; i += 1) { + _base64 += '='; + } + } + }; + + _this.toString = function() { + return _base64; + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // base64DecodeInputStream + //--------------------------------------------------------------------- + + var base64DecodeInputStream = function(str) { + + var _str = str; + var _pos = 0; + var _buffer = 0; + var _buflen = 0; + + var _this = {}; + + _this.read = function() { + + while (_buflen < 8) { + + if (_pos >= _str.length) { + if (_buflen == 0) { + return -1; + } + throw 'unexpected end of file./' + _buflen; + } + + var c = _str.charAt(_pos); + _pos += 1; + + if (c == '=') { + _buflen = 0; + return -1; + } else if (c.match(/^\s$/) ) { + // ignore if whitespace. + continue; + } + + _buffer = (_buffer << 6) | decode(c.charCodeAt(0) ); + _buflen += 6; + } + + var n = (_buffer >>> (_buflen - 8) ) & 0xff; + _buflen -= 8; + return n; + }; + + var decode = function(c) { + if (0x41 <= c && c <= 0x5a) { + return c - 0x41; + } else if (0x61 <= c && c <= 0x7a) { + return c - 0x61 + 26; + } else if (0x30 <= c && c <= 0x39) { + return c - 0x30 + 52; + } else if (c == 0x2b) { + return 62; + } else if (c == 0x2f) { + return 63; + } else { + throw 'c:' + c; + } + }; + + return _this; + }; + + //--------------------------------------------------------------------- + // gifImage (B/W) + //--------------------------------------------------------------------- + + var gifImage = function(width, height) { + + var _width = width; + var _height = height; + var _data = new Array(width * height); + + var _this = {}; + + _this.setPixel = function(x, y, pixel) { + _data[y * _width + x] = pixel; + }; + + _this.write = function(out) { + + //--------------------------------- + // GIF Signature + + out.writeString('GIF87a'); + + //--------------------------------- + // Screen Descriptor + + out.writeShort(_width); + out.writeShort(_height); + + out.writeByte(0x80); // 2bit + out.writeByte(0); + out.writeByte(0); + + //--------------------------------- + // Global Color Map + + // black + out.writeByte(0x00); + out.writeByte(0x00); + out.writeByte(0x00); + + // white + out.writeByte(0xff); + out.writeByte(0xff); + out.writeByte(0xff); + + //--------------------------------- + // Image Descriptor + + out.writeString(','); + out.writeShort(0); + out.writeShort(0); + out.writeShort(_width); + out.writeShort(_height); + out.writeByte(0); + + //--------------------------------- + // Local Color Map + + //--------------------------------- + // Raster Data + + var lzwMinCodeSize = 2; + var raster = getLZWRaster(lzwMinCodeSize); + + out.writeByte(lzwMinCodeSize); + + var offset = 0; + + while (raster.length - offset > 255) { + out.writeByte(255); + out.writeBytes(raster, offset, 255); + offset += 255; + } + + out.writeByte(raster.length - offset); + out.writeBytes(raster, offset, raster.length - offset); + out.writeByte(0x00); + + //--------------------------------- + // GIF Terminator + out.writeString(';'); + }; + + var bitOutputStream = function(out) { + + var _out = out; + var _bitLength = 0; + var _bitBuffer = 0; + + var _this = {}; + + _this.write = function(data, length) { + + if ( (data >>> length) != 0) { + throw 'length over'; + } + + while (_bitLength + length >= 8) { + _out.writeByte(0xff & ( (data << _bitLength) | _bitBuffer) ); + length -= (8 - _bitLength); + data >>>= (8 - _bitLength); + _bitBuffer = 0; + _bitLength = 0; + } + + _bitBuffer = (data << _bitLength) | _bitBuffer; + _bitLength = _bitLength + length; + }; + + _this.flush = function() { + if (_bitLength > 0) { + _out.writeByte(_bitBuffer); + } + }; + + return _this; + }; + + var getLZWRaster = function(lzwMinCodeSize) { + + var clearCode = 1 << lzwMinCodeSize; + var endCode = (1 << lzwMinCodeSize) + 1; + var bitLength = lzwMinCodeSize + 1; + + // Setup LZWTable + var table = lzwTable(); + + for (var i = 0; i < clearCode; i += 1) { + table.add(String.fromCharCode(i) ); + } + table.add(String.fromCharCode(clearCode) ); + table.add(String.fromCharCode(endCode) ); + + var byteOut = byteArrayOutputStream(); + var bitOut = bitOutputStream(byteOut); + + // clear code + bitOut.write(clearCode, bitLength); + + var dataIndex = 0; + + var s = String.fromCharCode(_data[dataIndex]); + dataIndex += 1; + + while (dataIndex < _data.length) { + + var c = String.fromCharCode(_data[dataIndex]); + dataIndex += 1; + + if (table.contains(s + c) ) { + + s = s + c; + + } else { + + bitOut.write(table.indexOf(s), bitLength); + + if (table.size() < 0xfff) { + + if (table.size() == (1 << bitLength) ) { + bitLength += 1; + } + + table.add(s + c); + } + + s = c; + } + } + + bitOut.write(table.indexOf(s), bitLength); + + // end code + bitOut.write(endCode, bitLength); + + bitOut.flush(); + + return byteOut.toByteArray(); + }; + + var lzwTable = function() { + + var _map = {}; + var _size = 0; + + var _this = {}; + + _this.add = function(key) { + if (_this.contains(key) ) { + throw 'dup key:' + key; + } + _map[key] = _size; + _size += 1; + }; + + _this.size = function() { + return _size; + }; + + _this.indexOf = function(key) { + return _map[key]; + }; + + _this.contains = function(key) { + return typeof _map[key] != 'undefined'; + }; + + return _this; + }; + + return _this; + }; + + var createDataURL = function(width, height, getPixel) { + var gif = gifImage(width, height); + for (var y = 0; y < height; y += 1) { + for (var x = 0; x < width; x += 1) { + gif.setPixel(x, y, getPixel(x, y) ); + } + } + + var b = byteArrayOutputStream(); + gif.write(b); + + var base64 = base64EncodeOutputStream(); + var bytes = b.toByteArray(); + for (var i = 0; i < bytes.length; i += 1) { + base64.writeByte(bytes[i]); + } + base64.flush(); + + return 'data:image/gif;base64,' + base64; + }; + + //--------------------------------------------------------------------- + // returns qrcode function. + + return qrcode; +}(); + +// multibyte support +!function() { + + qrcode.stringToBytesFuncs['UTF-8'] = function(s) { + // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array + function toUTF8Array(str) { + var utf8 = []; + for (var i=0; i < str.length; i++) { + var charcode = str.charCodeAt(i); + if (charcode < 0x80) utf8.push(charcode); + else if (charcode < 0x800) { + utf8.push(0xc0 | (charcode >> 6), + 0x80 | (charcode & 0x3f)); + } + else if (charcode < 0xd800 || charcode >= 0xe000) { + utf8.push(0xe0 | (charcode >> 12), + 0x80 | ((charcode>>6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + // surrogate pair + else { + i++; + // UTF-16 encodes 0x10000-0x10FFFF by + // subtracting 0x10000 and splitting the + // 20 bits of 0x0-0xFFFFF into two halves + charcode = 0x10000 + (((charcode & 0x3ff)<<10) + | (str.charCodeAt(i) & 0x3ff)); + utf8.push(0xf0 | (charcode >>18), + 0x80 | ((charcode>>12) & 0x3f), + 0x80 | ((charcode>>6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + } + return utf8; + } + return toUTF8Array(s); + }; + +}(); + +(function (factory) { + if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } +}(function () { + return qrcode; +})); diff --git a/shared/package.json b/shared/package.json new file mode 100644 index 0000000..c6a5a52 --- /dev/null +++ b/shared/package.json @@ -0,0 +1,18 @@ +{ + "name": "@peershell/protocol", + "version": "0.1.0-beta", + "description": "peershell wire protocol — framework-neutral, shared by all clients and the server", + "license": "Apache-2.0", + "repository": "https://github.com/tis24dev/peershell", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist", + "src" + ], + "scripts": { + "build": "tsc -p tsconfig.json", + "watch": "tsc -p tsconfig.json --watch", + "test": "echo \"(shared: tests added in a later stage)\"" + } +} diff --git a/shared/src/api.ts b/shared/src/api.ts new file mode 100644 index 0000000..542863f --- /dev/null +++ b/shared/src/api.ts @@ -0,0 +1,65 @@ +/** + * Transport abstraction + small shared validators. The transport is framework-neutral (callback + * based); the Tabby plugin adapts it to RxJS internally, the web/mobile clients use it directly. + * A future WebRTC DataChannel transport implements the same interface. + */ +import { ControlMessage, Channel } from './protocol' + +export type TransportState = 'connecting' | 'open' | 'closed' + +export interface BinaryPayload { + peerId: number + channel: Channel + data: Uint8Array +} + +export interface SessionTransport { + connect(url: string, token?: string): Promise + sendControl(msg: ControlMessage): void + sendData(peerId: number, channel: Channel, data: Uint8Array): void + close(code?: number, reason?: string): void + + onControl(cb: (msg: ControlMessage) => void): void + onBinary(cb: (frame: BinaryPayload) => void): void + onState(cb: (state: TransportState) => void): void +} + +// --- validators ----------------------------------------------------------- + +/** Crockford base32 (minus ambiguous chars), 6-10 chars. */ +export const ROOM_CODE_RE = /^[2-9A-HJ-NP-Z]{6,10}$/ + +export function isValidRoomCode(code: string): boolean { + return ROOM_CODE_RE.test(code.toUpperCase()) +} + +export function normalizeRoomCode(code: string): string { + return code.trim().toUpperCase() +} + +/** Opaque magic-link/session token: url-safe, reasonable length bounds. */ +export const TOKEN_RE = /^[A-Za-z0-9_-]{16,128}$/ + +export function isValidToken(token: string): boolean { + return TOKEN_RE.test(token) +} + +/** + * Whitelist for the reverse HTTP tunnel: the host only ever serves the embedded web-client page. + * Rejects traversal/SSRF. URL-decode is applied before checking. + */ +export function isAllowedTunnelPath(rawPath: string): boolean { + let path: string + try { + path = decodeURIComponent(rawPath) + } catch { + return false + } + if (path.includes('..') || path.includes('\0')) { + return false + } + if (/^[a-z]+:\/\//i.test(path)) { + return false + } + return path === '/' || path === '/index.html' +} diff --git a/shared/src/base64.ts b/shared/src/base64.ts new file mode 100644 index 0000000..cfac1a7 --- /dev/null +++ b/shared/src/base64.ts @@ -0,0 +1,23 @@ +/** + * Portable base64 (btoa/atob are globals in browsers, Electron renderer, and Node >= 16). + * Used for the VT snapshot payload in the `snapshot` control message. + */ +export function bytesToBase64(bytes: Uint8Array): string { + let bin = '' + for (let i = 0; i < bytes.length; i++) { + bin += String.fromCharCode(bytes[i]) + } + return btoa(bin) +} + +export function base64ToBytes(b64: string): Uint8Array { + const bin = atob(b64) + const out = new Uint8Array(bin.length) + for (let i = 0; i < bin.length; i++) { + out[i] = bin.charCodeAt(i) + } + return out +} + +export const utf8ToBase64 = (s: string): string => bytesToBase64(new TextEncoder().encode(s)) +export const base64ToUtf8 = (b64: string): string => new TextDecoder().decode(base64ToBytes(b64)) diff --git a/shared/src/httpTunnelHandler.ts b/shared/src/httpTunnelHandler.ts new file mode 100644 index 0000000..e617925 --- /dev/null +++ b/shared/src/httpTunnelHandler.ts @@ -0,0 +1,36 @@ +/** + * Host side of the reverse HTTP tunnel. The server forwards a browser's page request as an + * `http-get` frame over the host's outbound WS; the host answers with `http-response` carrying the + * embedded web-client HTML. NOT a real HTTP server (the renderer opens no port) — just frame handling. + * + * Strictly whitelists the path (only `/`) to prevent path-traversal / SSRF via a malicious guest. + */ +import { ControlMessage } from './protocol' +import { SessionTransport, isAllowedTunnelPath } from './api' +import { utf8ToBase64 } from './base64' + +export class HttpTunnelHandler { + constructor( + private readonly transport: SessionTransport, + private readonly serveHtml: () => string, + ) { + this.transport.onControl(m => { + if (m.t === 'http-get') { + this.handle(m) + } + }) + } + + private handle(m: Extract): void { + const allowed = isAllowedTunnelPath(m.path) + const body = allowed ? this.serveHtml() : 'Forbidden' + this.transport.sendControl({ + t: 'http-response', + peerId: m.peerId, + reqId: m.reqId, + status: allowed ? 200 : 403, + headers: { 'content-type': allowed ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8' }, + bodyBase64: utf8ToBase64(body), + }) + } +} diff --git a/shared/src/index.ts b/shared/src/index.ts new file mode 100644 index 0000000..b4a7734 --- /dev/null +++ b/shared/src/index.ts @@ -0,0 +1,8 @@ +export * from './protocol' +export * from './api' +export * from './pinAuth' +export * from './utf8Splitter' +export * from './base64' +export * from './websocketTransport' +export * from './mirrorController' +export * from './httpTunnelHandler' diff --git a/shared/src/mirrorController.ts b/shared/src/mirrorController.ts new file mode 100644 index 0000000..c17d507 --- /dev/null +++ b/shared/src/mirrorController.ts @@ -0,0 +1,108 @@ +/** + * Guest side of a shared session. Framework-neutral (drives a SessionTransport + a small MirrorSink + * port + a PIN provider), so it is reused by the Tabby plugin (via MirrorSession) and the web-client + * (and future mobile). PIN/render/input logic lives here once. + * + * Flow: join -> answer the host's PIN challenge -> on pin-ok, render the snapshot then ack it + * (barrier) -> render live output, forward the guest's keystrokes. + */ +import { Channel, ClientKind, SINGLE_PEER, ControlMessage } from './protocol' +import { SessionTransport } from './api' +import { base64ToBytes } from './base64' +import { hashPin } from './pinAuth' + +/** Port the controller drives on the guest terminal (adapted from a Tabby session or an xterm). */ +export interface MirrorSink { + emit(data: Uint8Array): void + hostResize(cols: number, rows: number): void + ended(reason: string): void +} + +/** Asks the user for the session PIN. Returns null if cancelled. */ +export type PinProvider = () => Promise + +export class MirrorController { + private readonly peerId = SINGLE_PEER + private endedFlag = false + + constructor( + private readonly transport: SessionTransport, + private readonly sink: MirrorSink, + private readonly pinProvider: PinProvider, + ) { + this.transport.onControl(m => this.onControl(m)) + this.transport.onBinary(f => { + if (f.channel === Channel.Output) { + this.sink.emit(f.data) + } + }) + } + + /** + * Announce as a guest and join, either by `room` code (Tabby desktop) or opaque `token` + * (browser magic-link). Handlers are wired in the ctor so no frame is missed. + */ + join(target: { room?: string, token?: string, name?: string, kind?: ClientKind }): void { + this.transport.sendControl({ + t: 'hello', role: 'guest', kind: target.kind ?? 'desktop', client: 'peershell', + }) + this.transport.sendControl({ t: 'join', room: target.room, token: target.token, name: target.name }) + } + + private onControl(m: ControlMessage): void { + switch (m.t) { + case 'pin-challenge': + void this.answerPin(m.nonce) + break + case 'pin-fail': + if (m.left <= 0) { + this.end('wrong PIN') + } + // left > 0: the host re-challenges, which re-prompts. + break + case 'snapshot': + this.sink.emit(base64ToBytes(m.data)) + this.sink.hostResize(m.cols, m.rows) + this.transport.sendControl({ t: 'snapshot-ack' }) + break + case 'resize': + this.sink.hostResize(m.cols, m.rows) + break + case 'peer-left': + this.end(m.reason ?? 'host ended the session') + break + case 'error': + this.end(m.message ? `${m.code}: ${m.message}` : m.code) + break + default: + break + } + } + + private async answerPin(nonce: string): Promise { + const pin = await this.pinProvider() + if (!pin) { + this.close() + return + } + const hash = await hashPin(pin, nonce) + this.transport.sendControl({ t: 'pin-response', hash }) + } + + /** Forward the guest's keystrokes to the host. */ + writeInput(data: Uint8Array): void { + this.transport.sendData(this.peerId, Channel.Input, data) + } + + private end(reason: string): void { + if (this.endedFlag) { + return + } + this.endedFlag = true + this.sink.ended(reason) + } + + close(): void { + this.transport.close(1000, 'guest-closed') + } +} diff --git a/shared/src/pinAuth.ts b/shared/src/pinAuth.ts new file mode 100644 index 0000000..9e15001 --- /dev/null +++ b/shared/src/pinAuth.ts @@ -0,0 +1,61 @@ +/** + * Per-session PIN challenge-response. The raw PIN never crosses the wire: the host sends a + * fresh single-use `nonce`, the peer replies with `H(pin, nonce)`, the host verifies locally. + * + * Uses Web Crypto (`globalThis.crypto`), available in browsers and Node >= 18. + */ + +const MIN_PIN_LENGTH = 6 + +function toHex(bytes: Uint8Array): string { + let out = '' + for (const b of bytes) { + out += b.toString(16).padStart(2, '0') + } + return out +} + +/** A fresh, single-use nonce (hex). Generate a new one for every challenge. */ +export function generateNonce(byteLength = 16): string { + const arr = new Uint8Array(byteLength) + globalThis.crypto.getRandomValues(arr) + return toHex(arr) +} + +/** A random numeric PIN (default 6 digits) for a share. Kept local; never sent in cleartext. */ +export function generatePin(digits = 6): string { + const arr = new Uint32Array(1) + globalThis.crypto.getRandomValues(arr) + const n = arr[0] % (10 ** digits) + return n.toString().padStart(digits, '0') +} + +/** `H(pin, nonce)` as a hex string (SHA-256 over `nonce:pin`). */ +export async function hashPin(pin: string, nonce: string): Promise { + const data = new TextEncoder().encode(`${nonce}:${pin}`) + const digest = await globalThis.crypto.subtle.digest('SHA-256', data) + return toHex(new Uint8Array(digest)) +} + +/** Constant-time-ish comparison of two equal-length hex strings. */ +function safeEqualHex(a: string, b: string): boolean { + if (a.length !== b.length) { + return false + } + let diff = 0 + for (let i = 0; i < a.length; i++) { + diff |= a.charCodeAt(i) ^ b.charCodeAt(i) + } + return diff === 0 +} + +/** Verify a peer's `pin-response` hash against the expected `H(pin, nonce)`. */ +export async function verifyPin(pin: string, nonce: string, responseHash: string): Promise { + const expected = await hashPin(pin, nonce) + return safeEqualHex(expected, responseHash) +} + +/** Basic PIN policy check (min length, digits). Callers should also rate-limit attempts. */ +export function isAcceptablePin(pin: string): boolean { + return pin.length >= MIN_PIN_LENGTH && /^[0-9]+$/.test(pin) +} diff --git a/shared/src/protocol.ts b/shared/src/protocol.ts new file mode 100644 index 0000000..f72faf2 --- /dev/null +++ b/shared/src/protocol.ts @@ -0,0 +1,101 @@ +/** + * peershell wire protocol — control messages + binary terminal framing. + * Framework-neutral (no Angular/RxJS/Node-Buffer). See PROTOCOL.md for the spec. + */ + +export const PROTOCOL_VERSION = 1 + +/** Binary frame channel tags. */ +export enum Channel { + Output = 0x01, // host -> guest + Input = 0x02, // guest -> host +} + +/** Peer id used while only 1 host + 1 guest are supported. */ +export const SINGLE_PEER = 0 + +// --------------------------------------------------------------------------- +// Control messages (JSON, sent as WebSocket TEXT frames) +// --------------------------------------------------------------------------- + +export type Role = 'host' | 'guest' +export type ClientKind = 'desktop' | 'web' | 'mobile' + +interface Base { + v?: number + peerId?: number +} + +export type ControlMessage = + | (Base & { t: 'hello', role: Role, kind?: ClientKind, client?: string }) + | (Base & { t: 'create-session' }) + | (Base & { t: 'session-created', room: string, magicLink: string }) + | (Base & { t: 'session-close' }) + | (Base & { t: 'join', room?: string, token?: string, name?: string }) + | (Base & { t: 'peer-joined', peerId: number, kind: ClientKind }) + | (Base & { t: 'peer-left', peerId?: number, reason?: string }) + | (Base & { t: 'error', code: string, message?: string }) + | (Base & { t: 'ping' }) + | (Base & { t: 'pong' }) + | (Base & { t: 'pin-challenge', nonce: string }) + | (Base & { t: 'pin-response', hash: string }) + | (Base & { t: 'pin-ok' }) + | (Base & { t: 'pin-fail', left: number }) + | (Base & { t: 'snapshot', cols: number, rows: number, data: string }) + | (Base & { t: 'snapshot-ack' }) + | (Base & { t: 'resize', cols: number, rows: number }) + | (Base & { t: 'http-get', reqId: string, path: string, headers?: Record }) + | (Base & { t: 'http-response', reqId: string, status: number, headers?: Record, bodyBase64: string }) + +export type ControlType = ControlMessage['t'] + +/** Serialize a control message to a JSON string (stamps the protocol version). */ +export function encodeControl(msg: ControlMessage): string { + return JSON.stringify({ v: PROTOCOL_VERSION, ...msg }) +} + +/** Parse a JSON control message. Throws on malformed JSON or missing `t`. */ +export function decodeControl(text: string): ControlMessage { + const obj = JSON.parse(text) + if (typeof obj !== 'object' || obj === null || typeof obj.t !== 'string') { + throw new Error('peershell: malformed control message') + } + return obj as ControlMessage +} + +// --------------------------------------------------------------------------- +// Binary terminal frames (WebSocket BINARY frames) +// [ peerId: uint32 BE ][ tag: uint8 ][ raw PTY bytes... ] +// --------------------------------------------------------------------------- + +export const BINARY_HEADER_BYTES = 5 + +export interface BinaryFrame { + peerId: number + channel: Channel + data: Uint8Array +} + +/** Encode a terminal data frame. `data` is copied after the 5-byte header. */ +export function encodeBinaryFrame(peerId: number, channel: Channel, data: Uint8Array): Uint8Array { + const out = new Uint8Array(BINARY_HEADER_BYTES + data.length) + const view = new DataView(out.buffer) + view.setUint32(0, peerId >>> 0, false) // big-endian + view.setUint8(4, channel) + out.set(data, BINARY_HEADER_BYTES) + return out +} + +/** Decode a terminal data frame from an ArrayBuffer or Uint8Array. */ +export function decodeBinaryFrame(input: ArrayBuffer | Uint8Array): BinaryFrame { + const bytes = input instanceof Uint8Array ? input : new Uint8Array(input) + if (bytes.length < BINARY_HEADER_BYTES) { + throw new Error('peershell: binary frame too short') + } + const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength) + const peerId = view.getUint32(0, false) + const channel = view.getUint8(4) as Channel + // slice() copies so callers can retain the payload independently of the socket buffer. + const data = bytes.slice(BINARY_HEADER_BYTES) + return { peerId, channel, data } +} diff --git a/shared/src/utf8Splitter.ts b/shared/src/utf8Splitter.ts new file mode 100644 index 0000000..2975da6 --- /dev/null +++ b/shared/src/utf8Splitter.ts @@ -0,0 +1,20 @@ +/** + * Reassembles UTF-8 text from a byte stream where multibyte codepoints may be split + * across frames. Wraps a streaming TextDecoder (available in browsers and Node >= 18). + * + * The Tabby desktop guest gets equivalent behaviour from Tabby's UTF8SplitterMiddleware; + * the web-client and future native/mobile clients use this. + */ +export class Utf8Splitter { + private readonly decoder = new TextDecoder('utf-8') + + /** Decode a chunk, holding back any trailing incomplete multibyte sequence. */ + write(bytes: Uint8Array): string { + return this.decoder.decode(bytes, { stream: true }) + } + + /** Flush any buffered bytes at end of stream (emits U+FFFD for a truncated tail). */ + flush(): string { + return this.decoder.decode() + } +} diff --git a/shared/src/websocketTransport.ts b/shared/src/websocketTransport.ts new file mode 100644 index 0000000..5c37d2d --- /dev/null +++ b/shared/src/websocketTransport.ts @@ -0,0 +1,168 @@ +/** + * SessionTransport over a WebSocket. Framework-neutral: uses the global `WebSocket` by default + * (Electron renderer + browsers), or an injected implementation (e.g. the `ws` package in Node tests). + * A future WebRTC DataChannel transport can implement the same SessionTransport interface. + */ +import { + ControlMessage, Channel, encodeControl, decodeControl, encodeBinaryFrame, decodeBinaryFrame, +} from './protocol' +import { SessionTransport, TransportState, BinaryPayload } from './api' + +/** Minimal browser-WebSocket surface we rely on (satisfied by DOM WebSocket and the `ws` package). */ +export interface WebSocketLike { + binaryType: string + send(data: string | ArrayBufferView | ArrayBuffer): void + close(code?: number, reason?: string): void + onopen: ((ev: unknown) => void) | null + onmessage: ((ev: { data: unknown }) => void) | null + onclose: ((ev: unknown) => void) | null + onerror: ((ev: unknown) => void) | null +} + +export type WebSocketCtor = new (url: string) => WebSocketLike + +const KEEPALIVE_INTERVAL_MS = 20000 + +function toUint8(data: unknown): Uint8Array { + if (data instanceof ArrayBuffer) { + return new Uint8Array(data) + } + if (ArrayBuffer.isView(data)) { + const v = data as ArrayBufferView + return new Uint8Array(v.buffer, v.byteOffset, v.byteLength) + } + throw new Error('peershell: unexpected binary message type') +} + +export class WebSocketTransport implements SessionTransport { + private ws: WebSocketLike | null = null + private state: TransportState = 'closed' + private keepalive: ReturnType | null = null + private readonly WS: WebSocketCtor + private readonly controlCbs: Array<(m: ControlMessage) => void> = [] + private readonly binaryCbs: Array<(f: BinaryPayload) => void> = [] + private readonly stateCbs: Array<(s: TransportState) => void> = [] + + constructor(wsImpl?: WebSocketCtor) { + const impl = wsImpl ?? (globalThis as unknown as { WebSocket?: WebSocketCtor }).WebSocket + if (!impl) { + throw new Error('peershell: no WebSocket implementation available (inject one for Node)') + } + this.WS = impl + } + + connect(url: string, token?: string): Promise { + return new Promise((resolve, reject) => { + this.setState('connecting') + const full = token + ? `${url}${url.includes('?') ? '&' : '?'}token=${encodeURIComponent(token)}` + : url + let ws: WebSocketLike + try { + ws = new this.WS(full) + } catch (err) { + this.setState('closed') + reject(err instanceof Error ? err : new Error(String(err))) + return + } + ws.binaryType = 'arraybuffer' + this.ws = ws + ws.onopen = () => { + this.setState('open') + this.startKeepalive() + resolve() + } + ws.onerror = () => { + if (this.state === 'connecting') { + reject(new Error('peershell: WebSocket connection failed')) + } + } + ws.onclose = () => this.setState('closed') + ws.onmessage = ev => this.dispatch(ev.data) + }) + } + + private dispatch(data: unknown): void { + if (typeof data === 'string') { + let msg: ControlMessage + try { + msg = decodeControl(data) + } catch { + return // ignore malformed control frames + } + // Keepalive is handled at the transport layer and not surfaced to the app. + if (msg.t === 'ping') { + this.sendControl({ t: 'pong' }) + return + } + if (msg.t === 'pong') { + return + } + for (const cb of this.controlCbs) { + cb(msg) + } + return + } + let frame: BinaryPayload + try { + frame = decodeBinaryFrame(toUint8(data)) + } catch { + return + } + for (const cb of this.binaryCbs) { + cb(frame) + } + } + + sendControl(msg: ControlMessage): void { + this.ws?.send(encodeControl(msg)) + } + + sendData(peerId: number, channel: Channel, data: Uint8Array): void { + this.ws?.send(encodeBinaryFrame(peerId, channel, data)) + } + + close(code?: number, reason?: string): void { + this.stopKeepalive() + this.ws?.close(code, reason) + } + + private startKeepalive(): void { + this.stopKeepalive() + this.keepalive = setInterval(() => this.sendControl({ t: 'ping' }), KEEPALIVE_INTERVAL_MS) + // Don't keep a Node process (or test runner) alive just for keepalive. + const timer = this.keepalive as unknown as { unref?: () => void } + if (typeof timer.unref === 'function') { + timer.unref() + } + } + + private stopKeepalive(): void { + if (this.keepalive !== null) { + clearInterval(this.keepalive) + this.keepalive = null + } + } + + onControl(cb: (m: ControlMessage) => void): void { + this.controlCbs.push(cb) + } + + onBinary(cb: (f: BinaryPayload) => void): void { + this.binaryCbs.push(cb) + } + + onState(cb: (s: TransportState) => void): void { + this.stateCbs.push(cb) + } + + private setState(s: TransportState): void { + this.state = s + if (s === 'closed') { + this.stopKeepalive() + } + for (const cb of this.stateCbs) { + cb(s) + } + } +} diff --git a/shared/test/auth.integration.test.ts b/shared/test/auth.integration.test.ts new file mode 100644 index 0000000..d6be64f --- /dev/null +++ b/shared/test/auth.integration.test.ts @@ -0,0 +1,198 @@ +/** + * Stage 6 server: account REST (register/verify/login/2FA/logout/rate-limit) + WS auth-gate on + * create-session. Runs the real server ephemeral (in-memory store) with requireAuth ON. + */ +import * as http from 'http' +import WebSocket from 'ws' + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const server = require('../../server/src/index.cjs') as { + startRelay: (port?: number, opts?: any) => Promise<{ url: string, publicUrl: string, close: () => Promise }> + totpAt: (secret: string, counter: number) => string +} + +let relay: { url: string, publicUrl: string, close: () => Promise } +let httpBase = '' +const sent: any[] = [] +let logSpy: jest.SpyInstance + +beforeAll(async () => { + logSpy = jest.spyOn(console, 'log').mockImplementation(() => { /* silence */ }) + relay = await server.startRelay(0, { + requireAuth: true, + ephemeral: true, + // Inject a mailer stub so registration takes the email-verification path (not auto-verify) and + // the code is captured here for the test. + email: { apiKey: 'test', from: 'noreply@test', sendFn: async (o: any) => { sent.push(o) } }, + }) + httpBase = relay.url.replace('ws://', 'http://') +}) +afterAll(async () => { await relay.close(); logSpy.mockRestore() }) + +function api(method: string, path: string, body?: any, token?: string): Promise<{ status: number, json: any }> { + return new Promise((resolve, reject) => { + const data = body ? Buffer.from(JSON.stringify(body)) : null + const u = new URL(httpBase + path) + const req = http.request({ + hostname: u.hostname, port: u.port, path: u.pathname, method, + headers: { + 'content-type': 'application/json', + ...(data ? { 'content-length': data.length } : {}), + ...(token ? { authorization: `Bearer ${token}` } : {}), + }, + }, res => { + let b = '' + res.setEncoding('utf-8') + res.on('data', c => { b += c }) + res.on('end', () => { try { resolve({ status: res.statusCode ?? 0, json: JSON.parse(b || '{}') }) } catch { resolve({ status: res.statusCode ?? 0, json: {} }) } }) + }) + req.on('error', reject) + if (data) { req.write(data) } + req.end() + }) +} + +const codeFor = (email: string): string => { + const mail = [...sent].reverse().find(m => m.to === email) + const m = mail && /(\d{6})/.exec(mail.text) + return m ? m[1] : '' +} + +// Drive the WS create-session leg; resolves with the first control message the server sends back. +function createSessionWs(token?: string): Promise { + return new Promise((resolve, reject) => { + const ws = new WebSocket(relay.url + (token ? `?token=${token}` : '')) + const to = setTimeout(() => { ws.close(); reject(new Error('timeout')) }, 6000) + ws.on('open', () => { + ws.send(JSON.stringify({ v: 1, t: 'hello', role: 'host', kind: 'desktop' })) + ws.send(JSON.stringify({ v: 1, t: 'create-session' })) + }) + ws.on('message', d => { + let m: any = null + try { m = JSON.parse(d.toString()) } catch { /* ignore */ } + if (m && (m.t === 'session-created' || m.t === 'error')) { + clearTimeout(to) + ws.close() + resolve(m) + } + }) + ws.on('error', e => { clearTimeout(to); reject(e) }) + }) +} + +async function registerVerifyLogin(email: string, password = 'CorrectHorse9'): Promise { + await api('POST', '/register', { email, password }) + await api('POST', '/verify-email', { email, code: codeFor(email) }) + const r = await api('POST', '/login', { email, password }) + return r.json.token +} + +it('register -> verify -> login issues a token; login before verify is blocked', async () => { + const email = 'alice@example.com' + const reg = await api('POST', '/register', { email, password: 'CorrectHorse9' }) + expect(reg.status).toBe(200) + expect(reg.json.needsVerification).toBe(true) + + const early = await api('POST', '/login', { email, password: 'CorrectHorse9' }) + expect(early.status).toBe(403) + expect(early.json.error).toBe('needs-verification') + + const code = codeFor(email) + expect(code).toMatch(/^\d{6}$/) + const ver = await api('POST', '/verify-email', { email, code }) + expect(ver.status).toBe(200) + + const login = await api('POST', '/login', { email, password: 'CorrectHorse9' }) + expect(login.status).toBe(200) + expect(typeof login.json.token).toBe('string') + expect(login.json.expiresAt).toBeGreaterThan(Date.now()) +}, 20000) + +it('rejects weak password and invalid email at registration', async () => { + expect((await api('POST', '/register', { email: 'b@example.com', password: 'short' })).json.error).toBe('password-too-weak') + expect((await api('POST', '/register', { email: 'not-an-email', password: 'CorrectHorse9' })).json.error).toBe('invalid-email') +}) + +it('login failures are generic (no email enumeration) and rate-limited', async () => { + const email = 'carol@example.com' + await registerVerifyLogin(email) + // wrong password AND nonexistent email -> identical error + const bad = await api('POST', '/login', { email, password: 'WrongPassword1' }) + const ghost = await api('POST', '/login', { email: 'ghost@example.com', password: 'WhateverPass1' }) + expect(bad.status).toBe(401) + expect(bad.json.error).toBe('invalid-credentials') + expect(ghost.json.error).toBe('invalid-credentials') + // hammer to trip the limiter (5 fails already includes 'bad' above -> a few more) + let last = bad + for (let i = 0; i < 6; i++) { last = await api('POST', '/login', { email, password: 'WrongPassword1' }) } + expect(last.status).toBe(429) + expect(last.json.error).toBe('rate-limited') +}, 30000) + +it('WS create-session is gated: rejected without a token, accepted with one', async () => { + const noAuth = await createSessionWs() + expect(noAuth.t).toBe('error') + expect(noAuth.code).toBe('unauthorized') + + const token = await registerVerifyLogin('dave@example.com') + const ok = await createSessionWs(token) + expect(ok.t).toBe('session-created') + expect(ok.room).toMatch(/^[2-9A-HJ-NP-Z]{6}$/) + expect(ok.magicLink).toContain('/s/') +}, 20000) + +it('optional TOTP: setup -> enable -> login needs 2FA -> verify issues token', async () => { + const email = 'erin@example.com' + const token = await registerVerifyLogin(email) + + const setup = await api('POST', '/2fa/setup', {}, token) + expect(setup.status).toBe(200) + const secret = setup.json.secret as string + expect(secret.length).toBeGreaterThan(10) + + const enable = await api('POST', '/2fa/enable', { code: server.totpAt(secret, Math.floor(Date.now() / 30000)) }, token) + expect(enable.status).toBe(200) + + const login = await api('POST', '/login', { email, password: 'CorrectHorse9' }) + expect(login.json.needsTotp).toBe(true) + expect(typeof login.json.sessionKey).toBe('string') + + const verify = await api('POST', '/2fa/verify', { sessionKey: login.json.sessionKey, code: server.totpAt(secret, Math.floor(Date.now() / 30000)) }) + expect(verify.status).toBe(200) + expect(typeof verify.json.token).toBe('string') +}, 25000) + +it('auto-verifies and returns a token when no email is configured', async () => { + const r2 = await server.startRelay(0, { requireAuth: true, ephemeral: true }) // no email cfg -> log path + const base2 = r2.url.replace('ws://', 'http://') + const post = (path: string, body: any): Promise<{ status: number, json: any }> => new Promise((resolve, reject) => { + const data = Buffer.from(JSON.stringify(body)) + const u = new URL(base2 + path) + const req = http.request({ hostname: u.hostname, port: u.port, path: u.pathname, method: 'POST', headers: { 'content-type': 'application/json', 'content-length': data.length } }, res => { + let b = '' + res.on('data', c => { b += c }) + res.on('end', () => resolve({ status: res.statusCode ?? 0, json: JSON.parse(b || '{}') })) + }) + req.on('error', reject) + req.write(data) + req.end() + }) + const r = await post('/register', { email: 'noemail@example.com', password: 'CorrectHorse9' }) + expect(r.status).toBe(200) + expect(typeof r.json.token).toBe('string') + expect(r.json.autoVerified).toBe(true) + await r2.close() +}, 15000) + +it('logout revokes the token (dashboard then unauthorized)', async () => { + const token = await registerVerifyLogin('frank@example.com') + const before = await api('GET', '/sessions', undefined, token) + expect(before.status).toBe(200) + expect(before.json.account.email).toBe('frank@example.com') + + const out = await api('POST', '/logout', {}, token) + expect(out.status).toBe(200) + + const after = await api('GET', '/sessions', undefined, token) + expect(after.status).toBe(401) +}, 20000) diff --git a/shared/test/email.test.ts b/shared/test/email.test.ts new file mode 100644 index 0000000..1714ea8 --- /dev/null +++ b/shared/test/email.test.ts @@ -0,0 +1,42 @@ +/** Stage 7: verification-code delivery (Brevo relay) with a mock-log fallback. No network. */ +// eslint-disable-next-line @typescript-eslint/no-var-requires +const server = require('../../server/src/index.cjs') as { + deliverVerifyCode: (email: string, code: string, cfg?: any) => Promise<{ delivered: string }> +} + +describe('deliverVerifyCode', () => { + let logSpy: jest.SpyInstance + let warnSpy: jest.SpyInstance + beforeEach(() => { + logSpy = jest.spyOn(console, 'log').mockImplementation(() => {}) + warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {}) + }) + afterEach(() => { logSpy.mockRestore(); warnSpy.mockRestore() }) + + it('logs the code when no API key is configured', async () => { + const r = await server.deliverVerifyCode('a@example.com', '123456', {}) + expect(r.delivered).toBe('log') + expect(logSpy.mock.calls.some(c => String(c[0]).includes('verify code for a@example.com') && String(c[0]).includes('123456'))).toBe(true) + }) + + it('sends via the injected mailer when an API key is configured', async () => { + const sent: any[] = [] + const sendFn = async (opts: any) => { sent.push(opts) } + const r = await server.deliverVerifyCode('b@example.com', '654321', { apiKey: 'k', from: 'noreply@peershell.dev', sendFn }) + expect(r.delivered).toBe('email') + expect(sent).toHaveLength(1) + expect(sent[0].to).toBe('b@example.com') + expect(sent[0].apiKey).toBe('k') + expect(sent[0].text).toContain('654321') + // the code must NOT be logged when it went out by email + expect(logSpy.mock.calls.some(c => String(c[0]).includes('654321'))).toBe(false) + }) + + it('falls back to logging the code when the mailer fails', async () => { + const sendFn = async () => { throw new Error('brevo 401') } + const r = await server.deliverVerifyCode('c@example.com', '999000', { apiKey: 'k', sendFn }) + expect(r.delivered).toBe('log-fallback') + expect(warnSpy).toHaveBeenCalled() + expect(logSpy.mock.calls.some(c => String(c[0]).includes('verify code for c@example.com') && String(c[0]).includes('999000'))).toBe(true) + }) +}) diff --git a/shared/test/httpTunnelHandler.test.ts b/shared/test/httpTunnelHandler.test.ts new file mode 100644 index 0000000..d6bffb4 --- /dev/null +++ b/shared/test/httpTunnelHandler.test.ts @@ -0,0 +1,53 @@ +import { + HttpTunnelHandler, SessionTransport, ControlMessage, BinaryPayload, Channel, TransportState, base64ToUtf8, +} from '../src' + +class MockTransport implements SessionTransport { + sentControl: ControlMessage[] = [] + private controlCb?: (m: ControlMessage) => void + + connect(): Promise { + return Promise.resolve() + } + sendControl(m: ControlMessage): void { + this.sentControl.push(m) + } + sendData(_p: number, _c: Channel, _d: Uint8Array): void { /* unused */ } + close(): void { /* unused */ } + onControl(cb: (m: ControlMessage) => void): void { + this.controlCb = cb + } + onBinary(_cb: (f: BinaryPayload) => void): void { /* unused */ } + onState(_cb: (s: TransportState) => void): void { /* unused */ } + + emitControl(m: ControlMessage): void { + this.controlCb?.(m) + } +} + +const HTML = 'peershell' + +it('serves the embedded HTML for the root path', () => { + const t = new MockTransport() + // eslint-disable-next-line no-new + new HttpTunnelHandler(t, () => HTML) + + t.emitControl({ t: 'http-get', peerId: 0, reqId: 'r1', path: '/' }) + const res = t.sentControl.find(m => m.t === 'http-response') as Extract + expect(res.status).toBe(200) + expect(res.reqId).toBe('r1') + expect(base64ToUtf8(res.bodyBase64)).toBe(HTML) +}) + +it('rejects traversal / SSRF paths with 403', () => { + const t = new MockTransport() + // eslint-disable-next-line no-new + new HttpTunnelHandler(t, () => HTML) + + for (const path of ['/../../etc/passwd', '/%2e%2e/x', 'http://169.254.169.254/', '/secret']) { + t.sentControl.length = 0 + t.emitControl({ t: 'http-get', peerId: 0, reqId: 'r', path }) + const res = t.sentControl.find(m => m.t === 'http-response') as Extract + expect(res.status).toBe(403) + } +}) diff --git a/shared/test/mirrorController.test.ts b/shared/test/mirrorController.test.ts new file mode 100644 index 0000000..d4717f8 --- /dev/null +++ b/shared/test/mirrorController.test.ts @@ -0,0 +1,131 @@ +import { + MirrorController, MirrorSink, PinProvider, + SessionTransport, ControlMessage, BinaryPayload, Channel, TransportState, utf8ToBase64, hashPin, +} from '../src' + +class MockTransport implements SessionTransport { + sentControl: ControlMessage[] = [] + sentData: Array<{ peerId: number, channel: Channel, data: Uint8Array }> = [] + private controlCb?: (m: ControlMessage) => void + private binaryCb?: (f: BinaryPayload) => void + + connect(): Promise { + return Promise.resolve() + } + sendControl(m: ControlMessage): void { + this.sentControl.push(m) + } + sendData(peerId: number, channel: Channel, data: Uint8Array): void { + this.sentData.push({ peerId, channel, data }) + } + close(): void { /* noop */ } + onControl(cb: (m: ControlMessage) => void): void { + this.controlCb = cb + } + onBinary(cb: (f: BinaryPayload) => void): void { + this.binaryCb = cb + } + onState(_cb: (s: TransportState) => void): void { /* unused */ } + + emitControl(m: ControlMessage): void { + this.controlCb?.(m) + } + emitBinary(f: BinaryPayload): void { + this.binaryCb?.(f) + } + controlTypes(): string[] { + return this.sentControl.map(c => c.t) + } + last(t: T): Extract | undefined { + return [...this.sentControl].reverse().find(c => c.t === t) as never + } +} + +function mockSink() { + const emits: Uint8Array[] = [] + const resizes: Array<{ cols: number, rows: number }> = [] + let ended: string | null = null + const sink: MirrorSink = { + emit: d => emits.push(d), + hostResize: (cols, rows) => resizes.push({ cols, rows }), + ended: reason => { ended = reason }, + } + return { sink, emits, resizes, getEnded: () => ended } +} + +const dec = (b: Uint8Array) => new TextDecoder().decode(b) +const noPin: PinProvider = async () => null + +function waitUntil(pred: () => boolean, ms = 2000): Promise { + return new Promise((resolve, reject) => { + const iv = setInterval(() => { + if (pred()) { + clearInterval(iv) + clearTimeout(to) + resolve() + } + }, 5) + const to = setTimeout(() => { + clearInterval(iv) + reject(new Error('waitUntil timeout')) + }, ms) + }) +} + +it('answers the PIN challenge with H(pin, nonce)', async () => { + const t = new MockTransport() + const s = mockSink() + const c = new MirrorController(t, s.sink, async () => '424242') + c.join({ room: 'ABC234' }) + expect(t.controlTypes()).toEqual(['hello', 'join']) + + t.emitControl({ t: 'pin-challenge', nonce: 'nonce-xyz' }) + await waitUntil(() => t.sentControl.some(x => x.t === 'pin-response')) + expect(t.last('pin-response')!.hash).toBe(await hashPin('424242', 'nonce-xyz')) +}) + +it('renders + acks the snapshot, renders output, forwards input', () => { + const t = new MockTransport() + const s = mockSink() + const c = new MirrorController(t, s.sink, noPin) + c.join({ room: 'ABC234' }) + + t.emitControl({ t: 'snapshot', cols: 100, rows: 30, data: utf8ToBase64('SNAP') }) + expect(dec(s.emits[0])).toBe('SNAP') + expect(s.resizes[0]).toEqual({ cols: 100, rows: 30 }) + expect(t.controlTypes()).toContain('snapshot-ack') + + t.emitBinary({ peerId: 0, channel: Channel.Output, data: new Uint8Array([79, 75]) }) + expect(dec(s.emits[1])).toBe('OK') + + c.writeInput(new Uint8Array([108, 115])) + expect(t.sentData[0].channel).toBe(Channel.Input) + expect(Array.from(t.sentData[0].data)).toEqual([108, 115]) +}) + +it('ends on pin-fail with no attempts left, but not while attempts remain', () => { + const t = new MockTransport() + const s = mockSink() + const c = new MirrorController(t, s.sink, noPin) + c.join({ room: 'ABC234' }) + + t.emitControl({ t: 'pin-fail', left: 3 }) + expect(s.getEnded()).toBeNull() + + t.emitControl({ t: 'pin-fail', left: 0 }) + expect(s.getEnded()).toBe('wrong PIN') +}) + +it('surfaces a host resize and ends on peer-left (once)', () => { + const t = new MockTransport() + const s = mockSink() + const c = new MirrorController(t, s.sink, noPin) + c.join({ room: 'ABC234' }) + + t.emitControl({ t: 'resize', cols: 132, rows: 43 }) + expect(s.resizes.at(-1)).toEqual({ cols: 132, rows: 43 }) + + t.emitControl({ t: 'peer-left', reason: 'host-ended' }) + t.emitControl({ t: 'peer-left', reason: 'again' }) + expect(s.getEnded()).toBe('host-ended') +}) diff --git a/shared/test/pinAuth.test.ts b/shared/test/pinAuth.test.ts new file mode 100644 index 0000000..fe6300e --- /dev/null +++ b/shared/test/pinAuth.test.ts @@ -0,0 +1,37 @@ +import { hashPin, verifyPin, generateNonce, isAcceptablePin } from '../src/pinAuth' + +describe('pinAuth challenge-response', () => { + it('hash is deterministic and a 64-char hex digest', async () => { + const h1 = await hashPin('123456', 'nonceA') + const h2 = await hashPin('123456', 'nonceA') + expect(h1).toBe(h2) + expect(h1).toMatch(/^[0-9a-f]{64}$/) + }) + + it('a different nonce yields a different hash, and the raw PIN never appears in the hash', async () => { + const h1 = await hashPin('123456', 'nonceA') + const h2 = await hashPin('123456', 'nonceB') + expect(h1).not.toBe(h2) + expect(h1.includes('123456')).toBe(false) + }) + + it('verifyPin accepts the correct PIN and rejects a wrong one', async () => { + const nonce = generateNonce() + const hash = await hashPin('654321', nonce) + expect(await verifyPin('654321', nonce, hash)).toBe(true) + expect(await verifyPin('000000', nonce, hash)).toBe(false) + }) + + it('generateNonce is fresh 32-char hex', () => { + const a = generateNonce() + const b = generateNonce() + expect(a).toMatch(/^[0-9a-f]{32}$/) + expect(a).not.toBe(b) + }) + + it('isAcceptablePin enforces min length and digits', () => { + expect(isAcceptablePin('12345')).toBe(false) + expect(isAcceptablePin('123456')).toBe(true) + expect(isAcceptablePin('abcdef')).toBe(false) + }) +}) diff --git a/shared/test/protocol.test.ts b/shared/test/protocol.test.ts new file mode 100644 index 0000000..8af5825 --- /dev/null +++ b/shared/test/protocol.test.ts @@ -0,0 +1,50 @@ +import { + encodeBinaryFrame, decodeBinaryFrame, Channel, BINARY_HEADER_BYTES, + encodeControl, decodeControl, PROTOCOL_VERSION, +} from '../src/protocol' + +describe('binary framing', () => { + it('round-trips peerId, channel and payload', () => { + const data = new Uint8Array([0, 1, 2, 255, 128]) + const frame = encodeBinaryFrame(0x01020304, Channel.Output, data) + expect(frame.length).toBe(BINARY_HEADER_BYTES + data.length) + const d = decodeBinaryFrame(frame) + expect(d.peerId).toBe(0x01020304) + expect(d.channel).toBe(Channel.Output) + expect(Array.from(d.data)).toEqual(Array.from(data)) + }) + + it('preserves a large peerId (uint32) big-endian', () => { + const d = decodeBinaryFrame(encodeBinaryFrame(0xffffffff, Channel.Input, new Uint8Array([9]))) + expect(d.peerId).toBe(0xffffffff) + }) + + it('handles input channel and empty payload (from ArrayBuffer)', () => { + const f = encodeBinaryFrame(0, Channel.Input, new Uint8Array()) + const d = decodeBinaryFrame(f.buffer) + expect(d.channel).toBe(Channel.Input) + expect(d.peerId).toBe(0) + expect(d.data.length).toBe(0) + }) + + it('throws on a too-short frame', () => { + expect(() => decodeBinaryFrame(new Uint8Array([1, 2]))).toThrow() + }) +}) + +describe('control messages', () => { + it('stamps the protocol version and round-trips', () => { + const s = encodeControl({ t: 'pin-challenge', nonce: 'abc' }) + expect(JSON.parse(s).v).toBe(PROTOCOL_VERSION) + const m = decodeControl(s) + expect(m.t).toBe('pin-challenge') + if (m.t === 'pin-challenge') { + expect(m.nonce).toBe('abc') + } + }) + + it('rejects malformed messages', () => { + expect(() => decodeControl('not json')).toThrow() + expect(() => decodeControl('{"x":1}')).toThrow() + }) +}) diff --git a/shared/test/transport.integration.test.ts b/shared/test/transport.integration.test.ts new file mode 100644 index 0000000..e9e9bee --- /dev/null +++ b/shared/test/transport.integration.test.ts @@ -0,0 +1,133 @@ +/** + * End-to-end wire test: two WebSocketTransport instances talk through the throwaway dev relay, + * exercising the full Stage 1-3 handshake (hello -> create/join -> PIN challenge-response -> + * snapshot-ack barrier -> output/input binary frames). Uses the `ws` package as the injected + * WebSocket implementation for Node. + */ +import WebSocket from 'ws' +import { WebSocketTransport, WebSocketCtor } from '../src/websocketTransport' +import { Channel } from '../src/protocol' +import { hashPin, verifyPin, generateNonce } from '../src/pinAuth' + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { startRelay } = require('../../server/src/index.cjs') as { + startRelay: (port?: number, opts?: any) => Promise<{ port: number, url: string, close: () => Promise }> +} + +const WS = WebSocket as unknown as WebSocketCtor +const enc = (s: string) => new TextEncoder().encode(s) +const dec = (b: Uint8Array) => new TextDecoder().decode(b) + +let relay: { url: string, close: () => Promise } + +beforeAll(async () => { + relay = await startRelay(0, { requireAuth: false }) +}) + +afterAll(async () => { + await relay.close() +}) + +async function connectPair() { + const host = new WebSocketTransport(WS) + const guest = new WebSocketTransport(WS) + await host.connect(relay.url) + await guest.connect(relay.url) + return { host, guest } +} + +it('mirrors output and injects input across the relay after a correct PIN', async () => { + const { host, guest } = await connectPair() + const PIN = '135790' + let hostNonce = '' + + const done = new Promise<{ output: string, input: string }>(resolve => { + let output = '' + + host.onControl(m => { + if (m.t === 'session-created') { + guest.sendControl({ t: 'hello', role: 'guest', kind: 'web' }) + guest.sendControl({ t: 'join', room: m.room }) + } else if (m.t === 'peer-joined') { + hostNonce = generateNonce() + host.sendControl({ t: 'pin-challenge', nonce: hostNonce }) + } else if (m.t === 'pin-response') { + void verifyPin(PIN, hostNonce, m.hash).then(ok => { + expect(ok).toBe(true) + host.sendControl({ t: 'pin-ok' }) + host.sendControl({ t: 'snapshot', cols: 80, rows: 24, data: '' }) + }) + } else if (m.t === 'snapshot-ack') { + host.sendData(0, Channel.Output, enc('hello from host\r\n')) + } + }) + host.onBinary(f => { + if (f.channel === Channel.Input) { + resolve({ output, input: dec(f.data) }) + } + }) + + guest.onControl(m => { + if (m.t === 'pin-challenge') { + void hashPin(PIN, m.nonce).then(hash => guest.sendControl({ t: 'pin-response', hash })) + } else if (m.t === 'snapshot') { + guest.sendControl({ t: 'snapshot-ack' }) + } + }) + guest.onBinary(f => { + if (f.channel === Channel.Output) { + output = dec(f.data) + guest.sendData(0, Channel.Input, enc('ls\n')) + } + }) + }) + + host.sendControl({ t: 'hello', role: 'host', kind: 'desktop' }) + host.sendControl({ t: 'create-session' }) + + const result = await done + expect(result.output).toBe('hello from host\r\n') + expect(result.input).toBe('ls\n') + + host.close() + guest.close() +}, 15000) + +it('rejects a wrong PIN with pin-fail', async () => { + const { host, guest } = await connectPair() + const CORRECT = '111111' + const WRONG = '999999' + let hostNonce = '' + + const failed = new Promise(resolve => { + host.onControl(m => { + if (m.t === 'session-created') { + guest.sendControl({ t: 'hello', role: 'guest', kind: 'web' }) + guest.sendControl({ t: 'join', room: m.room }) + } else if (m.t === 'peer-joined') { + hostNonce = generateNonce() + host.sendControl({ t: 'pin-challenge', nonce: hostNonce }) + } else if (m.t === 'pin-response') { + void verifyPin(CORRECT, hostNonce, m.hash).then(ok => { + host.sendControl(ok ? { t: 'pin-ok' } : { t: 'pin-fail', left: 4 }) + }) + } + }) + guest.onControl(m => { + if (m.t === 'pin-challenge') { + void hashPin(WRONG, m.nonce).then(hash => guest.sendControl({ t: 'pin-response', hash })) + } else if (m.t === 'pin-fail') { + resolve(true) + } else if (m.t === 'pin-ok') { + resolve(false) + } + }) + }) + + host.sendControl({ t: 'hello', role: 'host', kind: 'desktop' }) + host.sendControl({ t: 'create-session' }) + + expect(await failed).toBe(true) + host.close() + guest.close() +}, 15000) diff --git a/shared/test/tunnel.integration.test.ts b/shared/test/tunnel.integration.test.ts new file mode 100644 index 0000000..d8b00fc --- /dev/null +++ b/shared/test/tunnel.integration.test.ts @@ -0,0 +1,70 @@ +/** + * Reverse HTTP tunnel end-to-end: a Node HTTP client GETs the host's magic-link on the relay; the + * relay forwards http-get down the host's outbound WS; the host's HttpTunnelHandler serves the + * embedded page; the body comes back to the HTTP client. No browser needed. + */ +import * as http from 'http' +import WebSocket from 'ws' +import { WebSocketTransport, WebSocketCtor, HttpTunnelHandler } from '../src' + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { startRelay } = require('../../server/src/index.cjs') as { + startRelay: (port?: number, opts?: any) => Promise<{ url: string, close: () => Promise }> +} + +const WS = WebSocket as unknown as WebSocketCtor +const HTML = 'peershell web-clienthi' + +function waitFor(pred: () => boolean, timeoutMs = 8000): Promise { + return new Promise((resolve, reject) => { + const iv = setInterval(() => { + if (pred()) { + clearInterval(iv) + clearTimeout(to) + resolve() + } + }, 10) + const to = setTimeout(() => { + clearInterval(iv) + reject(new Error('waitFor timed out')) + }, timeoutMs) + }) +} + +function httpGet(url: string): Promise<{ status: number, body: string }> { + return new Promise((resolve, reject) => { + http.get(url, res => { + let body = '' + res.setEncoding('utf-8') + res.on('data', c => { body += c }) + res.on('end', () => resolve({ status: res.statusCode ?? 0, body })) + }).on('error', reject) + }) +} + +let relay: { url: string, close: () => Promise } +beforeAll(async () => { relay = await startRelay(0, { requireAuth: false }) }) +afterAll(async () => { await relay.close() }) + +it('serves the host-embedded web-client page over the tunnel', async () => { + const hostTransport = new WebSocketTransport(WS) + let magicLink = '' + hostTransport.onControl(m => { + if (m.t === 'session-created') { + magicLink = m.magicLink + } + }) + // eslint-disable-next-line no-new + new HttpTunnelHandler(hostTransport, () => HTML) + + await hostTransport.connect(relay.url) + hostTransport.sendControl({ t: 'hello', role: 'host', kind: 'desktop' }) + hostTransport.sendControl({ t: 'create-session' }) + await waitFor(() => magicLink !== '') + + const res = await httpGet(magicLink) + expect(res.status).toBe(200) + expect(res.body).toBe(HTML) + + hostTransport.close() +}, 15000) diff --git a/shared/test/utf8Splitter.test.ts b/shared/test/utf8Splitter.test.ts new file mode 100644 index 0000000..79cfbcc --- /dev/null +++ b/shared/test/utf8Splitter.test.ts @@ -0,0 +1,40 @@ +import { Utf8Splitter } from '../src/utf8Splitter' +import { isValidRoomCode, isAllowedTunnelPath } from '../src/api' + +describe('Utf8Splitter', () => { + it('reassembles multibyte codepoints split one byte at a time', () => { + const full = 'aé🚀z' // 'é' = 2 bytes, '🚀' = 4 bytes + const bytes = new TextEncoder().encode(full) + const s = new Utf8Splitter() + let out = '' + for (const b of bytes) { + out += s.write(new Uint8Array([b])) + } + out += s.flush() + expect(out).toBe(full) + expect(out.includes('�')).toBe(false) + }) + + it('passes ASCII straight through', () => { + const s = new Utf8Splitter() + expect(s.write(new TextEncoder().encode('hello'))).toBe('hello') + }) +}) + +describe('validators', () => { + it('accepts valid room codes and rejects ambiguous chars', () => { + expect(isValidRoomCode('ABC234')).toBe(true) + expect(isValidRoomCode('abc234')).toBe(true) // normalized to upper + expect(isValidRoomCode('ABC01O')).toBe(false) // 0/1/O excluded + expect(isValidRoomCode('SHORT')).toBe(false) // < 6 + }) + + it('tunnel path whitelist rejects traversal/SSRF', () => { + expect(isAllowedTunnelPath('/')).toBe(true) + expect(isAllowedTunnelPath('/index.html')).toBe(true) + expect(isAllowedTunnelPath('/../../etc/passwd')).toBe(false) + expect(isAllowedTunnelPath('/%2e%2e/%2e%2e/etc/passwd')).toBe(false) + expect(isAllowedTunnelPath('http://169.254.169.254/')).toBe(false) + expect(isAllowedTunnelPath('/secret')).toBe(false) + }) +}) diff --git a/shared/test/websocketTransport.test.ts b/shared/test/websocketTransport.test.ts new file mode 100644 index 0000000..fb9fe42 --- /dev/null +++ b/shared/test/websocketTransport.test.ts @@ -0,0 +1,84 @@ +import { WebSocketTransport, WebSocketCtor, WebSocketLike } from '../src/websocketTransport' +import { encodeControl, encodeBinaryFrame, Channel } from '../src/protocol' + +let last: FakeWS + +class FakeWS implements WebSocketLike { + binaryType = '' + sent: Array = [] + closed = false + onopen: ((ev: unknown) => void) | null = null + onmessage: ((ev: { data: unknown }) => void) | null = null + onclose: ((ev: unknown) => void) | null = null + onerror: ((ev: unknown) => void) | null = null + + constructor(public url: string) { + last = this + } + send(data: string | ArrayBufferView | ArrayBuffer): void { + this.sent.push(data) + } + close(): void { + this.closed = true + this.onclose?.(null) + } + sentControlTypes(): string[] { + return this.sent + .filter((d): d is string => typeof d === 'string') + .map(d => JSON.parse(d).t) + } +} + +const WS = FakeWS as unknown as WebSocketCtor + +async function connected() { + const transport = new WebSocketTransport(WS) + const p = transport.connect('ws://x') + last.onopen?.(null) + await p + return transport +} + +afterEach(() => jest.useRealTimers()) + +it('routes text -> control and arraybuffer -> binary', async () => { + jest.useFakeTimers() + const transport = await connected() + const controls: string[] = [] + const bins: Array<{ channel: Channel, data: number[] }> = [] + transport.onControl(m => controls.push(m.t)) + transport.onBinary(f => bins.push({ channel: f.channel, data: Array.from(f.data) })) + + last.onmessage?.({ data: encodeControl({ t: 'pin-ok' }) }) + const frame = encodeBinaryFrame(0, Channel.Output, new Uint8Array([1, 2, 3])) + last.onmessage?.({ data: frame.buffer }) + + expect(controls).toEqual(['pin-ok']) + expect(bins).toEqual([{ channel: Channel.Output, data: [1, 2, 3] }]) +}) + +it('sends a ping every 20s and answers an incoming ping with pong (both handled below the app)', async () => { + jest.useFakeTimers() + const transport = await connected() + const appControls: string[] = [] + transport.onControl(m => appControls.push(m.t)) + + jest.advanceTimersByTime(20000) + expect(last.sentControlTypes()).toContain('ping') + + last.onmessage?.({ data: encodeControl({ t: 'ping' }) }) + expect(last.sentControlTypes()).toContain('pong') + + // ping/pong are not surfaced to the application + last.onmessage?.({ data: encodeControl({ t: 'pong' }) }) + expect(appControls).toEqual([]) +}) + +it('stops the keepalive timer on close', async () => { + jest.useFakeTimers() + const transport = await connected() + transport.close() + const before = last.sent.length + jest.advanceTimersByTime(60000) + expect(last.sent.length).toBe(before) +}) diff --git a/shared/tsconfig.json b/shared/tsconfig.json new file mode 100644 index 0000000..c1e6e37 --- /dev/null +++ b/shared/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2019", + "module": "CommonJS", + "moduleResolution": "node", + "lib": ["ES2020", "DOM"], + "declaration": true, + "sourceMap": true, + "outDir": "dist", + "rootDir": "src", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src"] +} diff --git a/tsconfig.jest.json b/tsconfig.jest.json new file mode 100644 index 0000000..24db530 --- /dev/null +++ b/tsconfig.jest.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2019", + "module": "CommonJS", + "moduleResolution": "node", + "lib": ["ES2020", "DOM"], + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "types": ["jest", "node"], + "baseUrl": ".", + "paths": { + "@peershell/protocol": ["shared/src"] + } + } +}